[293] | 1 | #include "piacmd.h"
|
---|
| 2 |
|
---|
| 3 | #include <stdio.h>
|
---|
| 4 | #include <stdlib.h>
|
---|
| 5 | #include <math.h>
|
---|
| 6 |
|
---|
| 7 | #include "basexecut.h"
|
---|
| 8 |
|
---|
| 9 | #include "pdlmgr.h"
|
---|
| 10 | #include "ctimer.h"
|
---|
[2263] | 11 | #include "strutilxx.h"
|
---|
[293] | 12 |
|
---|
| 13 | #include "pistdimgapp.h"
|
---|
| 14 | #include "nobjmgr.h"
|
---|
[326] | 15 | #include "servnobjm.h"
|
---|
[2305] | 16 | #include "nomgadapter.h"
|
---|
[2243] | 17 | #include "piyfxdrw.h"
|
---|
[293] | 18 |
|
---|
| 19 | #include "histos.h"
|
---|
| 20 | #include "histos2.h"
|
---|
| 21 | #include "hisprof.h"
|
---|
| 22 | #include "ntuple.h"
|
---|
| 23 | #include "generaldata.h"
|
---|
[769] | 24 |
|
---|
| 25 | #ifdef SANS_EVOLPLANCK
|
---|
[333] | 26 | #include "cvector.h"
|
---|
[769] | 27 | #else
|
---|
| 28 | #include "tvector.h"
|
---|
| 29 | #endif
|
---|
[293] | 30 |
|
---|
| 31 |
|
---|
| 32 | /* --Methode-- */
|
---|
| 33 | PIABaseExecutor::PIABaseExecutor(PIACmd* piac, NamedObjMgr* omg, PIStdImgApp* app)
|
---|
| 34 | {
|
---|
| 35 | mpiac = piac;
|
---|
| 36 | mObjMgr = omg;
|
---|
| 37 | mImgApp = app;
|
---|
[312] | 38 | dynlink = NULL;
|
---|
[1276] | 39 | dynlink2 = NULL;
|
---|
[293] | 40 | RegisterCommands();
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | PIABaseExecutor::~PIABaseExecutor()
|
---|
| 44 | {
|
---|
[1276] | 45 | if (dynlink) delete dynlink;
|
---|
| 46 | if (dynlink2) delete dynlink2;
|
---|
[293] | 47 | }
|
---|
| 48 |
|
---|
| 49 |
|
---|
[2263] | 50 | /* Macro pour tester si flag normalized coordinate est present */
|
---|
| 51 | #define _CkBoolNC_(_jk_) ((tokens.size()>_jk_) && (tokens[_jk_] == "true")) ? true : false;
|
---|
[293] | 52 |
|
---|
| 53 | /* --Methode-- */
|
---|
[1268] | 54 | int PIABaseExecutor::Execute(string& kw, vector<string>& tokens, string& toks)
|
---|
[293] | 55 | {
|
---|
[333] | 56 | Services2NObjMgr* srvo = mObjMgr->GetServiceObj();
|
---|
[293] | 57 | // >>>>> Chargement de modules
|
---|
[2307] | 58 | if (kw == "loadmodule") {
|
---|
[293] | 59 | if (tokens.size() < 2) { cout << "Usage: loadmodule fnameso modulename" << endl; return(0); }
|
---|
| 60 | mpiac->LoadModule(tokens[0], tokens[1]);
|
---|
| 61 | }
|
---|
| 62 | // >>>>>>>>>>> Fenetre graphique , changement d'attributs graphiques
|
---|
| 63 | else if (kw == "zone") {
|
---|
[384] | 64 | while (tokens.size() < 2) tokens.push_back("1");
|
---|
[293] | 65 | int nx, ny;
|
---|
| 66 | nx = ny = 1;
|
---|
| 67 | nx = atoi(tokens[0].c_str()); ny = atoi(tokens[1].c_str());
|
---|
[1971] | 68 | if (mImgApp) mImgApp->SetZone(nx, ny);
|
---|
[293] | 69 | }
|
---|
| 70 | else if (kw == "newwin") {
|
---|
[1451] | 71 | int nx=1, ny=1;
|
---|
[2243] | 72 | int sx=0, sy=0;
|
---|
[1451] | 73 | //if(tokens.size() < 2) { cout << "Usage: newwin nx ny" << endl; return(0); }
|
---|
| 74 | if(tokens.size() > 0) nx = atoi(tokens[0].c_str());
|
---|
| 75 | if(tokens.size() > 1) ny = atoi(tokens[1].c_str());
|
---|
[2243] | 76 | if(tokens.size() > 3) {
|
---|
| 77 | sx = atoi(tokens[2].c_str());
|
---|
| 78 | sy = atoi(tokens[3].c_str());
|
---|
| 79 | }
|
---|
| 80 | if (mImgApp) mImgApp->CreateGraphWin(nx, ny, sx, sy);
|
---|
| 81 | }
|
---|
[293] | 82 | else if (kw == "stacknext") mImgApp->StackWinNext();
|
---|
[553] | 83 | else if (kw == "graphicatt") {
|
---|
| 84 | if (tokens.size() < 1) { cout << "Usage: graphicatt attributes_list (att=def->defaut)" << endl; return(0); }
|
---|
[1971] | 85 | string opts = tokens[0];
|
---|
| 86 | if (tokens.size() > 1)
|
---|
[2089] | 87 | for(unsigned int kt=1; kt<tokens.size(); kt++) { opts += ' '; opts += tokens[kt]; }
|
---|
[1971] | 88 | if (mImgApp) mImgApp->SetDefaultGraphicAttributes(opts);
|
---|
[293] | 89 | }
|
---|
[1971] | 90 | else if (kw == "setaxesatt") {
|
---|
| 91 | if (tokens.size() < 1) { cout << "Usage: setaxesatt attributes_list " << endl; return(0); }
|
---|
| 92 | string opts = tokens[0];
|
---|
| 93 | if (tokens.size() > 1)
|
---|
[2089] | 94 | for(unsigned int kt=1; kt<tokens.size(); kt++) { opts += ' '; opts += tokens[kt]; }
|
---|
[1971] | 95 | if (mImgApp) mImgApp->SetDefaultAxesAttributes(opts);
|
---|
[331] | 96 | }
|
---|
[548] | 97 | else if (kw == "setinsetlimits") {
|
---|
| 98 | if (tokens.size() < 4) { cout << "Usage: setinsetlimits xmin xmax ymin ymax" << endl; return(0); }
|
---|
| 99 | double xmin = atof(tokens[0].c_str());
|
---|
| 100 | double xmax = atof(tokens[1].c_str());
|
---|
| 101 | double ymin = atof(tokens[2].c_str());
|
---|
| 102 | double ymax = atof(tokens[3].c_str());
|
---|
| 103 | mImgApp->SetInsetLimits(xmin, xmax, ymin, ymax);
|
---|
| 104 | }
|
---|
[2243] | 105 | else if (kw == "drpanel") {
|
---|
| 106 | if (tokens.size() < 4) {
|
---|
| 107 | cout << "Usage: drpanel xmin xmax ymin ymax [gratt] [name]" << endl;
|
---|
| 108 | return(0);
|
---|
| 109 | }
|
---|
| 110 | double xmin = atof(tokens[0].c_str());
|
---|
| 111 | double xmax = atof(tokens[1].c_str());
|
---|
| 112 | double ymin = atof(tokens[2].c_str());
|
---|
| 113 | double ymax = atof(tokens[3].c_str());
|
---|
| 114 | char buff[128];
|
---|
[2265] | 115 | sprintf(buff, "axesnone xylimits=%g,%g,%g,%g ", xmin, xmax, ymin, ymax);
|
---|
[2243] | 116 | string sop = buff;
|
---|
| 117 | if (tokens.size() > 4) sop += tokens[4];
|
---|
| 118 | string name;
|
---|
[2265] | 119 | if (tokens.size() > 5) name = tokens[5];
|
---|
[2243] | 120 | PIFuncDrawer* gdr = new PIFuncDrawer(NULL);
|
---|
| 121 | mImgApp->DispScDrawer(gdr, name, sop);
|
---|
| 122 | }
|
---|
[349] | 123 | else if (kw == "addtext") {
|
---|
[2263] | 124 | if (tokens.size() < 3) {
|
---|
| 125 | cout << "Usage: addtext x y txt [colfontatt] [fgnc]" << endl;
|
---|
| 126 | return(0);
|
---|
| 127 | }
|
---|
[349] | 128 | double xp = atof(tokens[0].c_str());
|
---|
| 129 | double yp = atof(tokens[1].c_str());
|
---|
[1642] | 130 | string txt = tokens[2];
|
---|
[1971] | 131 | string sop;
|
---|
| 132 | if (tokens.size() > 3) sop = tokens[3];
|
---|
[2263] | 133 | bool fgnc = _CkBoolNC_(4);
|
---|
| 134 | mImgApp->AddText(txt, xp, yp, sop, fgnc);
|
---|
[349] | 135 | }
|
---|
[2263] | 136 | else if (kw == "addctext") {
|
---|
| 137 | if (tokens.size() < 5) {
|
---|
| 138 | cout << "Usage: addctext x y txt s_up s_dn [colfontatt] [updnfatt] [fgnc] " << endl;
|
---|
| 139 | return(0);
|
---|
| 140 | }
|
---|
| 141 | double xp = atof(tokens[0].c_str());
|
---|
| 142 | double yp = atof(tokens[1].c_str());
|
---|
| 143 | string sop;
|
---|
| 144 | if (tokens.size() > 5) sop = tokens[5];
|
---|
| 145 | string sopfss;
|
---|
| 146 | if (tokens.size() > 6) sopfss = tokens[6];
|
---|
| 147 | bool fgnc = _CkBoolNC_(7);
|
---|
| 148 | mImgApp->AddCompText(tokens[2], tokens[3], tokens[4], xp, yp, sop, sopfss, fgnc);
|
---|
| 149 | }
|
---|
[2243] | 150 | else if ((kw == "addline") || (kw == "addrect") || (kw == "addfrect") ||
|
---|
| 151 | (kw == "addarrow") ) {
|
---|
[2263] | 152 | if (tokens.size() < 4) {
|
---|
| 153 | cout << "Usage: addline/addrect/addfrect x1 y1 x2 y2 [colatt] [fgnc]" << endl;
|
---|
| 154 | return(0);
|
---|
| 155 | }
|
---|
[1642] | 156 | double xp1 = atof(tokens[0].c_str());
|
---|
| 157 | double yp1 = atof(tokens[1].c_str());
|
---|
| 158 | double xp2 = atof(tokens[2].c_str());
|
---|
| 159 | double yp2 = atof(tokens[3].c_str());
|
---|
[1971] | 160 | string sop;
|
---|
| 161 | if (tokens.size() > 4) sop = tokens[4];
|
---|
[2263] | 162 | bool fgnc = _CkBoolNC_(5);
|
---|
| 163 | if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, false, fgnc);
|
---|
| 164 | else if (kw == "addarrow") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop, true, fgnc);
|
---|
[1642] | 165 | else {
|
---|
| 166 | bool fgfill = (kw == "addrect") ? false : true;
|
---|
[2263] | 167 | mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill, fgnc);
|
---|
[1642] | 168 | }
|
---|
[2243] | 169 | }
|
---|
[1642] | 170 | else if ((kw == "addcirc") || (kw == "addfcirc")) {
|
---|
[2263] | 171 | if (tokens.size() < 3) {
|
---|
| 172 | cout << "Usage: addcirc/addfcirc xc yc r [colatt] [fgnc]" << endl;
|
---|
| 173 | return(0);
|
---|
| 174 | }
|
---|
[1642] | 175 | double xc = atof(tokens[0].c_str());
|
---|
| 176 | double yc = atof(tokens[1].c_str());
|
---|
| 177 | double rad = atof(tokens[2].c_str());
|
---|
[1971] | 178 | string sop;
|
---|
| 179 | if (tokens.size() > 3) sop = tokens[3];
|
---|
[2263] | 180 | bool fgnc = _CkBoolNC_(4);
|
---|
[1642] | 181 | bool fgfill = (kw == "addcirc") ? false : true;
|
---|
[2263] | 182 | mImgApp->AddCircle(xc, yc, rad, sop, fgfill, fgnc);
|
---|
[1642] | 183 | }
|
---|
[2265] | 184 | else if ((kw == "addarca") || (kw == "addfarca")) {
|
---|
| 185 | if (tokens.size() < 5) {
|
---|
| 186 | cout << "Usage: addarca/addfarca xc yc r a da [colatt] [fgnc]" << endl;
|
---|
| 187 | return(0);
|
---|
| 188 | }
|
---|
| 189 | double xc = atof(tokens[0].c_str());
|
---|
| 190 | double yc = atof(tokens[1].c_str());
|
---|
| 191 | double rad = atof(tokens[2].c_str());
|
---|
| 192 | double ang = atof(tokens[3].c_str());
|
---|
| 193 | double dang = atof(tokens[4].c_str());
|
---|
| 194 | string sop;
|
---|
| 195 | if (tokens.size() > 5) sop = tokens[5];
|
---|
| 196 | bool fgnc = _CkBoolNC_(6);
|
---|
| 197 | bool fgfill = (kw == "addarca") ? false : true;
|
---|
| 198 | mImgApp->AddArc(xc, yc, rad, ang, dang, sop, fgfill, fgnc);
|
---|
| 199 | }
|
---|
[2243] | 200 | else if (kw == "addmarker") {
|
---|
| 201 | if (tokens.size() < 2) {
|
---|
[2263] | 202 | cout << "Usage: addmarker x y [gratt] [fgnc]" << endl;
|
---|
[2243] | 203 | return(0);
|
---|
| 204 | }
|
---|
| 205 | double xm = atof(tokens[0].c_str());
|
---|
| 206 | double ym = atof(tokens[1].c_str());
|
---|
| 207 | string sop;
|
---|
| 208 | if (tokens.size() > 2) sop = tokens[2];
|
---|
[2263] | 209 | bool fgnc = _CkBoolNC_(3);
|
---|
| 210 | mImgApp->AddCircle(xm, ym, -1, sop, false, fgnc);
|
---|
[2243] | 211 | }
|
---|
| 212 | else if ((kw == "addarc") || (kw == "addfarc") ) {
|
---|
| 213 | if (tokens.size() < 6) {
|
---|
[2263] | 214 | cout << "Usage: addarc/addfarc x1 y1 x2 y2 x3 y3 [gratt] [fgnc]" << endl;
|
---|
[2243] | 215 | return(0);
|
---|
| 216 | }
|
---|
| 217 | double x1 = atof(tokens[0].c_str());
|
---|
| 218 | double y1 = atof(tokens[1].c_str());
|
---|
| 219 | double x2 = atof(tokens[2].c_str());
|
---|
| 220 | double y2 = atof(tokens[3].c_str());
|
---|
| 221 | double x3 = atof(tokens[4].c_str());
|
---|
| 222 | double y3 = atof(tokens[5].c_str());
|
---|
| 223 | string sop;
|
---|
| 224 | if (tokens.size() > 6) sop = tokens[6];
|
---|
[2263] | 225 | bool fgnc = _CkBoolNC_(7);
|
---|
[2243] | 226 | bool fgfill = (kw == "addarc") ? false : true;
|
---|
[2263] | 227 | mImgApp->AddArc(x1, y1, x2, y2, x3, y3, sop, fgfill, fgnc);
|
---|
[2243] | 228 | }
|
---|
[2263] | 229 | else if ((kw == "addpoly") || (kw == "addfpoly")) {
|
---|
| 230 | if (tokens.size() < 1) {
|
---|
| 231 | cout << "Usage: addpoly/addfpoly 'x1,y1 x2,y2 x3,y3 ...' [gratt] [fgnc]" << endl;
|
---|
| 232 | return(0);
|
---|
| 233 | }
|
---|
| 234 | vector<string> sxy;
|
---|
| 235 | vector<double> xpol, ypol;
|
---|
| 236 | double xp, yp;
|
---|
| 237 | FillVStringFrString(tokens[0], sxy);
|
---|
| 238 | for(int jkk=0; jkk<sxy.size(); jkk++) {
|
---|
| 239 | xp = yp = 0;
|
---|
| 240 | if (sscanf(sxy[jkk].c_str(), "%lg,%lg", &xp, &yp) == 2) {
|
---|
| 241 | xpol.push_back(xp);
|
---|
| 242 | ypol.push_back(yp);
|
---|
| 243 | }
|
---|
| 244 | }
|
---|
| 245 | string sop;
|
---|
| 246 | if (tokens.size() > 1) sop = tokens[1];
|
---|
| 247 | bool fgnc = _CkBoolNC_(2);
|
---|
| 248 | bool fgfill = (kw == "addpoly") ? false : true;
|
---|
| 249 | mImgApp->AddPoly(xpol, ypol, sop, fgfill, fgnc);
|
---|
| 250 | }
|
---|
[1642] | 251 |
|
---|
| 252 |
|
---|
[2165] | 253 | else if ((kw == "settitle") || (kw == "addtitle")) {
|
---|
| 254 | if (tokens.size() < 1) { cout << "Usage: settitle/addtitle TopTitle [BotTitle] [fontatt]" << endl; return(0); }
|
---|
[2154] | 255 | if(tokens.size()<2) tokens.push_back("");
|
---|
[2165] | 256 | string gropt;
|
---|
| 257 | if(tokens.size()>2) gropt = tokens[2];
|
---|
| 258 | mImgApp->SetTitle(tokens[0], tokens[1], gropt);
|
---|
[2154] | 259 | }
|
---|
[2165] | 260 |
|
---|
| 261 | else if ((kw == "setaxelabels") || (kw == "addaxelabels")) {
|
---|
| 262 | if (tokens.size() < 2) { cout << "Usage: setaxelabels/addaxelabels xLabel yLabel [fontatt]" << endl; return(0); }
|
---|
| 263 | string gropt;
|
---|
| 264 | if(tokens.size()>2) gropt = tokens[2];
|
---|
| 265 | mImgApp->SetAxeLabels(tokens[0], tokens[1], gropt);
|
---|
| 266 | }
|
---|
[349] | 267 |
|
---|
[293] | 268 | // >>>>>>>>>>> Link dynamique de fonctions C++
|
---|
| 269 | else if (kw == "link" ) {
|
---|
| 270 | if (tokens.size() < 2) { cout << "Usage: link fnameso f1 [f2 f3]" << endl; return(0); }
|
---|
| 271 | string sph = "";
|
---|
| 272 | for(int gg=0; gg<5; gg++) tokens.push_back(sph);
|
---|
| 273 | int rc = LinkUserFuncs(tokens[0], tokens[1], tokens[2], tokens[3]);
|
---|
| 274 | if (rc == 0) cout << "PIABaseExecutor: Link from " << tokens[0] << " OK " << endl;
|
---|
| 275 | }
|
---|
[1276] | 276 | else if (kw == "linkff2" ) {
|
---|
| 277 | if (tokens.size() < 2) { cout << "Usage: linkff2 fnameso f1 [f2 f3]" << endl; return(0); }
|
---|
| 278 | string sph = "";
|
---|
| 279 | for(int gg=0; gg<5; gg++) tokens.push_back(sph);
|
---|
| 280 | int rc = LinkUserFuncs2(tokens[0], tokens[1], tokens[2], tokens[3]);
|
---|
| 281 | if (rc == 0) cout << "PIABaseExecutor: Link2 from " << tokens[0] << " OK " << endl;
|
---|
| 282 | }
|
---|
[293] | 283 | else if (kw == "call" ) {
|
---|
| 284 | if (tokens.size() < 1) { cout << "Usage: call userf [arg1 arg2 ...]" << endl; return(0); }
|
---|
[1276] | 285 | UsFmap::iterator it;
|
---|
| 286 | UsFmap::iterator it1 = usfmap.find(tokens[0]);
|
---|
| 287 | UsFmap::iterator it2 = usfmap2.find(tokens[0]);
|
---|
| 288 | if ((it1 == usfmap.end()) && (it2 == usfmap2.end()) ) {
|
---|
[293] | 289 | cerr << "PIABaseExecutor: No User Function " << tokens[0] << endl;
|
---|
| 290 | return(0);
|
---|
| 291 | }
|
---|
[1276] | 292 | if (it1 == usfmap.end()) it = it2;
|
---|
| 293 | else it = it1;
|
---|
[293] | 294 | cout << "PIABaseExecutor: Call " << tokens[0] << "( ... )" << endl;
|
---|
| 295 | // on est oblige de faire un cast etant donne qu'on
|
---|
| 296 | // utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++)
|
---|
| 297 | DlUserProcFunction fuf = (DlUserProcFunction)(*it).second;
|
---|
| 298 | // On redirige la sortie sur le terminal
|
---|
| 299 | bool red = mImgApp->HasRedirectedStdOutErr();
|
---|
| 300 | mImgApp->RedirectStdOutErr(false);
|
---|
[1276] | 301 | #ifdef SANS_EVOLPLANCK
|
---|
[293] | 302 | TRY {
|
---|
| 303 | tokens.erase(tokens.begin());
|
---|
| 304 | fuf(tokens);
|
---|
| 305 | } CATCH(merr) {
|
---|
| 306 | fflush(stdout);
|
---|
[1276] | 307 | string es = PeidaExc(merr);
|
---|
| 308 | cerr << "\n PIABaseExecutor: Call UserFunc Exception :" << merr << es;
|
---|
[293] | 309 | cout << endl;
|
---|
| 310 | }
|
---|
[1276] | 311 | #else
|
---|
| 312 | try {
|
---|
| 313 | tokens.erase(tokens.begin());
|
---|
| 314 | fuf(tokens);
|
---|
| 315 | }
|
---|
| 316 | catch ( PThrowable & exc ) {
|
---|
| 317 | cerr << "\n PIABaseExecutor: Call / Catched Exception :"
|
---|
| 318 | << (string)typeid(exc).name() << " Msg= "
|
---|
| 319 | << exc.Msg() << endl;
|
---|
| 320 | cout << endl;
|
---|
| 321 | }
|
---|
| 322 | catch ( ... ) {
|
---|
| 323 | cerr << "\n PIABaseExecutor: Call / Catched Exception ... "
|
---|
| 324 | << endl;
|
---|
| 325 | cout << endl;
|
---|
| 326 | }
|
---|
| 327 | #endif
|
---|
[293] | 328 | mImgApp->RedirectStdOutErr(red);
|
---|
| 329 | }
|
---|
| 330 |
|
---|
| 331 | // >>>>>>>>>>> lecture/ecriture des objets, gestion des objets
|
---|
| 332 | else if (kw == "openfits" ) {
|
---|
| 333 | if (tokens.size() < 1) { cout << "Usage: openfits file " << endl; return(0); }
|
---|
[331] | 334 | else { string nomobj = ""; mObjMgr->ReadFits(tokens[0], nomobj); }
|
---|
[293] | 335 | }
|
---|
| 336 | else if (kw == "savefits" ) {
|
---|
| 337 | if (tokens.size() < 2) { cout << "Usage: savefits nameobj filename " << endl; return(0); }
|
---|
| 338 | else mObjMgr->SaveFits(tokens[0], tokens[1]);
|
---|
| 339 | }
|
---|
| 340 | else if (kw == "openppf" ) {
|
---|
| 341 | if (tokens.size() < 1) { cout << "Usage: openppf file " << endl; return(0); }
|
---|
| 342 | mObjMgr->ReadAll(tokens[0]);
|
---|
| 343 | }
|
---|
[2132] | 344 | else if ((kw == "saveobjs") || (kw == "saveppf")) {
|
---|
[333] | 345 | if (tokens.size() < 2) { cout << "Usage: saveobjs patt filename " << endl; return(0); }
|
---|
| 346 | mObjMgr->SaveObjects(tokens[0], tokens[1]);
|
---|
| 347 | }
|
---|
[293] | 348 | else if (kw == "saveall" ) {
|
---|
| 349 | if (tokens.size() < 1) { cout << "Usage: saveall file " << endl; return(0); }
|
---|
| 350 | mObjMgr->SaveAll(tokens[0]);
|
---|
| 351 | }
|
---|
| 352 | else if (kw == "print" ) {
|
---|
| 353 | if (tokens.size() < 1) { cout << "Usage: print nameobj " << endl; return(0); }
|
---|
| 354 | mObjMgr->PrintObj(tokens[0]);
|
---|
| 355 | }
|
---|
[333] | 356 | else if ( (kw == "rename" ) || (kw == "mv") ) {
|
---|
[2132] | 357 | if (tokens.size() < 2) { cout << "Usage: rename/mv nameobj namenew" << endl; return(0); }
|
---|
[293] | 358 | mObjMgr->RenameObj(tokens[0], tokens[1]);
|
---|
| 359 | }
|
---|
[333] | 360 | else if ( (kw == "del" ) || (kw == "rm") ) {
|
---|
[1655] | 361 | if (tokens.size() < 1) { cout << "Usage: del nameobj [nameobj2 ...]" << endl; return(0); }
|
---|
| 362 | if (tokens.size()>0)
|
---|
| 363 | for(uint_4 i=0;i<tokens.size();i++) mObjMgr->DelObj(tokens[i]);
|
---|
[293] | 364 | }
|
---|
| 365 | else if (kw == "delobjs" ) {
|
---|
| 366 | if (tokens.size() < 1) { cout << "Usage: delobjs nomobjpattern (*,?) " << endl; return(0); }
|
---|
| 367 | mObjMgr->DelObjects(tokens[0]);
|
---|
| 368 | }
|
---|
[333] | 369 | else if ( (kw == "listobjs") || (kw == "ls") ) {
|
---|
[331] | 370 | if (tokens.size() < 1) tokens.push_back("*");
|
---|
| 371 | mObjMgr->ListObjs(tokens[0]);
|
---|
| 372 | }
|
---|
[333] | 373 | // Gestion des repertoires
|
---|
| 374 | else if (kw == "mkdir" ) {
|
---|
[344] | 375 | if (tokens.size() < 1) { cout << "Usage: mkdir dirname [true]" << endl; return(0); }
|
---|
| 376 | bool crd = mObjMgr->CreateDir(tokens[0]);
|
---|
| 377 | if ( crd && (tokens.size() > 1) && (tokens[1] == "true") )
|
---|
| 378 | mObjMgr->SetKeepOldDirAtt(tokens[0], true);
|
---|
[333] | 379 | }
|
---|
| 380 | else if (kw == "rmdir" ) {
|
---|
| 381 | if (tokens.size() < 1) { cout << "Usage: rmdir dirname " << endl; return(0); }
|
---|
| 382 | mObjMgr->DeleteDir(tokens[0]);
|
---|
| 383 | }
|
---|
[2132] | 384 | else if (kw == "setdiratt" ) {
|
---|
| 385 | if (tokens.size() < 2) { cout << "Usage: setdiratt dirname true/false" << endl; return(0); }
|
---|
| 386 | if (tokens[1] == "true") mObjMgr->SetKeepOldDirAtt(tokens[0], true);
|
---|
| 387 | else mObjMgr->SetKeepOldDirAtt(tokens[0], false);
|
---|
| 388 | }
|
---|
[333] | 389 | else if (kw == "cd") {
|
---|
| 390 | if (tokens.size() < 1) tokens.push_back("home");
|
---|
| 391 | mObjMgr->SetCurrentDir(tokens[0]);
|
---|
| 392 | }
|
---|
[345] | 393 | else if (kw == "pwd") {
|
---|
| 394 | string dirn;
|
---|
| 395 | mObjMgr->GetCurrentDir(dirn);
|
---|
| 396 | cout << "CurrentDirectory: " << dirn << endl;
|
---|
| 397 | }
|
---|
[333] | 398 | else if (kw == "listdirs") {
|
---|
| 399 | if (tokens.size() < 1) tokens.push_back("*");
|
---|
| 400 | mObjMgr->ListDirs(tokens[0]);
|
---|
| 401 | }
|
---|
[293] | 402 |
|
---|
| 403 | // >>>>>>>>>>> Creation d'histos 1D-2D
|
---|
| 404 | else if (kw == "newh1d") {
|
---|
| 405 | if (tokens.size() < 4) { cout << "Usage: newh1d name xmin xmax nbin" << endl; return(0); }
|
---|
[1091] | 406 | int_4 nbx = 100;
|
---|
| 407 | r_8 xmin = 0., xmax = 1.;
|
---|
[293] | 408 | nbx = atoi(tokens[3].c_str());
|
---|
| 409 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 410 | Histo* h = new Histo(xmin, xmax, nbx);
|
---|
| 411 | mObjMgr->AddObj(h, tokens[0]);
|
---|
| 412 | }
|
---|
| 413 | else if (kw == "newh2d") {
|
---|
| 414 | if (tokens.size() < 7) {
|
---|
| 415 | cout << "Usage: newh2d name xmin xmax nbinx ymin ymax nbiny" << endl;
|
---|
| 416 | return(0);
|
---|
| 417 | }
|
---|
[1091] | 418 | int_4 nbx = 50, nby = 50;
|
---|
| 419 | r_8 xmin = 0., xmax = 1.;
|
---|
| 420 | r_8 ymin = 0., ymax = 1.;
|
---|
[293] | 421 | nbx = atoi(tokens[3].c_str());
|
---|
| 422 | nby = atoi(tokens[6].c_str());
|
---|
| 423 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 424 | ymin = atof(tokens[4].c_str()); ymax = atof(tokens[5].c_str());
|
---|
| 425 | Histo2D* h = new Histo2D(xmin, xmax, nbx, ymin, ymax, nby);
|
---|
| 426 | mObjMgr->AddObj(h, tokens[0]);
|
---|
| 427 | }
|
---|
[1035] | 428 | else if (kw == "newprof" || kw == "newprofe") {
|
---|
[293] | 429 | if (tokens.size() < 4)
|
---|
[1035] | 430 | { cout << "Usage: newprof[e] name xmin xmax nbin [ymin ymax]" << endl; return(0); }
|
---|
[1091] | 431 | int_4 nbx = 100;
|
---|
| 432 | r_8 xmin = 0., xmax = 1., ymin = 1., ymax = -1.;
|
---|
[293] | 433 | if(tokens.size() > 5)
|
---|
| 434 | {ymin = atof(tokens[4].c_str()); ymax = atof(tokens[5].c_str());}
|
---|
| 435 | nbx = atoi(tokens[3].c_str());
|
---|
| 436 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 437 | HProf* h = new HProf(xmin, xmax, nbx, ymin, ymax);
|
---|
[1035] | 438 | if(kw == "newprofe") h->SetErrOpt(false);
|
---|
[293] | 439 | mObjMgr->AddObj(h, tokens[0]);
|
---|
| 440 | }
|
---|
[447] | 441 |
|
---|
| 442 | // Creation de NTuple
|
---|
| 443 | else if (kw == "newnt") {
|
---|
| 444 | if(tokens.size() < 2)
|
---|
| 445 | {cout<<"Usage: newnt name v1 v2 ... vn / newnt name nvar"<<endl; return(0);}
|
---|
| 446 | vector<string> varname;
|
---|
| 447 | int nvar = 0;
|
---|
| 448 | const char *c = tokens[1].c_str();
|
---|
| 449 | if(isdigit(c[0])) {
|
---|
| 450 | nvar = atoi(tokens[1].c_str());
|
---|
| 451 | if(nvar<=0 || nvar>=10000)
|
---|
| 452 | {cout<<"newnt name nvar : nvar must be an positive integer<10000"<<endl;
|
---|
| 453 | return(0);}
|
---|
| 454 | for(int i=0;i<nvar;i++) {
|
---|
| 455 | char str[16]; sprintf(str,"%d",i);
|
---|
| 456 | string dum = "v"; dum += str;
|
---|
| 457 | varname.push_back(dum.c_str());
|
---|
| 458 | }
|
---|
| 459 | } else if( islower(c[0]) || isupper(c[0]) ) {
|
---|
[1548] | 460 | for(int i=1;i<(int)tokens.size();i++) {
|
---|
[447] | 461 | varname.push_back(tokens[i].c_str());
|
---|
| 462 | nvar++;
|
---|
| 463 | }
|
---|
| 464 | } else {
|
---|
| 465 | cout<<"newnt name v1 v2 ... vn : name vi must begin by a letter"<<endl
|
---|
| 466 | <<"newnt name nvar : nvar must be an positive integer"<<endl;
|
---|
| 467 | return(0);
|
---|
| 468 | }
|
---|
| 469 | char **noms = new char*[nvar];
|
---|
| 470 | for(int i=0;i<nvar;i++) noms[i] = (char *)varname[i].c_str();
|
---|
| 471 | NTuple* nt = new NTuple(nvar,noms);
|
---|
| 472 | delete [] noms;
|
---|
| 473 | mObjMgr->AddObj(nt,tokens[0]);
|
---|
| 474 | }
|
---|
| 475 |
|
---|
| 476 | // Creation de GeneralFitData
|
---|
[293] | 477 | else if (kw == "newgfd") {
|
---|
| 478 | if (tokens.size() < 3)
|
---|
| 479 | { cout << "Usage: newgfd nvar nalloc [errx(0/1)]" << endl; return(0); }
|
---|
| 480 | int nvar, nalloc, errx=0;
|
---|
| 481 | if (tokens.size() > 3)
|
---|
| 482 | { errx = atoi(tokens[3].c_str()); if(errx>0) errx=1; else errx = 0;}
|
---|
| 483 | nvar = atoi(tokens[1].c_str()); nalloc = atoi(tokens[2].c_str());
|
---|
| 484 | if(nvar>0 && nalloc>0) {
|
---|
| 485 | GeneralFitData* gfd = new GeneralFitData(nvar,nalloc,errx);
|
---|
| 486 | mObjMgr->AddObj(gfd, tokens[0]);
|
---|
| 487 | }
|
---|
| 488 | }
|
---|
| 489 |
|
---|
[333] | 490 | // Creation/remplissage de vecteur et de matrice
|
---|
| 491 | else if (kw == "newvec") {
|
---|
| 492 | if (tokens.size() < 2) {
|
---|
| 493 | cout << "Usage: newvec name size [f(i) dopt] " << endl; return(0);
|
---|
| 494 | }
|
---|
| 495 | int n = atoi(tokens[1].c_str());
|
---|
| 496 | double xmin, xmax;
|
---|
| 497 | xmin = 0.; xmax = n;
|
---|
[357] | 498 | if (tokens.size() < 3) {
|
---|
| 499 | Vector* v = new Vector(n);
|
---|
| 500 | mObjMgr->AddObj(v, tokens[0]);
|
---|
| 501 | }
|
---|
| 502 | else {
|
---|
| 503 | if (tokens.size() < 4) tokens.push_back("");
|
---|
| 504 | mObjMgr->GetServiceObj()->PlotFunc(tokens[2], tokens[0], xmin, xmax, n, tokens[3]);
|
---|
| 505 | }
|
---|
[333] | 506 | }
|
---|
| 507 | else if (kw == "newmtx") {
|
---|
| 508 | if (tokens.size() < 3) {
|
---|
[1917] | 509 | cout << "Usage: newmtx name sizeX(Col) sizeY(Lines) [f(i,j) dopt] " << endl; return(0);
|
---|
[333] | 510 | }
|
---|
| 511 | int nx = atoi(tokens[1].c_str());
|
---|
| 512 | int ny = atoi(tokens[2].c_str());
|
---|
| 513 | double xmin, xmax, ymin, ymax;
|
---|
| 514 | xmin = 0.; xmax = nx;
|
---|
| 515 | ymin = 0.; ymax = ny;
|
---|
[357] | 516 | if (tokens.size() < 4) {
|
---|
| 517 | Matrix* mtx = new Matrix(ny,nx);
|
---|
| 518 | mObjMgr->AddObj(mtx, tokens[0]);
|
---|
| 519 | }
|
---|
| 520 | else {
|
---|
[1971] | 521 | if (tokens.size() < 5) tokens.push_back("next");
|
---|
[357] | 522 | mObjMgr->GetServiceObj()->PlotFunc2D(tokens[3], tokens[0], xmin, xmax, ymin, ymax,
|
---|
| 523 | nx, ny, tokens[4]);
|
---|
| 524 | }
|
---|
[333] | 525 | }
|
---|
[2305] | 526 | // ----- Vecteur/NTuple <> Lignes/variables interpreteur
|
---|
| 527 | // Creation de vecteur depuis le contenu de la ligne
|
---|
| 528 | else if (kw == "line2vec") {
|
---|
| 529 | if (tokens.size() < 2) {
|
---|
| 530 | cout << "Usage: line2vec vecname v0 v1 v2 ... " << endl; return(0);
|
---|
| 531 | }
|
---|
| 532 | int vsz = tokens.size()-1;
|
---|
| 533 | Vector* v = new Vector(vsz);
|
---|
| 534 | for(int kkv=0; kkv<vsz; kkv++) (*v)(kkv) = atof(tokens[kkv+1].c_str());
|
---|
| 535 | mObjMgr->AddObj(v, tokens[0]);
|
---|
| 536 | }
|
---|
| 537 | // Remplissage de NTuple depuis la ligne
|
---|
| 538 | else if (kw == "line2nt") {
|
---|
| 539 | if (tokens.size() < 2) {
|
---|
| 540 | cout << "Usage: line2nt ntname col0 col1 ..." << endl; return(0);
|
---|
| 541 | }
|
---|
| 542 | AnyDataObj* obj;
|
---|
| 543 | obj = mObjMgr->GetObj(tokens[0]);
|
---|
| 544 | if(obj == NULL) {
|
---|
| 545 | cerr << "line2nt Error , No such object " << tokens[0] << endl;
|
---|
| 546 | return(0);
|
---|
| 547 | }
|
---|
| 548 | NTuple* nt = dynamic_cast<NTuple *>(obj);
|
---|
| 549 | if(nt == NULL) {
|
---|
| 550 | cerr << "line2nt Error " << tokens[0] << " not an NTuple ! " << endl;
|
---|
| 551 | return(0);
|
---|
| 552 | }
|
---|
| 553 | if (nt->NbColumns() < 1) {
|
---|
| 554 | cerr << "line2nt Error: NbColumns < 1" << endl;
|
---|
| 555 | return(0);
|
---|
| 556 | }
|
---|
| 557 | r_4* xnt = new r_4[ nt->NbColumns() ];
|
---|
| 558 | int kkx;
|
---|
| 559 | for(kkx=0; kkx<nt->NbColumns(); kkx++) {
|
---|
| 560 | if (kkx < tokens.size()-1) xnt[kkx] = atof(tokens[kkx+1].c_str());
|
---|
| 561 | else xnt[kkx] = 0.;
|
---|
| 562 | }
|
---|
| 563 | nt->Fill(xnt);
|
---|
| 564 | delete[] xnt;
|
---|
| 565 | }
|
---|
| 566 | // Contenu du vecteur vers variable interpreteur
|
---|
| 567 | #define MAXNWORDSO2V 32768
|
---|
| 568 | else if (kw == "vec2var") {
|
---|
| 569 | if (tokens.size() < 2) {
|
---|
| 570 | cout << "Usage: vec2var vecname varname [loop_param start:end:step] " << endl; return(0);
|
---|
| 571 | }
|
---|
| 572 | AnyDataObj* obj;
|
---|
| 573 | obj = mObjMgr->GetObj(tokens[0]);
|
---|
| 574 | if(obj == NULL) {
|
---|
| 575 | cerr << "vec2var Error , No such object " << tokens[0] << endl;
|
---|
| 576 | return(0);
|
---|
| 577 | }
|
---|
| 578 | Vector* v = dynamic_cast<Vector *>(obj);
|
---|
| 579 | if(v == NULL) {
|
---|
| 580 | cerr << "vec2var Error " << tokens[0] << " not a Vector ! " << endl;
|
---|
| 581 | return(0);
|
---|
| 582 | }
|
---|
| 583 | int kks = 0;
|
---|
| 584 | int kke = v->NElts();
|
---|
| 585 | int kkp = 1;
|
---|
| 586 | if (tokens.size() > 2) Services2NObjMgr::DecodeLoopParameters(tokens[2], kks, kke, kkp);
|
---|
| 587 | if (kks < 0) kks = 0;
|
---|
| 588 | if (kke > v->NElts()) kke = v->NElts();
|
---|
| 589 | if (kkp < 1) kkp = 1;
|
---|
| 590 | int nelt = (kke-kks-1)/kkp;
|
---|
| 591 | if (nelt > MAXNWORDSO2V) {
|
---|
| 592 | nelt = MAXNWORDSO2V;
|
---|
| 593 | cout << "vec2var Warning: Only " << nelt
|
---|
| 594 | << " elements will be converted to string" << endl;
|
---|
| 595 | kke = kks+nelt*kkp;
|
---|
| 596 | }
|
---|
| 597 | string v2str;
|
---|
| 598 | char buff[64];
|
---|
| 599 | for(int kkv=kks; kkv<kke; kkv+=kkp) {
|
---|
| 600 | sprintf(buff, "%lg ", (*v)(kkv));
|
---|
| 601 | v2str += buff;
|
---|
| 602 | }
|
---|
| 603 |
|
---|
| 604 | mObjMgr->SetVar(tokens[1], v2str);
|
---|
| 605 | }
|
---|
| 606 | // Une ligne du NTuple/NTupleInterface -> variable interpreteur
|
---|
| 607 | else if ((kw == "ntline2var") || (kw == "ntcol2var")) {
|
---|
| 608 | if (tokens.size() < 3) {
|
---|
| 609 | cout << "Usage: ntline/col2var objname line_number varname" << endl;
|
---|
| 610 | return(0);
|
---|
| 611 | }
|
---|
| 612 | NObjMgrAdapter* oa = mObjMgr->GetObjAdapter(tokens[0]);
|
---|
| 613 | if(oa == NULL) {
|
---|
| 614 | cerr << "ntline/col2var Error , No such object " << tokens[0] << endl;
|
---|
| 615 | return(0);
|
---|
| 616 | }
|
---|
| 617 | bool adel = false;
|
---|
| 618 | NTupleInterface* nti = oa->GetNTupleInterface(adel);
|
---|
| 619 | if(nti == NULL) {
|
---|
| 620 | cerr << "ntline/col2var Error: objet" << tokens[0] << " has no NTupleInterface" << endl;
|
---|
| 621 | return(0);
|
---|
| 622 | }
|
---|
[333] | 623 |
|
---|
[2305] | 624 | if (nti->NbColumns() < 1 || nti->NbLines() < 1) {
|
---|
| 625 | cerr << "ntline/col2var Error: NbColumns or NbLines < 1" << endl;
|
---|
| 626 | return(0);
|
---|
| 627 | }
|
---|
| 628 | string v2str;
|
---|
| 629 | char buff[64];
|
---|
| 630 | if (kw == "ntline2var") {
|
---|
| 631 | int numline = atoi(tokens[1].c_str());
|
---|
| 632 | if ( (numline >= nti->NbLines()) || (numline < 0) ) {
|
---|
| 633 | cerr << "ntline2var Error: numline" << tokens[1] << " out of bounds" << endl;
|
---|
| 634 | return(0);
|
---|
| 635 | }
|
---|
| 636 | r_8* dline = nti->GetLineD(numline);
|
---|
| 637 | for(int kkv=0; kkv<nti->NbColumns(); kkv++) {
|
---|
| 638 | sprintf(buff, "%lg ", dline[kkv]);
|
---|
| 639 | v2str += buff;
|
---|
| 640 | }
|
---|
| 641 | }
|
---|
| 642 | else {
|
---|
| 643 | int numcol = atoi(tokens[1].c_str());
|
---|
| 644 | if ( (numcol >= nti->NbColumns()) || (numcol < 0) ) {
|
---|
| 645 | cerr << "ntcol2var Error: numcol" << tokens[1] << " out of bounds" << endl;
|
---|
| 646 | return(0);
|
---|
| 647 | }
|
---|
| 648 | int kks = 0;
|
---|
| 649 | int kke = nti->NbLines();
|
---|
| 650 | int kkp = 1;
|
---|
| 651 | if (tokens.size() > 3) Services2NObjMgr::DecodeLoopParameters(tokens[3], kks, kke, kkp);
|
---|
| 652 | if (kks < 0) kks = 0;
|
---|
| 653 | if (kke > nti->NbLines()) kke = nti->NbLines();
|
---|
| 654 | if (kkp < 1) kkp = 1;
|
---|
| 655 | int nelt = (kke-kks-1)/kkp;
|
---|
| 656 | if (nelt > MAXNWORDSO2V) {
|
---|
| 657 | nelt = MAXNWORDSO2V;
|
---|
| 658 | cout << "ntcol2var Warning: Only " << nelt
|
---|
| 659 | << " lines " << " will be converted to string" << endl;
|
---|
| 660 | kke = kks+nelt*kkp;
|
---|
| 661 | }
|
---|
| 662 | r_8* dline;
|
---|
| 663 | for(int kkl=kks; kkl<kke; kkl+=kkp) {
|
---|
| 664 | dline = nti->GetLineD(kkl);
|
---|
| 665 | sprintf(buff, "%lg ", dline[numcol]);
|
---|
| 666 | v2str += buff;
|
---|
| 667 | }
|
---|
| 668 | }
|
---|
| 669 | mObjMgr->SetVar(tokens[2], v2str);
|
---|
| 670 | if (adel) delete nti;
|
---|
| 671 | }
|
---|
| 672 |
|
---|
| 673 | // -------------------------------------------------------
|
---|
[455] | 674 | // Copie d'objets
|
---|
[2176] | 675 | else if ( (kw == "copy") || (kw == "cp") ) {
|
---|
[455] | 676 | if(tokens.size()<2) {
|
---|
| 677 | cout<<"Usage: copy name_from name_to"<<endl;return(0);
|
---|
| 678 | }
|
---|
[463] | 679 | mObjMgr->CopyObj(tokens[0],tokens[1]);
|
---|
[455] | 680 | }
|
---|
| 681 |
|
---|
| 682 |
|
---|
[293] | 683 | // >>>>>>>>>>> Affichage des objets
|
---|
[295] | 684 | else if ( (kw == "disp") || (kw == "surf") || (kw == "imag") ) {
|
---|
| 685 | if (tokens.size() < 1) { cout << "Usage: disp/surf/imag nameobj [opt]" << endl; return(0); }
|
---|
[1971] | 686 | string opt = "next";
|
---|
[293] | 687 | if (tokens.size() > 1) opt = tokens[1];
|
---|
| 688 | if (kw == "disp") mObjMgr->DisplayObj(tokens[0], opt);
|
---|
| 689 | else if (kw == "surf") mObjMgr->DisplaySurf3D(tokens[0], opt);
|
---|
[295] | 690 | else if (kw == "imag") mObjMgr->DisplayImage(tokens[0], opt);
|
---|
[293] | 691 | }
|
---|
| 692 |
|
---|
| 693 | else if (kw == "nt2d") {
|
---|
[486] | 694 | if (tokens.size() < 3) {
|
---|
| 695 | cout << "Usage: nt2d nameobj varx vary [errx erry wt label opt]" << endl;
|
---|
| 696 | return(0);
|
---|
[293] | 697 | }
|
---|
[486] | 698 | while (tokens.size() < 8) tokens.push_back("");
|
---|
[333] | 699 | string ph = "";
|
---|
[486] | 700 | mObjMgr->DisplayNT(tokens[0], tokens[1], tokens[2], ph, tokens[3], tokens[4], ph,
|
---|
| 701 | tokens[5], tokens[6], tokens[7], false);
|
---|
[333] | 702 | }
|
---|
[293] | 703 | else if (kw == "nt3d") {
|
---|
[486] | 704 | if (tokens.size() < 7) {
|
---|
| 705 | cout << "Usage: nt3d nameobj varx vary varz [errx erry errz wt label opt]" << endl;
|
---|
| 706 | return(0);
|
---|
[293] | 707 | }
|
---|
[486] | 708 | while (tokens.size() < 10) tokens.push_back("");
|
---|
| 709 | mObjMgr->DisplayNT(tokens[0], tokens[1], tokens[2], tokens[3], tokens[4], tokens[5],
|
---|
| 710 | tokens[6], tokens[7], tokens[8], tokens[9], true);
|
---|
| 711 | }
|
---|
[1525] | 712 | else if (kw == "vecplot") {
|
---|
| 713 | if (tokens.size() < 2) {
|
---|
| 714 | cout << "Usage: vecplot nameVecX nameVecY [opt]" << endl;
|
---|
[2275] | 715 | return(0);
|
---|
[1525] | 716 | }
|
---|
| 717 | while (tokens.size() < 3) tokens.push_back("");
|
---|
| 718 | mObjMgr->DisplayVector(tokens[0], tokens[1], tokens[2]);
|
---|
| 719 | }
|
---|
[293] | 720 |
|
---|
[339] | 721 | // Obsolete : ne pas virer SVP, cmv 26/7/99
|
---|
[293] | 722 | else if (kw == "gfd2d") {
|
---|
[339] | 723 | cout<<"----- gfd2d OBSOLETE: utilisez nt2d -----"<<endl;
|
---|
[293] | 724 | if(tokens.size()<2)
|
---|
| 725 | {cout<<"Usage: gfd2d nomobj numvarx erreur=(x y xy) opt"<<endl;
|
---|
| 726 | return(0);}
|
---|
| 727 | string numvary = "";
|
---|
| 728 | string err = "";
|
---|
[1971] | 729 | string opt = "next";
|
---|
[293] | 730 | if(tokens.size()>2) err = tokens[2];
|
---|
| 731 | if(tokens.size()>3) opt = tokens[3];
|
---|
| 732 | mObjMgr->DisplayGFD(tokens[0],tokens[1],numvary,err,opt);
|
---|
| 733 | }
|
---|
| 734 | else if (kw == "gfd3d") {
|
---|
[339] | 735 | cout<<"----- gfd3d OBSOLETE: utilisez nt3d -----"<<endl;
|
---|
[293] | 736 | if(tokens.size()<3)
|
---|
| 737 | {cout<<"Usage: gfd3d nameobj numvarx numvary erreur=(x y z xy xz yz xyz) opt"<<endl;
|
---|
| 738 | return(0);}
|
---|
| 739 | string err = "";
|
---|
[1971] | 740 | string opt = "next";
|
---|
[293] | 741 | if(tokens.size()>3) err = tokens[3];
|
---|
| 742 | if(tokens.size()>4) opt = tokens[4];
|
---|
| 743 | mObjMgr->DisplayGFD(tokens[0],tokens[1],tokens[2],err,opt);
|
---|
| 744 | }
|
---|
| 745 |
|
---|
| 746 | // >>>>>>>>>>> Trace de fonctions
|
---|
| 747 | else if ( (kw == "func") ) {
|
---|
[1938] | 748 | if(tokens.size()<3) {cout<<"Usage: func f(x) xmin xmax [npt opt]"<<endl; return(0);}
|
---|
| 749 | int np = 100;
|
---|
| 750 | double xmin=0., xmax=1.;
|
---|
| 751 | string opt = "", nom = "";
|
---|
| 752 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 753 | if (tokens.size() > 3) np = atoi(tokens[3].c_str());
|
---|
[293] | 754 | if (tokens.size() > 4) opt = tokens[4];
|
---|
[333] | 755 | mObjMgr->GetServiceObj()->PlotFunc(tokens[0], nom, xmin, xmax, np, opt);
|
---|
[293] | 756 | }
|
---|
[326] | 757 | else if ( (kw == "funcff") ) {
|
---|
[1938] | 758 | if (tokens.size()<4) {cout<<"Usage: funcff C-filename f(x)-name xmin xmax [npt opt]"<<endl; return(0);}
|
---|
| 759 | int np = 100;
|
---|
| 760 | double xmin=0., xmax=1.;
|
---|
| 761 | string opt = "", nom = "";
|
---|
| 762 | xmin = atof(tokens[2].c_str()); xmax = atof(tokens[3].c_str());
|
---|
| 763 | if(tokens.size()>4) np = atoi(tokens[4].c_str());
|
---|
| 764 | if(tokens.size()>5) opt = tokens[5];
|
---|
[333] | 765 | mObjMgr->GetServiceObj()->PlotFuncFrCFile(tokens[0], tokens[1], nom, xmin, xmax, np, opt);
|
---|
[326] | 766 | }
|
---|
[293] | 767 | else if ( (kw == "func2d") ) {
|
---|
| 768 | if (tokens.size() < 7) {
|
---|
[357] | 769 | cout << "Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty [opt]" << endl;
|
---|
[293] | 770 | return(0);
|
---|
| 771 | }
|
---|
| 772 | int npx, npy;
|
---|
[333] | 773 | double xmin, xmax;
|
---|
| 774 | double ymin, ymax;
|
---|
[293] | 775 | npx = npy = 50;
|
---|
| 776 | xmin = 0.; xmax = 1.;
|
---|
| 777 | ymin = 0.; ymax = 1.;
|
---|
| 778 | npx = atoi(tokens[3].c_str());
|
---|
| 779 | npy = atoi(tokens[6].c_str());
|
---|
| 780 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 781 | ymin = atof(tokens[4].c_str()); ymax = atof(tokens[5].c_str());
|
---|
[357] | 782 | string opt = "";
|
---|
[293] | 783 | if (tokens.size() > 7) opt = tokens[7];
|
---|
[333] | 784 | string nom = "";
|
---|
| 785 | mObjMgr->GetServiceObj()->PlotFunc2D(tokens[0], nom, xmin, xmax, ymin, ymax, npx, npy, opt);
|
---|
[293] | 786 | }
|
---|
[326] | 787 | else if ( (kw == "func2dff") ) {
|
---|
| 788 | if (tokens.size() < 8) {
|
---|
[357] | 789 | cout << "Usage: func2d C-filename F(x,y)-name xmax nptx ymin ymax npty [opt]" << endl;
|
---|
[326] | 790 | return(0);
|
---|
| 791 | }
|
---|
| 792 | int npx, npy;
|
---|
[333] | 793 | double xmin, xmax;
|
---|
| 794 | double ymin, ymax;
|
---|
[326] | 795 | npx = npy = 50;
|
---|
| 796 | xmin = 0.; xmax = 1.;
|
---|
| 797 | ymin = 0.; ymax = 1.;
|
---|
| 798 | npx = atoi(tokens[4].c_str());
|
---|
| 799 | npy = atoi(tokens[7].c_str());
|
---|
| 800 | xmin = atof(tokens[2].c_str()); xmax = atof(tokens[3].c_str());
|
---|
| 801 | ymin = atof(tokens[5].c_str()); ymax = atof(tokens[6].c_str());
|
---|
[357] | 802 | string opt = "";
|
---|
[326] | 803 | if (tokens.size() > 8) opt = tokens[8];
|
---|
[333] | 804 | string nom = "";
|
---|
| 805 | mObjMgr->GetServiceObj()->PlotFunc2DFrCFile(tokens[0], tokens[1], nom, xmin, xmax, ymin, ymax, npx, npy, opt);
|
---|
[326] | 806 | }
|
---|
[293] | 807 |
|
---|
| 808 | // >>>>>>>>>>> Trace d'expressions de N_Tuple, StarList, etc ...
|
---|
| 809 | else if (kw == "plot2d" ) {
|
---|
[357] | 810 | if (tokens.size() < 3) {
|
---|
| 811 | cout << "Usage: plot2d nameobj expx expy [expcut opt loop_par]" << endl;
|
---|
[293] | 812 | return(0);
|
---|
| 813 | }
|
---|
[357] | 814 | string errx = ""; string erry = "";
|
---|
| 815 | if (tokens.size() < 4) tokens.push_back("1");
|
---|
| 816 | while (tokens.size() < 6) tokens.push_back("");
|
---|
| 817 | srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],errx,erry,tokens[3],tokens[4],tokens[5]);
|
---|
| 818 | }
|
---|
| 819 |
|
---|
| 820 | else if (kw == "plot2de" ) { // Plot2D avec les erreurs
|
---|
| 821 | if (tokens.size() < 5) {
|
---|
| 822 | cout << "Usage: plot2de nameobj expx expy experrx experry [expcut opt loop_par]" << endl;
|
---|
| 823 | return(0);
|
---|
[293] | 824 | }
|
---|
[357] | 825 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 826 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 827 | srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],tokens[3],tokens[4],
|
---|
| 828 | tokens[5],tokens[6],tokens[7]);
|
---|
[293] | 829 | }
|
---|
| 830 |
|
---|
[357] | 831 | else if (kw == "plot2dw" ) { // Plot2d avec poids
|
---|
| 832 | if (tokens.size() < 4) {
|
---|
| 833 | cout << "Usage: plot2dw nomobj expx expy expwt [expcut opt loop_par]" << endl;
|
---|
[333] | 834 | return(0);
|
---|
| 835 | }
|
---|
[357] | 836 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 837 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 838 | srvo->DisplayPoints2DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
|
---|
[333] | 839 | }
|
---|
[357] | 840 | else if (kw == "plot3d" ) {
|
---|
| 841 | if (tokens.size() < 4) {
|
---|
| 842 | cout << "Usage: plot3d nomobj expx expy expz [expcut opt loop_par]" << endl;
|
---|
[293] | 843 | return(0);
|
---|
| 844 | }
|
---|
[357] | 845 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 846 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 847 | srvo->DisplayPoints3D(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
|
---|
[293] | 848 | }
|
---|
| 849 |
|
---|
| 850 | else if (kw == "projh1d" ) {
|
---|
[357] | 851 | if (tokens.size() < 3) {
|
---|
| 852 | cout << "Usage: projh1d nomh1 nomobj expx [expwt expcut opt loop_par]" << endl;
|
---|
[293] | 853 | return(0);
|
---|
| 854 | }
|
---|
[357] | 855 | if (tokens.size() < 4) tokens.push_back("1.");
|
---|
| 856 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 857 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 858 | srvo->ProjectH1(tokens[1], tokens[2], tokens[3], tokens[4], tokens[0], tokens[5], tokens[6] );
|
---|
[293] | 859 | }
|
---|
| 860 |
|
---|
[357] | 861 |
|
---|
| 862 | // Projection dans histogrammes
|
---|
[293] | 863 | else if (kw == "projh2d" ) {
|
---|
[357] | 864 | if (tokens.size() < 4) {
|
---|
| 865 | cout << "Usage: projh2d nomh2 nomobj expx expy [expwt expcut opt loop_par]" << endl;
|
---|
[293] | 866 | return(0);
|
---|
| 867 | }
|
---|
[357] | 868 | if (tokens.size() < 5) tokens.push_back("1.");
|
---|
| 869 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 870 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 871 | srvo->ProjectH2(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
|
---|
| 872 | tokens[6], tokens[7] );
|
---|
[293] | 873 | }
|
---|
| 874 |
|
---|
| 875 | else if (kw == "projprof" ) {
|
---|
[357] | 876 | if (tokens.size() < 4) {
|
---|
| 877 | cout << "Usage: projprof nomprof nomobj expx expy [expwt expcut opt loop_par]" << endl;
|
---|
[293] | 878 | return(0);
|
---|
| 879 | }
|
---|
[357] | 880 | if (tokens.size() < 5) tokens.push_back("1.");
|
---|
| 881 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 882 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 883 | srvo->ProjectHProf(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
|
---|
[1091] | 884 | tokens[6], tokens[7] );
|
---|
[357] | 885 | }
|
---|
[293] | 886 |
|
---|
[357] | 887 | // Projection dans vector/matrix
|
---|
| 888 | else if (kw == "fillvec" ) {
|
---|
| 889 | if (tokens.size() < 4) {
|
---|
| 890 | cout << "Usage: fillvec nomvec nomobj expx expv [expcut opt loop_par]" << endl;
|
---|
| 891 | return(0);
|
---|
| 892 | }
|
---|
| 893 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 894 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 895 | srvo->FillVect(tokens[1], tokens[2], tokens[3], tokens[4], tokens[0], tokens[5], tokens[6] );
|
---|
[293] | 896 | }
|
---|
| 897 |
|
---|
[357] | 898 | else if (kw == "fillmtx" ) {
|
---|
| 899 | if (tokens.size() < 5) {
|
---|
| 900 | cout << "Usage: fillmtx nommtx nomobj expx expy expv [expcut opt loop_par]" << endl;
|
---|
| 901 | return(0);
|
---|
| 902 | }
|
---|
| 903 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 904 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 905 | srvo->FillMatx(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
|
---|
| 906 | tokens[6], tokens[7] );
|
---|
| 907 | }
|
---|
| 908 |
|
---|
| 909 | // Remplissage NTuple,Vecteurs, ... , boucle de NTuple
|
---|
[447] | 910 | else if (kw == "ntfrascii" ) {
|
---|
| 911 | if(tokens.size() < 2) {
|
---|
| 912 | cout<<"Usage: ntfrascii nt_name file_name [def_init_val]"<<endl;
|
---|
| 913 | return(0);
|
---|
| 914 | }
|
---|
| 915 | double def_val = 0.;
|
---|
| 916 | if(tokens.size()>=3) def_val = atof(tokens[2].c_str());
|
---|
| 917 | srvo->NtFromASCIIFile(tokens[0],tokens[1],def_val);
|
---|
| 918 | }
|
---|
| 919 |
|
---|
[2263] | 920 | #ifndef SANS_EVOLPLANCK
|
---|
| 921 | /* Lecture matrice/vecteur depuis fichier ASCII */
|
---|
| 922 | else if ((kw == "mtxfrascii") || (kw == "vecfrascii") ) {
|
---|
| 923 | if(tokens.size() < 2) {
|
---|
[2289] | 924 | cout<<"Usage: mtxfrascii/vecfrascii mtx/vec_name file_name [CommLine Separator]"<<endl;
|
---|
[2263] | 925 | return(0);
|
---|
| 926 | }
|
---|
| 927 | TMatrix<r_8> mtx;
|
---|
| 928 | TVector<r_8> vec;
|
---|
| 929 | FILE* fip = fopen(tokens[1].c_str(), "r");
|
---|
| 930 | if (fip == NULL) {
|
---|
| 931 | cout << "vec/mtxfrascii: can not open file " << tokens[1] << endl;
|
---|
| 932 | return(0);
|
---|
| 933 | }
|
---|
| 934 | fclose(fip);
|
---|
| 935 | ifstream is(tokens[1].c_str());
|
---|
| 936 | sa_size_t nr, nc;
|
---|
[2289] | 937 | char clm = '#';
|
---|
| 938 | string sep = " \t";
|
---|
| 939 | if (tokens.size()>2) clm = tokens[2][0];
|
---|
| 940 | if (tokens.size()>3) sep = tokens[3];
|
---|
[2263] | 941 | if (kw == "mtxfrascii") {
|
---|
[2289] | 942 | mtx.ReadASCII(is, nr, nc, clm, sep.c_str());
|
---|
[2263] | 943 | mObjMgr->AddObj(mtx, tokens[0]);
|
---|
| 944 | cout << "mtxfrascii: TMatrix<r_8> " << tokens[0] << " read from file "
|
---|
| 945 | << tokens[1] << endl;
|
---|
| 946 | }
|
---|
| 947 | else {
|
---|
[2289] | 948 | vec.ReadASCII(is, nr, nc, clm, sep.c_str());
|
---|
[2263] | 949 | mObjMgr->AddObj(vec, tokens[0]);
|
---|
| 950 | cout << "vecfrascii: TVector<r_8> " << tokens[0] << " read from file "
|
---|
| 951 | << tokens[1] << endl;
|
---|
| 952 | }
|
---|
| 953 | }
|
---|
[2268] | 954 | else if (kw == "arrtoascii") {
|
---|
| 955 | if(tokens.size() < 2) {
|
---|
| 956 | cout<<"Usage: arrtoascii array_name file_name "<<endl;
|
---|
| 957 | return(0);
|
---|
| 958 | }
|
---|
| 959 |
|
---|
| 960 | AnyDataObj* obj;
|
---|
| 961 | obj = mObjMgr->GetObj(tokens[0]);
|
---|
| 962 | if(obj == NULL) {
|
---|
| 963 | cerr << "arrtoascii Error , No such object " << tokens[0] << endl;
|
---|
| 964 | return(0);
|
---|
| 965 | }
|
---|
| 966 | BaseArray* ba = dynamic_cast<BaseArray *>(obj);
|
---|
| 967 | if(ba == NULL) {
|
---|
| 968 | cerr << "arrtoascii Error " << tokens[0] << " not a BaseArray ! " << endl;
|
---|
| 969 | return(0);
|
---|
| 970 | }
|
---|
| 971 | ofstream os(tokens[1].c_str());
|
---|
| 972 | ba->WriteASCII(os);
|
---|
| 973 | cout << "arrtoascii: Array " << tokens[0] << " written to file " << tokens[1] << endl;
|
---|
| 974 | }
|
---|
| 975 |
|
---|
[2263] | 976 | #endif
|
---|
| 977 |
|
---|
[293] | 978 | else if (kw == "fillnt" ) {
|
---|
[357] | 979 | if (tokens.size() < 5) {
|
---|
| 980 | cout << "Usage: fillnt nameobj expx expy expz expt [expcut ntname loop_par]" << endl;
|
---|
[293] | 981 | return(0);
|
---|
| 982 | }
|
---|
[357] | 983 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 984 | srvo->FillNT(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5], tokens[6], tokens[7] );
|
---|
[293] | 985 | }
|
---|
| 986 |
|
---|
[333] | 987 | else if (kw == "ntloop" ) {
|
---|
| 988 | if (tokens.size() < 3) {
|
---|
[357] | 989 | cout << "Usage: ntloop nameobj fname funcname [ntname loop_par ]" << endl;
|
---|
[333] | 990 | return(0);
|
---|
| 991 | }
|
---|
[357] | 992 | while (tokens.size() < 5) tokens.push_back("");
|
---|
| 993 | srvo->FillNTFrCFile(tokens[0],tokens[1], tokens[2], tokens[3], tokens[4]);
|
---|
[333] | 994 | }
|
---|
| 995 |
|
---|
| 996 | else if (kw == "ntexpcfile" ) {
|
---|
| 997 | if (tokens.size() < 3) {
|
---|
| 998 | cout << "Usage: ntexpcfile nameobj fname funcname" << endl;
|
---|
| 999 | return(0);
|
---|
| 1000 | }
|
---|
| 1001 | srvo->PrepareNTExpressionCFile(tokens[0],tokens[1], tokens[2]);
|
---|
| 1002 | }
|
---|
| 1003 |
|
---|
[357] | 1004 | else if (kw == "exptovec" ) {
|
---|
| 1005 | if (tokens.size() < 3) {
|
---|
| 1006 | cout << "Usage: exptovec nomvec nameobj expx [expcut opt loop_par]" << endl;
|
---|
[293] | 1007 | return(0);
|
---|
| 1008 | }
|
---|
[357] | 1009 | while (tokens.size() < 6) tokens.push_back("");
|
---|
| 1010 | srvo->ExpressionToVector(tokens[1],tokens[2],tokens[3],tokens[0],tokens[4],tokens[5]);
|
---|
[293] | 1011 | }
|
---|
| 1012 |
|
---|
| 1013 | else if (kw == "fillgd1" ) {
|
---|
| 1014 | if (tokens.size() < 5) {
|
---|
[357] | 1015 | cout << "Usage: fillgd1 nomgfd nomobj expx expy experry [expcut loop_par] " << endl;
|
---|
[293] | 1016 | return(0);
|
---|
| 1017 | }
|
---|
[357] | 1018 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 1019 | if (tokens.size() < 7) tokens.push_back("");
|
---|
[293] | 1020 | string expy = "";
|
---|
[357] | 1021 | srvo->FillGFD(tokens[1],tokens[2], expy, tokens[3], tokens[4], tokens[5], tokens[0]);
|
---|
[293] | 1022 | }
|
---|
| 1023 |
|
---|
| 1024 | else if (kw == "fillgd2" ) {
|
---|
| 1025 | if (tokens.size() < 6) {
|
---|
[357] | 1026 | cout << "Usage: fillgd2 nomgfd nomobj expx expy expz experrz [expcut loop_par]" << endl;
|
---|
[293] | 1027 | return(0);
|
---|
| 1028 | }
|
---|
[357] | 1029 | if (tokens.size() < 7) tokens.push_back("1");
|
---|
| 1030 | if (tokens.size() < 8) tokens.push_back("");
|
---|
| 1031 | srvo->FillGFD(tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6], tokens[0], tokens[7]);
|
---|
[293] | 1032 | }
|
---|
| 1033 |
|
---|
[1067] | 1034 | else if (kw == "gdfrvec" ) {
|
---|
| 1035 | if(tokens.size()<3) {
|
---|
| 1036 | cout<<"Usage: gdfrvec namegfd X Y\n"
|
---|
| 1037 | <<" gdfrvec namegfd X Y"
|
---|
| 1038 | <<" gdfrvec namegfd X Y ! EY\n"
|
---|
| 1039 | <<" gdfrvec namegfd X Y Z\n"
|
---|
| 1040 | <<" gdfrvec namegfd X Y Z EZ"<<endl;
|
---|
| 1041 | return(0);
|
---|
| 1042 | }
|
---|
| 1043 | while(tokens.size()<5) tokens.push_back("!");
|
---|
| 1044 | srvo->FillGFDfrVec(tokens[0],tokens[1],tokens[2],tokens[3],tokens[4]);
|
---|
| 1045 | }
|
---|
[293] | 1046 |
|
---|
[2180] | 1047 | // >>>>>>>>>>> Calcul d'expression arithmetique
|
---|
| 1048 | else if ( (kw == "eval") ) {
|
---|
| 1049 | if(tokens.size()<2)
|
---|
| 1050 | {cout<<"Usage: eval resultvarname arithmetic expression...."<<endl; return(0);}
|
---|
| 1051 | string expval = "";
|
---|
| 1052 | for(unsigned int i=1;i<tokens.size();i++) expval+=tokens[i];
|
---|
| 1053 | string resultvarname = "";
|
---|
| 1054 | if(isalpha(tokens[0][0])) resultvarname=tokens[0];
|
---|
| 1055 | mObjMgr->GetServiceObj()->ExpVal(expval,resultvarname);
|
---|
| 1056 | }
|
---|
[293] | 1057 |
|
---|
| 1058 | else {
|
---|
| 1059 | cerr << "PIABaseExecutor::Do() Erreur - Commande " << kw << " inconuue ! " << endl;
|
---|
| 1060 | return(-1);
|
---|
| 1061 | }
|
---|
| 1062 |
|
---|
| 1063 | return(0);
|
---|
| 1064 | }
|
---|
| 1065 |
|
---|
[388] | 1066 | // Fonction pour enregistrer le Help des Widgets et Windows de piapp
|
---|
| 1067 | static void RegisterPIGraphicsHelp(PIACmd* piac);
|
---|
| 1068 |
|
---|
[293] | 1069 | /* --Methode-- */
|
---|
| 1070 | void PIABaseExecutor::RegisterCommands()
|
---|
| 1071 | {
|
---|
| 1072 | string kw, usage;
|
---|
| 1073 | kw = "loadmodule";
|
---|
| 1074 | usage = "To load and initialize modules \n Usage: loadmodule fnameso modulename";
|
---|
| 1075 | usage += "\n Related commands: link";
|
---|
[330] | 1076 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[293] | 1077 | kw = "link";
|
---|
| 1078 | usage = "Dynamic linking of compiled user functions \n Usage: link fnameso f1 [f2 f3]";
|
---|
| 1079 | usage += "\n fnameso: Shared-object file name, f1,f2,f3 : User function names ";
|
---|
[1276] | 1080 | usage += "\n Related commands: call loadmodule linkff2";
|
---|
[330] | 1081 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[1276] | 1082 | kw = "linkff2";
|
---|
| 1083 | usage = "Dynamic linking of compiled user functions (Set 2)\n Usage: linkff2 fnameso f1 [f2 f3]";
|
---|
| 1084 | usage += "\n fnameso: Shared-object file name, f1,f2,f3 : User function names ";
|
---|
| 1085 | usage += "\n Related commands: call link loadmodule";
|
---|
| 1086 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[293] | 1087 | kw = "call";
|
---|
| 1088 | usage = "Dynamically linked user function call \n Usage: call userf [arg1 arg2 ...]";
|
---|
| 1089 | usage += "\n User function : f(vector<string>& args)";
|
---|
| 1090 | usage += "\n Related commands: link";
|
---|
[330] | 1091 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[293] | 1092 |
|
---|
| 1093 | kw = "zone";
|
---|
[384] | 1094 | usage = "To Divide the Graphic window \n Usage: zone [nx=1 ny=1]";
|
---|
[388] | 1095 | usage += "\n Related commands: newwin";
|
---|
[330] | 1096 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 1097 | kw = "newwin";
|
---|
[2243] | 1098 | usage = "To Create a New Graphic window, with zones \n";
|
---|
| 1099 | usage += " Window size can be specified \n";
|
---|
| 1100 | usage += " Usage: newwin [nx ny [sizeX sizeY]] ";
|
---|
[388] | 1101 | usage += "\n Related commands: zone";
|
---|
[330] | 1102 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 1103 | kw = "stacknext";
|
---|
| 1104 | usage = "Displays the next widget on stack window \n Usage: stacknext";
|
---|
[330] | 1105 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 1106 |
|
---|
[553] | 1107 | kw = "graphicatt";
|
---|
| 1108 | usage = "To change default graphic options \n Usage: graphicatt att_list \n";
|
---|
[1971] | 1109 | usage += "att_list=def back to default values, Example: gratt 'red circlemarker5'";
|
---|
[293] | 1110 | usage += "\n ------------------ Graphic attribute list ------------------ \n";
|
---|
[1642] | 1111 | usage += ">> Colors: defcol black white grey red blue green yellow \n";
|
---|
| 1112 | usage += " magenta cyan turquoise navyblue orange siennared purple \n";
|
---|
| 1113 | usage += " limegreen gold violet violetred blueviolet darkviolet \n";
|
---|
[293] | 1114 | usage += ">> Lines: defline normalline thinline thickline dashedline thindashedline \n";
|
---|
| 1115 | usage += " thickdashedline dottedline thindottedline thickdottedline \n";
|
---|
[1569] | 1116 | usage += ">> Font Att: deffontatt normalfont boldfont italicfont bolditalicfont \n";
|
---|
| 1117 | usage += " smallfont smallboldfont smallitalicfont smallbolditalicfont \n";
|
---|
| 1118 | usage += " bigfont bigboldfont bigitalicfont bigbolditalicfont \n";
|
---|
| 1119 | usage += " hugefont hugeboldfont hugeitalicfont hugebolditalicfont \n";
|
---|
| 1120 | usage += ">> Font Names: deffont courierfont helveticafont timesfont symbolfont \n";
|
---|
[2263] | 1121 | usage += ">> Marker: dotmarker<T> plusmarker<T> crossmarker<T> circlemarker<T> \n";
|
---|
[293] | 1122 | usage += " fcirclemarker<T> boxmarker<T> fboxmarker<T> trianglemarker<T> \n";
|
---|
| 1123 | usage += " ftrianglemarker<T> starmarker<T> fstarmarker<T> \n";
|
---|
[2263] | 1124 | usage += " with <T> = 1 3 5 7 .. 15 , Example fboxmarker5 , plusmarker9 ... \n";
|
---|
| 1125 | usage += ">> ArrowMarker: basicarrow<T> trianglearrow<T> ftrianglearrow<T> \n";
|
---|
| 1126 | usage += " arrowshapedarrow<T> farrowshapedarrow<T> \n";
|
---|
| 1127 | usage += " with <T> = 5 7 .. 15 , Example trianglearrow7 ... \n";
|
---|
[1126] | 1128 | usage += ">> ColorTables: defcmap grey32 invgrey32 colrj32 colbr32 \n";
|
---|
| 1129 | usage += " grey128 invgrey128 colrj128 colbr128 \n";
|
---|
| 1130 | usage += " midas_pastel midas_heat midas_rainbow3 midas_bluered\n";
|
---|
| 1131 | usage += " midas_bluewhite midas_redwhite \n";
|
---|
| 1132 | usage += " rainbow16 \n";
|
---|
[1504] | 1133 | usage += " revcmap : This flag reverses ColorMap indexing \n";
|
---|
[2118] | 1134 | usage += ">> ZoomFactors zoomxN zoomx1 zoomx2 zoomx3 ... \n";
|
---|
| 1135 | usage += " (image display) zoom/N zoom/2 zoom/3 zoom/4 ...\n";
|
---|
[1971] | 1136 | usage += ">> imagecenter=ix,iy -> Position the image in widget \n";
|
---|
[2121] | 1137 | usage += ">> lut=ltyp,min,max -> Sets LUT type and min/max for image display \n";
|
---|
[2118] | 1138 | usage += " (ltyp=lin/log/sqrt/square) \n";
|
---|
[2350] | 1139 | usage += ">> Axes / Axe labels / LogScale / xylimits / defdrrect \n";
|
---|
| 1140 | usage += " See setaxesatt command \n";
|
---|
[546] | 1141 | usage += ">> stat/nostat or stats/nostats -> Toggle statistic display flag \n";
|
---|
[1131] | 1142 | usage += ">> title/notitle or tit/notit -> Toggle Auto AddTitle flag \n";
|
---|
[548] | 1143 | usage += ">> DisplayWindow: next same win stack inset \n";
|
---|
[1971] | 1144 | usage += " Related commands: setaxesatt setinsetlimits ";
|
---|
[330] | 1145 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 1146 |
|
---|
[1971] | 1147 | kw = "setaxesatt";
|
---|
| 1148 | usage = "To set default axes attributes \n Usage: setaxesatt att_list \n";
|
---|
[2217] | 1149 | usage += "Color/Line/Font attributes and axes attributes \n";
|
---|
[2350] | 1150 | usage += ">> Axes: axesnone stdaxes=defaxes=boxaxes boxaxesgrid \n";
|
---|
| 1151 | usage += " fineaxes fineaxesgrid centeredaxes finecenteredaxes \n";
|
---|
[2118] | 1152 | usage += " centeredaxesgrid finecenteredaxesgrid \n";
|
---|
[2350] | 1153 | usage += " grid nogrid labels nolabels \n";
|
---|
| 1154 | usage += " ticks noticks minorticks nominorticks \n";
|
---|
| 1155 | usage += " extticks intticks extintticks \n";
|
---|
| 1156 | usage += " nbticks=X_NTicks,Y_NTicks \n";
|
---|
| 1157 | usage += " tickslen=MajTickLenFrac,MinTickLenFrac \n";
|
---|
| 1158 | usage += ">> Axe labels font size: fixedfontsize/autofontsize=fszf \n";
|
---|
| 1159 | usage += " autofontsize=fsizef: Font size computed automatically \n";
|
---|
[2121] | 1160 | usage += " fixedfontsize: Use font size attribute (BaseDrawer) \n";
|
---|
[1971] | 1161 | usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
|
---|
| 1162 | usage += ">> xylimits=xmin,xmax,ymin,ymax -> Forces X-Y limits in 2-D plots \n";
|
---|
[2296] | 1163 | usage += ">> defdrrect=xmin,xmax,ymin,ymax -> Defines drawing rectangle 2-D plots \n";
|
---|
| 1164 | usage += " The rectangle is defined as a fraction of the widget size\n";
|
---|
[331] | 1165 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1166 |
|
---|
[548] | 1167 | kw = "setinsetlimits";
|
---|
| 1168 | usage = "Define the display rectangle for drawers added as insets \n";
|
---|
| 1169 | usage += " over existing graphic objects - limits expressed as fraction \n";
|
---|
| 1170 | usage += " graphic object size (0. .. 1.) Xmax at right, YMax top. ";
|
---|
| 1171 | usage += " Usage: setinsetlimits xmin xmax ymin ymax";
|
---|
[558] | 1172 | usage += "\n Related commands: graphicatt /inset";
|
---|
[548] | 1173 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1174 |
|
---|
[2243] | 1175 | kw = "drpanel";
|
---|
| 1176 | usage = "Creates a new 2D drawing zone for addtext, addline \n";
|
---|
| 1177 | usage += " Usage: drpanel xmin xmax ymin ymax [GrAtt] [Name]";
|
---|
| 1178 | usage += "\n Related commands: addtext addline addrect addcirc ...";
|
---|
| 1179 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1180 |
|
---|
[349] | 1181 | kw = "addtext";
|
---|
| 1182 | usage = "Adds a text string to the current graphic object";
|
---|
[2243] | 1183 | usage += "\n at the specified position (+ color/font/pos/dir attributes) ";
|
---|
[1642] | 1184 | usage += "\n The Base/AxesDrawer is used to handle added text strings" ;
|
---|
[2265] | 1185 | usage += "\n Alt<E> to remove the added element";
|
---|
[2263] | 1186 | usage += "\n Usage: addtext x y TextString [ColFontPosAtt] [fgnc=false/true]";
|
---|
[1642] | 1187 | usage += "\n (use quotes '' for multi word text strings) ";
|
---|
[2263] | 1188 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1189 | usage += "\n Text position/direction attribute: ";
|
---|
| 1190 | usage += "\n horizleft horizcenter horizright";
|
---|
| 1191 | usage += "\n vertbottom vertcenter verttop ";
|
---|
| 1192 | usage += "\n textdirhoriz textdirvertup textdirvertdown ";
|
---|
[2263] | 1193 | usage += "\n Related commands: addctext addline addarrow addrect addfrect";
|
---|
| 1194 | usage += "\n addcirc addfcirc addarc addfrac addpoly addfpoly settitle graphicatt";
|
---|
[2265] | 1195 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[349] | 1196 |
|
---|
[2263] | 1197 | kw = "addctext";
|
---|
| 1198 | usage = "Adds a composite text string with superscript and subscripts ";
|
---|
| 1199 | usage += "\n at the specified position (+ color/font/pos/dir attributes) ";
|
---|
| 1200 | usage += "\n Usage: addctext x y Text sUp sDown [ColFontPosAtt] [UpDownFontAtt] [fgnc]";
|
---|
| 1201 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
| 1202 | usage += "\n Related commands: addtext addline addrect ...";
|
---|
| 1203 | usage += "\n (See command addtext and graphicatt for more details)";
|
---|
[2265] | 1204 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2263] | 1205 |
|
---|
[1642] | 1206 | kw = "addline";
|
---|
| 1207 | usage = "Adds a line to the current graphic object";
|
---|
[2243] | 1208 | usage += "\n at the specified position (+ graphic attribute)";
|
---|
[1642] | 1209 | usage += "\n The Base/AxesDrawer is used to handle added lines";
|
---|
[2265] | 1210 | usage += "\n Alt<E> to remove the added element";
|
---|
[2263] | 1211 | usage += "\n Usage: addline x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
|
---|
| 1212 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1213 | usage += "\n Related commands: addarrow addtext addrect addfrect ";
|
---|
[2263] | 1214 | usage += "\n addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1215 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[1642] | 1216 |
|
---|
[2243] | 1217 | kw = "addarrow";
|
---|
| 1218 | usage = "Adds an arrow to the current graphic object";
|
---|
| 1219 | usage += "\n at the specified position (+ graphic attribute)";
|
---|
| 1220 | usage += "\n The Base/AxesDrawer is used to handle added lines";
|
---|
[2265] | 1221 | usage += "\n Alt<E> to remove the added element";
|
---|
[2263] | 1222 | usage += "\n Usage: addarrow x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
|
---|
| 1223 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1224 | usage += "\n Related commands: addline addtext addrect addfrect ";
|
---|
[2263] | 1225 | usage += "\n addmarker addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1226 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2263] | 1227 | kw = "addarrow_nc";
|
---|
[2243] | 1228 |
|
---|
[1642] | 1229 | kw = "addrect";
|
---|
| 1230 | usage = "Adds a rectangle to the current graphic object";
|
---|
[2243] | 1231 | usage += "\n between the specified positions (+ graphic attribute)";
|
---|
[1642] | 1232 | usage += "\n The Base/AxesDrawer is used to handle added rectangle";
|
---|
[2265] | 1233 | usage += "\n Alt<E> to remove added element";
|
---|
[2263] | 1234 | usage += "\n Usage: addrect x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
|
---|
| 1235 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1236 | usage += "\n Related commands: addtext addline addarrow addfrect";
|
---|
[2263] | 1237 | usage += "\n addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1238 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[1642] | 1239 |
|
---|
| 1240 | kw = "addfrect";
|
---|
| 1241 | usage = "Adds a filled rectangle to the current graphic object";
|
---|
[2243] | 1242 | usage += "\n between the specified positions (+ graphic attribute)";
|
---|
[1642] | 1243 | usage += "\n The Base/AxesDrawer is used to handle added rectangle";
|
---|
[2265] | 1244 | usage += "\n Alt<E> to remove added element";
|
---|
[2263] | 1245 | usage += "\n Usage: addfrect x1 y1 x2 y2 [GraphicAtt] [fgnc=false/true]";
|
---|
| 1246 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1247 | usage += "\n Related commands: addtext addline addarrow addrect";
|
---|
[2263] | 1248 | usage += "\n addcirc addfcirc addpoly addfpoly graphicatt";
|
---|
[2265] | 1249 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[1642] | 1250 |
|
---|
[2243] | 1251 | kw = "addmarker";
|
---|
| 1252 | usage = "Adds a marker to the current graphic object";
|
---|
| 1253 | usage += "\n at the specified position (+ graphic attribute)";
|
---|
| 1254 | usage += "\n The Base/AxesDrawer is used to handle added circles";
|
---|
[2265] | 1255 | usage += "\n Alt<E> to remove added element";
|
---|
[2263] | 1256 | usage += "\n Usage: addmarker xpos ypos [GraphicAtt] [fgnc=false/true]";
|
---|
| 1257 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1258 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
[2263] | 1259 | usage += "\n addcirc addfcirc addarc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1260 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2243] | 1261 |
|
---|
[1642] | 1262 | kw = "addcirc";
|
---|
| 1263 | usage = "Adds a circle to the current graphic object";
|
---|
[2243] | 1264 | usage += "\n with the specified center and radius (+ graphic attribute)";
|
---|
[1642] | 1265 | usage += "\n The Base/AxesDrawer is used to handle added circles";
|
---|
[2265] | 1266 | usage += "\n Alt<E> to remove added element";
|
---|
[2263] | 1267 | usage += "\n Usage: addcirc xcenter ycenter radius [GraphicAtt] [fgnc=false/true]";
|
---|
| 1268 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1269 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
[2263] | 1270 | usage += "\n addfcirc addarc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1271 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[1642] | 1272 |
|
---|
| 1273 | kw = "addfcirc";
|
---|
| 1274 | usage = "Adds a filled circle to the current graphic object";
|
---|
[2243] | 1275 | usage += "\n with the specified center and radius (+ graphic attribute)";
|
---|
[1642] | 1276 | usage += "\n The Base/AxesDrawer is used to handle added circles";
|
---|
[2265] | 1277 | usage += "\n Alt<E> to remove added element";
|
---|
[2263] | 1278 | usage += "\n Usage: addcirc xcenter ycenter radius [GraphicAtt] [fgnc=false/true]";
|
---|
| 1279 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1280 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
[2263] | 1281 | usage += "\n addcirc addarc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1282 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[1642] | 1283 |
|
---|
[2265] | 1284 | kw = "addarca";
|
---|
| 1285 | usage = "Adds an arc to the current graphic object";
|
---|
| 1286 | usage += "\n defined by the circle (center+radius), start angle and angular extension";
|
---|
| 1287 | usage += "\n Angles are specified in degrees";
|
---|
| 1288 | usage += "\n Usage: addarca xc yc r a0deg dadeg [GraphicAtt] [fgnc=false/true]";
|
---|
| 1289 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
| 1290 | usage += "\n Related commands: addtext addline addfarca addarc ...";
|
---|
| 1291 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
| 1292 |
|
---|
| 1293 | kw = "addfarca";
|
---|
| 1294 | usage = "Adds a filled arc to the current graphic object";
|
---|
| 1295 | usage += "\n defined by the circle (center+radius), start angle and angular extension";
|
---|
| 1296 | usage += "\n Angles are specified in degrees";
|
---|
| 1297 | usage += "\n Usage: addfarca xc yc r a0deg dadeg [GraphicAtt] [fgnc=false/true]";
|
---|
| 1298 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
| 1299 | usage += "\n Related commands: addtext addline addarca addarc ...";
|
---|
| 1300 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
| 1301 |
|
---|
[2243] | 1302 | kw = "addarc";
|
---|
| 1303 | usage = "Adds an arc to the current graphic object";
|
---|
| 1304 | usage += "\n defined by 3 points (+ graphic attribute)";
|
---|
| 1305 | usage += "\n The Base/AxesDrawer is used to handle added arcs";
|
---|
[2265] | 1306 | usage += "\n Alt<E> to remove the added element";
|
---|
[2263] | 1307 | usage += "\n Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]";
|
---|
| 1308 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1309 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
[2265] | 1310 | usage += "\n addcirc addfcirc addfarc addarca addpoly addfpoly graphicatt";
|
---|
| 1311 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2243] | 1312 |
|
---|
| 1313 | kw = "addfarc";
|
---|
| 1314 | usage = "Adds a filled arc to the current graphic object";
|
---|
| 1315 | usage += "\n defined by 3 points (+ graphic attribute)";
|
---|
| 1316 | usage += "\n The Base/AxesDrawer is used to handle added arcs";
|
---|
[2265] | 1317 | usage += "\n Alt<E> to remove added element";
|
---|
[2263] | 1318 | usage += "\n Usage: addarc x1 y1 x2 y2 x3 y3 [GraphicAtt] [fgnc=false/true]";
|
---|
| 1319 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
[2243] | 1320 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
[2263] | 1321 | usage += "\n addcirc addfcirc addfarc addpoly addfpoly graphicatt";
|
---|
[2265] | 1322 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2243] | 1323 |
|
---|
[2263] | 1324 | kw = "addpoly";
|
---|
| 1325 | usage = "Adds a polyline/polygon to the current graphic object";
|
---|
| 1326 | usage += "\n Usage: addploy 'x1,y1 x2,y2 x3,y3 ...' [GraphicAtt] [fgnc=false/true]";
|
---|
| 1327 | usage += "\n Coordinates specified as pairs x,y in a single word (use simple or double quotes";
|
---|
| 1328 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
| 1329 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
| 1330 | usage += "\n addcirc addfcirc addfarc graphicatt";
|
---|
[2265] | 1331 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2263] | 1332 |
|
---|
| 1333 | kw = "addfpoly";
|
---|
| 1334 | usage = "Adds a filled polygon to the current graphic object";
|
---|
| 1335 | usage += "\n Usage: addploy 'x1,y1 x2,y2 x3,y3 ...' [GraphicAtt] [fgnc=false/true]";
|
---|
| 1336 | usage += "\n Coordinates specified as pairs x,y in a single word (use simple or double quotes";
|
---|
| 1337 | usage += "\n if fgnc==true : Normalized 0..1 coordinates specification (def=false)";
|
---|
| 1338 | usage += "\n Related commands: addtext addline addarrow addfrect addfrect";
|
---|
| 1339 | usage += "\n addcirc addfcirc addfarc graphicatt";
|
---|
[2265] | 1340 | mpiac->RegisterCommand(kw, usage, this, "Graphic-Elts");
|
---|
[2263] | 1341 |
|
---|
[1131] | 1342 | kw = "settitle";
|
---|
[1642] | 1343 | usage = "Set the title string (top title / bottom title) for the current graphic object";
|
---|
| 1344 | usage += "\n Usage: settitle TopTitle [BottomTitle] [fontAtt]";
|
---|
[1131] | 1345 | usage += "\n Related commands: addtext graphicatt";
|
---|
| 1346 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1347 |
|
---|
[2165] | 1348 | kw = "addtitle";
|
---|
| 1349 | usage = "Set the title string (top title / bottom title) \n";
|
---|
| 1350 | usage += " alias for settitle ";
|
---|
| 1351 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1352 |
|
---|
| 1353 | kw = "setaxelabels";
|
---|
| 1354 | usage = "Set the X and Y axis labels for the current 2D graphic object \n";
|
---|
| 1355 | usage += "\n Usage: setaxelabels xLabel yLabel [ColorFntAtt]";
|
---|
| 1356 | usage += "\n Related commands: settitle addtext graphicatt";
|
---|
| 1357 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1358 |
|
---|
| 1359 | kw = "addaxelabels";
|
---|
| 1360 | usage = "Set the X and Y axis labels for the current 2D graphic object";
|
---|
| 1361 | usage += " alias for setaxelabels ";
|
---|
| 1362 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 1363 |
|
---|
[388] | 1364 | RegisterPIGraphicsHelp(mpiac);
|
---|
| 1365 |
|
---|
[293] | 1366 | kw = "openfits";
|
---|
[2263] | 1367 | usage = "Loads a FITS file into an appropriate object \n Usage: openfits filename";
|
---|
[293] | 1368 | usage += "\n Related commands: savefits openppf";
|
---|
[330] | 1369 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 1370 | kw = "savefits";
|
---|
| 1371 | usage = "Save an object into a FITS file \n Usage: savefits nameobj filename";
|
---|
[2132] | 1372 | usage += "\n Related commands: openfits saveobjs saveall";
|
---|
[330] | 1373 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 1374 | kw = "openppf";
|
---|
| 1375 | usage = "Reads all objects from a PPF file \n Usage: openppf filename";
|
---|
| 1376 | usage += "\n Related commands: saveall openfits";
|
---|
[330] | 1377 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[2132] | 1378 | kw = "saveppf";
|
---|
| 1379 | usage = "Saves objects with names matching a pattern into a\n";
|
---|
| 1380 | usage += " PPF file (pattern: x?y*) - Alias saveppf\n";
|
---|
| 1381 | usage += "Usage: saveppf nameobjpattern filename";
|
---|
| 1382 | usage += "\n Related commands: saveobjs saveall openppf savefits";
|
---|
| 1383 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[333] | 1384 | kw = "saveobjs";
|
---|
[2132] | 1385 | usage = "Saves objects with names matching a pattern into a\n";
|
---|
| 1386 | usage += " PPF file (pattern: x?y*) - Alias saveppf\n";
|
---|
[1068] | 1387 | usage += "Usage: saveobjs nameobjpattern filename";
|
---|
[2132] | 1388 | usage += "\n Related commands: saveppf saveall openppf savefits";
|
---|
[333] | 1389 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 1390 | kw = "saveall";
|
---|
| 1391 | usage = "Saves all objects into a PPF file \n Usage: saveall filename";
|
---|
[333] | 1392 | usage += "\n Related commands: saveobj openppf savefits";
|
---|
[330] | 1393 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[449] | 1394 | kw = "ntfrascii";
|
---|
| 1395 | usage = "Fills an existing NTuple from ASCII table file";
|
---|
| 1396 | usage += "\n Usage: ntfrascii nt_name file_name [def_init_val]";
|
---|
| 1397 | usage += "\n Related commands: ntloop fillnt ";
|
---|
| 1398 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[2263] | 1399 | #ifndef SANS_EVOLPLANCK
|
---|
| 1400 | kw = "mtxfrascii";
|
---|
| 1401 | usage = "Reads a matrix from an ASCII file (TMatrix<r_8>)";
|
---|
[2289] | 1402 | usage += "\n Usage: mtxfrascii mtx_name file_name [CommChar Separator]";
|
---|
[2268] | 1403 | usage += "\n Related commands: arrtoascii vecfrascii ntfrascii ";
|
---|
[2263] | 1404 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
| 1405 | kw = "vecfrascii";
|
---|
[2268] | 1406 | usage = "Reads a vector from an ASCII file (TVector<r_8>)";
|
---|
[2263] | 1407 | usage += "\n Usage: vecfrascii vec_name file_name";
|
---|
[2289] | 1408 | usage += "\n Related commands: arrtoascii mtxfrascii ntfrascii [CommChar Separator]";
|
---|
[2263] | 1409 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[2268] | 1410 | kw = "arrtoascii";
|
---|
| 1411 | usage = "Writes an array (TArray<T>) to an ASCII file ";
|
---|
| 1412 | usage += "\n Usage: arrtoascii array_name file_name";
|
---|
| 1413 | usage += "\n Related commands: mtxfrascii vecfrascii ntfrascii ";
|
---|
| 1414 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[2263] | 1415 | #endif
|
---|
[293] | 1416 |
|
---|
| 1417 | kw = "print";
|
---|
| 1418 | usage = "Prints an object \n Usage: print nameobj";
|
---|
[330] | 1419 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 1420 |
|
---|
[333] | 1421 | kw = "mkdir";
|
---|
| 1422 | usage = "Create a directory";
|
---|
[344] | 1423 | usage += "\n Usage: mkdir dirname [true]";
|
---|
| 1424 | usage += "\n if second argument==true, the directory's KeepOld attribute is set to true";
|
---|
[463] | 1425 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 1426 | kw = "rmdir";
|
---|
| 1427 | usage = "Removes an empty directory";
|
---|
| 1428 | usage += "\n Usage: remove dirname";
|
---|
[463] | 1429 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[2132] | 1430 | kw = "setdiratt";
|
---|
| 1431 | usage = "Sets directory attributes";
|
---|
| 1432 | usage += "\n Usage: setdiratt dirname KeepOldFlag(=true/false)";
|
---|
| 1433 | usage += "\n KeepOldFlag=true Object with the same name is moved to old";
|
---|
| 1434 | usage += "\n when adding objects";
|
---|
| 1435 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 1436 | kw = "cd";
|
---|
| 1437 | usage = "Change current directory";
|
---|
| 1438 | usage += "\n Usage: cd [dirname]";
|
---|
[463] | 1439 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 1440 | kw = "pwd";
|
---|
| 1441 | usage = "Prints current directory";
|
---|
| 1442 | usage += "\n Usage: pwd";
|
---|
[463] | 1443 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 1444 | kw = "listdirs";
|
---|
| 1445 | usage = "Prints the list of directories";
|
---|
| 1446 | usage += "\n Usage: listdirs [patt=*] \n patt : * , ? ";
|
---|
[463] | 1447 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[295] | 1448 | kw = "listobjs";
|
---|
[333] | 1449 | usage = "Prints the list of objects (Alias: ls)";
|
---|
| 1450 | usage += "\n Usage: listobjs [patt=*] \n patt : /*/x?y* ... ";
|
---|
[463] | 1451 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 1452 | kw = "rename";
|
---|
[333] | 1453 | usage = "Rename an object (Alias: mv) \n Usage: rename nameobj namenew";
|
---|
[2132] | 1454 | usage += "\n Related commands: mv del delobjs";
|
---|
[463] | 1455 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[2132] | 1456 | kw = "mv";
|
---|
| 1457 | usage = "Rename an object (Alias: rename) \n Usage: mv nameobj namenew";
|
---|
| 1458 | usage += "\n Related commands: rename del delobjs";
|
---|
| 1459 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[463] | 1460 | kw = "copy";
|
---|
[2132] | 1461 | usage = "Copy objects (Alias cp) \n";
|
---|
[463] | 1462 | usage +=" Usage: copy name_from name_to";
|
---|
[2132] | 1463 | usage += "\n Related commands: cp new...";
|
---|
[2176] | 1464 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[2132] | 1465 | kw = "cp";
|
---|
| 1466 | usage = "Copy objects (Alias copy) \n";
|
---|
| 1467 | usage +=" Usage: cp name_from name_to";
|
---|
| 1468 | usage += "\n Related commands: copy new...";
|
---|
[463] | 1469 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 1470 | kw = "del";
|
---|
[1655] | 1471 | usage = "Deletes an object (Alias: rm) \n Usage: del nameobj [nameobj2 ...]";
|
---|
[2132] | 1472 | usage += "\n Related commands: rm delobjs rename";
|
---|
[463] | 1473 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[2132] | 1474 | kw = "rm";
|
---|
| 1475 | usage = "Deletes an object (Alias: del) \n Usage: rm nameobj [nameobj2 ...]";
|
---|
| 1476 | usage += "\n Related commands: del delobjs rename";
|
---|
| 1477 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 1478 | kw = "delobjs";
|
---|
| 1479 | usage = "Delete a set of objects with names matching a pattern (x?y*)";
|
---|
| 1480 | usage += "\n Usage: delobjs nameobjpattern \n";
|
---|
| 1481 | usage += "\n Related commands: del rename";
|
---|
[463] | 1482 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 1483 |
|
---|
| 1484 | kw = "newh1d";
|
---|
| 1485 | usage = "Creates a 1D histogramm \n Usage: newh1d name xmin xmax nbin";
|
---|
[1035] | 1486 | usage += "\n Related commands: newh2d newprof[e] newnt newgfd ";
|
---|
[333] | 1487 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 1488 | kw = "newh2d";
|
---|
| 1489 | usage = "Creates a 2D histogramm \n Usage: newh2d name xmin xmax nbinx ymin ymax nbiny";
|
---|
[1035] | 1490 | usage += "\n Related commands: newh1d newprof[e] newnt newgfd ";
|
---|
[333] | 1491 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 1492 | kw = "newprof";
|
---|
| 1493 | usage = "Creates a profile histogramm \n Usage: newprof name xmin xmax nbin [ymin ymax]";
|
---|
[1035] | 1494 | usage += "\n Errors represent the data spread in the X bin ";
|
---|
| 1495 | usage += "\n Related commands: newh1d newh2d newprofe newnt newgfd ";
|
---|
[333] | 1496 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[1035] | 1497 | kw = "newprofe";
|
---|
| 1498 | usage = "Creates a profile histogramm \n Usage: newprofe name xmin xmax nbin [ymin ymax]";
|
---|
| 1499 | usage += "\n Errors represent the error on the data mean in the X bin ";
|
---|
| 1500 | usage += "\n Related commands: newh1d newh2d newprof newnt newgfd ";
|
---|
| 1501 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[447] | 1502 | kw = "newnt";
|
---|
| 1503 | usage = "Creates a ntuple \n Usage: newnt name v1 v2 v3 .. vn";
|
---|
| 1504 | usage += "\n newnt name nvar";
|
---|
[1035] | 1505 | usage += "\n Related commands: newh1d newh2d newprof[e] newgfd ";
|
---|
[447] | 1506 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 1507 | kw = "newgfd";
|
---|
| 1508 | usage = "Creates GeneralFit Data object \n Usage: newgfd nvar nalloc [errx(0/1)]";
|
---|
[1035] | 1509 | usage += "\n Related commands: newh1d newh2d newprof[e] newnt ";
|
---|
[333] | 1510 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
| 1511 | kw = "newvec";
|
---|
[357] | 1512 | usage = "Creates (and optionaly fills) a vector \n Usage: newvec name size [f(i) [dopt] ] ";
|
---|
[2305] | 1513 | usage += "\n Related commands: newmtx line2vec";
|
---|
[357] | 1514 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[333] | 1515 | kw = "newmtx";
|
---|
[357] | 1516 | usage = "Creates (and optionaly fills) a matrix \n";
|
---|
[1917] | 1517 | usage +=" Usage: newmtx name sizeX(Col) sizeY(Lines) [f(i,j) [dopt] ] ";
|
---|
[333] | 1518 | usage += "\n Related commands: newvec";
|
---|
[357] | 1519 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[2305] | 1520 | kw = "line2vec";
|
---|
| 1521 | usage = "Creates a vector from the line \n";
|
---|
| 1522 | usage += " Usage: line2vec vecname v0 v1 v2 ... \n";
|
---|
| 1523 | usage += " Related commands: newvec line2nt";
|
---|
| 1524 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
| 1525 | kw = "line2nt";
|
---|
| 1526 | usage = "Fills (append) an NTuple from the line content \n";
|
---|
| 1527 | usage += " Usage: line2nt ntname col0 col1 ... \n";
|
---|
| 1528 | usage += " Related commands: newnt line2vec ntline2var ntcol2var";
|
---|
| 1529 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
| 1530 | kw = "vec2var";
|
---|
| 1531 | usage = "Vector content to an interpreter variable varname = 'v0 v1 v2 ...' \n";
|
---|
| 1532 | usage += " Usage: line2vec vecname varname [LoopParam start:end[:step] ]\n";
|
---|
| 1533 | usage += " Related commands: line2vec ntline2var";
|
---|
| 1534 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
| 1535 | kw = "ntline2var";
|
---|
| 1536 | usage = "Object NTupleInterface line to an interpreter variable \n";
|
---|
| 1537 | usage += " Usage: ntline2var objname line_number varname \n";
|
---|
| 1538 | usage += " Related commands: vec2var ntcol2var";
|
---|
| 1539 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
| 1540 | kw = "ntcol2var";
|
---|
| 1541 | usage = "Object NTupleInterface column to an interpreter variable \n";
|
---|
| 1542 | usage += " Usage: ntline2var objname column_number varname [LoopParam start:end[:step] ] \n";
|
---|
| 1543 | usage += " Related commands: vec2var ntline2var";
|
---|
| 1544 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 1545 |
|
---|
| 1546 | kw = "disp";
|
---|
| 1547 | usage = "Displays an object \n Usage: disp nameobj [graphic_attributes]";
|
---|
[1525] | 1548 | usage += "\n Related commands: surf nt2d nt3d vecplot";
|
---|
[330] | 1549 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[295] | 1550 | kw = "imag";
|
---|
| 1551 | usage = "Displays an object as an image \n Usage: imag nameobj [graphic_attributes]";
|
---|
[1525] | 1552 | usage += "\n Related commands: disp surf nt2d nt3d vecplot";
|
---|
[330] | 1553 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1554 | kw = "surf";
|
---|
| 1555 | usage = "Displays an object as a 3D surface \n Usage: surf nameobj [graphic_attributes]";
|
---|
[1525] | 1556 | usage += "\n Related commands: disp nt2d nt3d vecplot";
|
---|
[330] | 1557 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1558 | kw = "nt2d";
|
---|
[486] | 1559 | usage = "Displays Points (X-Y) [with error-bar / Weight / Label ] from an NTuple ";
|
---|
| 1560 | usage += "\n Usage : nt2d nameobj varx vary [errx erry wt label graphic_attributes]";
|
---|
[1525] | 1561 | usage += "\n Related commands: disp surf nt3d gfd2d vecplot";
|
---|
[330] | 1562 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1563 | kw = "nt3d";
|
---|
[486] | 1564 | usage = "Displays 3D-Points (X-Y-Z) [with error-bars / Weight / Label ] from an NTuple ";
|
---|
| 1565 | usage += "\n Usage : nt3d nameobj varx vary varz [errx erry errz wt label graphic_attributes]";
|
---|
| 1566 | usage += "\n Related commands: disp surf nt2d gfd3d ";
|
---|
[330] | 1567 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[1525] | 1568 | kw = "vecplot";
|
---|
| 1569 | usage = "Displays Points (X-Y) with coordinates defined by two vectors ";
|
---|
| 1570 | usage += "\n Usage : vecplot nameVecX nameVecY [graphic_attributes]";
|
---|
| 1571 | usage += "\n Related commands: disp nt2d ";
|
---|
| 1572 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[339] | 1573 |
|
---|
| 1574 | // Ceci est maintenant obsolete, on garde pour info.
|
---|
[293] | 1575 | kw = "gfd2d";
|
---|
| 1576 | usage = "Displays Points (X-Y) with error-bars from a GeneralFit Data ";
|
---|
| 1577 | usage += "\n Usage : gfd2d nameobj numvarx erreur=(x y xy) [graphic_attributes]";
|
---|
[339] | 1578 | usage += "\n Related commands: gfd3d nt2d nt3d ";
|
---|
| 1579 | usage += "\n ----- OBSOLETE: utilisez nt2d -----";
|
---|
[330] | 1580 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1581 | kw = "gfd3d";
|
---|
| 1582 | usage = "Displays 3D-Points (X-Y-Z) with error-bars from a GeneralFit Data ";
|
---|
| 1583 | usage += "\n Usage : gfd3d nameobj numvarx numvary erreur=(x y z xy xz yz xyz) [graphic_attributes]";
|
---|
| 1584 | usage += "\n Related commands: gfd2d nt2d nt3d ";
|
---|
[339] | 1585 | usage += "\n ----- OBSOLETE: utilisez nt3d -----";
|
---|
[330] | 1586 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1587 |
|
---|
| 1588 | kw = "func";
|
---|
| 1589 | usage = "Displays a function y=f(x) (Fills a vector with function values)";
|
---|
[1938] | 1590 | usage += "\n Usage: func f(x) xmin xmax [npt graphic_attributes]";
|
---|
[326] | 1591 | usage += "\n Related commands: funcff func2d func2dff ";
|
---|
[330] | 1592 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[326] | 1593 | kw = "funcff";
|
---|
| 1594 | usage = "Displays a function y=f(x) from a C-file (Fills a vector with function values)";
|
---|
[1938] | 1595 | usage += "\n Usage: funcff C-FileName FunctionName xmin xmax [npt graphic_attributes]";
|
---|
[326] | 1596 | usage += "\n Related commands: func func2d func2dff ";
|
---|
[330] | 1597 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[293] | 1598 | kw = "func2d";
|
---|
| 1599 | usage = "Displays a function z=f(x,y) (Fills a matrix with function values)";
|
---|
| 1600 | usage += "\n Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty [graphic_attributes]";
|
---|
| 1601 | usage += "\n Related commands: func";
|
---|
[330] | 1602 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[326] | 1603 | kw = "func2dff";
|
---|
| 1604 | usage = "Displays a function z=f(x,y) from a C-file (Fills a matrix with function values)";
|
---|
| 1605 | usage += "\n Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes]";
|
---|
| 1606 | usage += "\n Related commands: func funcff func2d ";
|
---|
[330] | 1607 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[293] | 1608 |
|
---|
[357] | 1609 | kw = "ObjectExpressions";
|
---|
| 1610 | usage = "Any mathematical expression (math.h) with object variables can be used";
|
---|
| 1611 | usage += "\n ------ Object Variable names (double) -------- ";
|
---|
[1548] | 1612 | usage += "\n- NTuple: ntuple variable names";
|
---|
| 1613 | usage += "\n- Histo1D/HProf: i,x,val,err";
|
---|
| 1614 | usage += "\n- Histo2D: i,j,x,y,val,err";
|
---|
| 1615 | usage += "\n- Vector/Matrix: n,r,c,val,real,imag,mod,phas";
|
---|
| 1616 | usage += "\n- TArray: n,x,y,z,t,u,val,real,imag,mod,phas";
|
---|
| 1617 | usage += "\n- Image: i,j,x,y,val(=pix)";
|
---|
| 1618 | usage += "\n- GeneralFitData: x0,ex0 x1,ex1 ... xn,exn y,ey ok";
|
---|
| 1619 | usage += "\n- LocalMap/SphereThetaPhi/SphereHEALPix: ";
|
---|
| 1620 | usage += "\n- i,k,val,real,imag,mod,phas,teta,phi";
|
---|
| 1621 | usage += "\n- FITS Binary/ASCII table: fits column names";
|
---|
[2128] | 1622 | #ifdef SANS_EVOLPLANCK
|
---|
| 1623 | usage += "\n ------ Eros Variable names (double) -------- ";
|
---|
| 1624 | usage += "\n- StarList: x,y,flux,fond,pixmax,flags,";
|
---|
| 1625 | usage += "\n- xref,yref,fluxref,fondref,pixmaxref";
|
---|
| 1626 | #endif
|
---|
[1548] | 1627 | usage += "\n ------ Other parameters -------- ";
|
---|
[357] | 1628 | usage += "\nLoop parameters can be specified as I1[:I2[:DI]] for(int i=I1; i<I2; i+=DI)";
|
---|
| 1629 | usage += "\nThe default Cut() expression in true (=1) for all";
|
---|
[1548] | 1630 | usage += "\n\n Related commands: plot2d plot2de plot2dw plot3d ";
|
---|
[357] | 1631 | usage += "\n projh1d projh2d projprof fillvec fillmtx ";
|
---|
| 1632 | usage += "\n fillnt fillgd1 fillgd2 ntloop exptovec ... ";
|
---|
| 1633 | mpiac->RegisterCommand(kw, usage, NULL, "Expr. Plotting");
|
---|
[293] | 1634 | kw = "plot2d";
|
---|
| 1635 | usage = "Plots (2D) Y=g(Object) vs. X=f(Object) --- Object Variable names (double) :";
|
---|
[357] | 1636 | usage += "\n Usage: plot2d nameobj f_X() g_Y() [f_Cut() graphic_attributes loop_param]";
|
---|
| 1637 | usage += "\n Related commands: plot2de plot2dw plot3d ObjectExpressions ...";
|
---|
[330] | 1638 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1639 | kw = "plot2de";
|
---|
| 1640 | usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with error bars eX/Y=f_ErrX/Y(Object) ";
|
---|
| 1641 | usage += "\n Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() graphic_attributes loop_param]";
|
---|
| 1642 | usage += "\n Related commands: plot2d plot2dw plot3d ObjectExpressions ...";
|
---|
| 1643 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[333] | 1644 | kw = "plot2dw";
|
---|
| 1645 | usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with Weight W=h(Object) ";
|
---|
[357] | 1646 | usage += "\n Usage: plot2dw nameobj f_X() g_Y() h_Wt() [Cut() graphic_attributes loop_param]";
|
---|
| 1647 | usage += "\n Related commands: plot2d plot2dw plot3d ObjectExpressions ...";
|
---|
[333] | 1648 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1649 | kw = "plot3d";
|
---|
| 1650 | usage = "Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) vs ";
|
---|
[357] | 1651 | usage += "\n Usage: plot3d nameobj f_X() g_Y() h_Z() [Cut() graphic_attributes loop_param]";
|
---|
| 1652 | usage += "\n Related commands: plot2d plot2dw plot2de plot3d ObjectExpressions ...";
|
---|
[330] | 1653 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1654 |
|
---|
| 1655 | kw = "projh1d";
|
---|
| 1656 | usage = "Projects X=f(Object) with weight WT=h(Object) into a 1D histogram ";
|
---|
[357] | 1657 | usage += "\n Usage: projh1d nameh1d nameobj f_X() [h_WT()=1. Cut() graphic_attributes loop_param]";
|
---|
[293] | 1658 | usage += "\n Histo1D nameh1d is created if necessary ";
|
---|
[357] | 1659 | usage += "\n Related commands: projh2d projprof ObjectExpressions ...";
|
---|
[330] | 1660 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1661 | kw = "projh2d";
|
---|
| 1662 | usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a 2D histogram ";
|
---|
[357] | 1663 | usage += "\n Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
|
---|
[293] | 1664 | usage += "\n Histo2D nameh2d is created if necessary ";
|
---|
[357] | 1665 | usage += "\n Related commands: projh1d projprof ObjectExpressions ...";
|
---|
[330] | 1666 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1667 | kw = "projprof";
|
---|
| 1668 | usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram ";
|
---|
[709] | 1669 | usage += "\n Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
|
---|
[293] | 1670 | usage += "\n HProf nameprof is created if necessary ";
|
---|
[357] | 1671 | usage += "\n Related commands: projh1d projh2d ObjectExpressions ...";
|
---|
[330] | 1672 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1673 | kw = "fillvec";
|
---|
| 1674 | usage = "Fills a Vector V((int)(f_X(Object)+0.5)) = h_V(Object) ";
|
---|
| 1675 | usage += "\n Usage: fillvec namevec nameobj f_X() h_V() [Cut() graphic_attributes loop_param]";
|
---|
| 1676 | usage += "\n Related commands: fillmtx fillnt ObjectExpressions ...";
|
---|
| 1677 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
| 1678 | kw = "fillmtx";
|
---|
| 1679 | usage = "Fills a Matrix M(Line=g_Y(Object)+0.5, Col=f_X(Object)+0.5)) = h_V(Object) ";
|
---|
| 1680 | usage += "\n Usage: fillvec namevec nameobj f_X() g_Y() h_V() [Cut() graphic_attributes loop_param]";
|
---|
| 1681 | usage += "\n Related commands: fillvec fillnt ObjectExpressions ...";
|
---|
| 1682 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1683 |
|
---|
| 1684 | kw = "fillnt";
|
---|
| 1685 | usage = "Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))";
|
---|
[357] | 1686 | usage += "\n Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param]";
|
---|
[333] | 1687 | usage += "\n Related commands: ntloop plot2d projh1d projh2d projprof ";
|
---|
[357] | 1688 | usage += "\n Related commands: fillvec fillmtx ntloop exptovec fillgd1 fillgd2 ObjectExpressions ...";
|
---|
[330] | 1689 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1690 |
|
---|
[333] | 1691 | kw = "ntloop";
|
---|
| 1692 | usage = "Loops over an Object NTupleInterface calling a function from a C-file \n";
|
---|
| 1693 | usage += "and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))";
|
---|
[357] | 1694 | usage += "\n Usage: ntloop nameobj CFileName FuncName [NtupleName loop_param]";
|
---|
| 1695 | usage += "\n Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 exptovec ObjectExpressions ...";
|
---|
[333] | 1696 | usage += "\n Related commands: ntexpcfile fillnt";
|
---|
| 1697 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1698 |
|
---|
[333] | 1699 | kw = "ntexpcfile";
|
---|
| 1700 | usage = "Creates a C-File with declarations suitable to be used for ntloop";
|
---|
| 1701 | usage += "\n Usage: ntexpcfile nameobj CFileName FuncName ";
|
---|
| 1702 | usage += "\n Related commands: ntloop";
|
---|
| 1703 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
| 1704 |
|
---|
[357] | 1705 | kw = "exptovec";
|
---|
[293] | 1706 | usage = "Creates and Fills a Vector with X=f(Object)";
|
---|
[357] | 1707 | usage += "\n Usage: exptovec namevec nameobj f_X() [Cut() graphic_attributes loop_param]";
|
---|
| 1708 | usage += "\n Related commands: ntloop fillnt ObjectExpressions ...";
|
---|
[330] | 1709 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1710 | kw = "fillgd1";
|
---|
| 1711 | usage = "Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), ErrY=h(...))";
|
---|
[357] | 1712 | usage += "\n Usage: fillgd1 namegfd nameobj f_X() g_Y() h_ErrY() [Cut() loop_param]";
|
---|
| 1713 | usage += "\n Related commands: ntloop fillnt ObjectExpressions ...";
|
---|
[330] | 1714 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1715 | kw = "fillgd2";
|
---|
| 1716 | usage = "Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)";
|
---|
[357] | 1717 | usage += "\n Usage: fillgd1 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() [Cut() loop_param]";
|
---|
| 1718 | usage += "\n Related commands: ntloop fillnt ObjectExpressions ...";
|
---|
[330] | 1719 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[1067] | 1720 | kw = "gdfrvec";
|
---|
| 1721 | usage = "Fills a GeneralFitData with vectors X,Y,Z,EZ";
|
---|
| 1722 | usage += "\n Usage: gdfrvec namegfd X Y";
|
---|
| 1723 | usage += "\n Usage: gdfrvec namegfd X Y ! EY";
|
---|
| 1724 | usage += "\n Usage: gdfrvec namegfd X Y Z";
|
---|
| 1725 | usage += "\n Usage: gdfrvec namegfd X Y Z EZ";
|
---|
| 1726 | usage += "\n Related commands: fillgd1 fillgd2 ...";
|
---|
| 1727 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1728 |
|
---|
[2180] | 1729 |
|
---|
| 1730 | kw = "eval";
|
---|
| 1731 | usage = "Compute arithmetic expression\n";
|
---|
| 1732 | usage += "\n Usage: eval resultvarname arithmetic expression....";
|
---|
| 1733 | usage += "\n resultvarname: store result in variable resultvarname";
|
---|
| 1734 | usage += "\n - If first character is not alphabetic, just print result";
|
---|
| 1735 | usage += "\n arithmetic expression:";
|
---|
| 1736 | usage += "\n ex: x + sqrt(y)+z +3.14 (x,y,z are variables)";
|
---|
| 1737 | usage += "\n ex: $x + sqrt($y)+$z +3.14 (x,y,z are variables)";
|
---|
| 1738 | usage += "\n ex: 360 * M_PI / 180.";
|
---|
| 1739 | mpiac->RegisterCommand(kw, usage, this, "Expr. Arithmetic");
|
---|
| 1740 |
|
---|
[293] | 1741 | }
|
---|
| 1742 |
|
---|
| 1743 | /* --Methode-- */
|
---|
| 1744 | int PIABaseExecutor::LinkUserFuncs(string& fnameso, string& func1, string& func2, string& func3)
|
---|
| 1745 | // string& func4, string& func5)
|
---|
| 1746 | {
|
---|
| 1747 | string cmd;
|
---|
| 1748 |
|
---|
| 1749 | if (dynlink) delete dynlink; dynlink = NULL;
|
---|
| 1750 | usfmap.clear();
|
---|
| 1751 |
|
---|
| 1752 | dynlink = new PDynLinkMgr(fnameso, true);
|
---|
| 1753 | if (dynlink == NULL) {
|
---|
| 1754 | string sn = fnameso;
|
---|
| 1755 | cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur ouverture SO " << sn << endl;
|
---|
| 1756 | return(2);
|
---|
| 1757 | }
|
---|
| 1758 |
|
---|
| 1759 | int nok=0;
|
---|
| 1760 | // on utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++)
|
---|
| 1761 | // DlUserProcFunction f = NULL;
|
---|
| 1762 | DlFunction f = NULL;
|
---|
| 1763 | if ((func1.length() < 1) || (func1 == "-") || (func1 == ".") ) goto fin;
|
---|
| 1764 | // f = (DlUserProcFunction) dlsym(dlhandle, func1.c_str());
|
---|
| 1765 | f = dynlink->GetFunction(func1);
|
---|
| 1766 | if (f) { nok++; usfmap[func1] = f; }
|
---|
| 1767 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func1 << endl;
|
---|
| 1768 |
|
---|
| 1769 | if ((func2.length() < 1) || (func2 == "-") || (func2 == ".") ) goto fin;
|
---|
| 1770 | // f = (DlUserProcFunction) dlsym(dlhandle, func2.c_str());
|
---|
| 1771 | f = dynlink->GetFunction(func2);
|
---|
| 1772 | if (f) { nok++; usfmap[func2] = f; }
|
---|
| 1773 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func2 << endl;
|
---|
| 1774 |
|
---|
| 1775 | if ((func3.length() < 1) || (func3 == "-") || (func3 == ".") ) goto fin;
|
---|
| 1776 | // f = (DlUserProcFunction) dlsym(dlhandle, func3.c_str());
|
---|
| 1777 | f = dynlink->GetFunction(func3);
|
---|
| 1778 | if (f) { nok++; usfmap[func3] = f; }
|
---|
| 1779 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func3 << endl;
|
---|
| 1780 |
|
---|
| 1781 | /* Pb compile g++ 2.7.2
|
---|
| 1782 | if ((func4.length() < 1) || (func4 == "-") || (func4 == ".") ) goto fin;
|
---|
| 1783 | // f = (DlUserProcFunction) dlsym(dlhandle, func4.c_str());
|
---|
| 1784 | f = dynlink->GetFunction(func4);
|
---|
| 1785 | if (f) { nok++; usfmap[func4] = f; }
|
---|
| 1786 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func4 << endl;
|
---|
| 1787 |
|
---|
| 1788 | if ((func5.length() < 1) || (func5 == "-") || (func5 == ".") ) goto fin;
|
---|
| 1789 | // f = (DlUserProcFunction) dlsym(dlhandle, func5.c_str());
|
---|
| 1790 | f = dynlink->GetFunction(func5);
|
---|
| 1791 | if (f) { nok++; usfmap[func5] = f; }
|
---|
| 1792 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func5 << endl;
|
---|
| 1793 | */
|
---|
| 1794 | fin:
|
---|
| 1795 | if (nok < 1) { if (dynlink) delete dynlink; dynlink = NULL; return(3); }
|
---|
| 1796 | else return(0);
|
---|
| 1797 | }
|
---|
| 1798 |
|
---|
[1276] | 1799 | /* --Methode-- */
|
---|
| 1800 | int PIABaseExecutor::LinkUserFuncs2(string& fnameso, string& func1, string& func2, string& func3)
|
---|
| 1801 | {
|
---|
| 1802 | string cmd;
|
---|
| 1803 |
|
---|
| 1804 | if (dynlink2) delete dynlink2; dynlink2 = NULL;
|
---|
| 1805 | usfmap2.clear();
|
---|
| 1806 |
|
---|
| 1807 | dynlink2 = new PDynLinkMgr(fnameso, true);
|
---|
| 1808 | if (dynlink2 == NULL) {
|
---|
| 1809 | string sn = fnameso;
|
---|
| 1810 | cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur ouverture SO " << sn << endl;
|
---|
| 1811 | return(2);
|
---|
| 1812 | }
|
---|
| 1813 |
|
---|
| 1814 | int nok=0;
|
---|
| 1815 | // on utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++)
|
---|
| 1816 | // DlUserProcFunction f = NULL;
|
---|
| 1817 | DlFunction f = NULL;
|
---|
| 1818 | if ((func1.length() < 1) || (func1 == "-") || (func1 == ".") ) goto fin;
|
---|
| 1819 | f = dynlink2->GetFunction(func1);
|
---|
| 1820 | if (f) { nok++; usfmap2[func1] = f; }
|
---|
| 1821 | else cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur linking " << func1 << endl;
|
---|
| 1822 |
|
---|
| 1823 | if ((func2.length() < 1) || (func2 == "-") || (func2 == ".") ) goto fin;
|
---|
| 1824 | f = dynlink2->GetFunction(func2);
|
---|
| 1825 | if (f) { nok++; usfmap2[func2] = f; }
|
---|
| 1826 | else cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur linking " << func2 << endl;
|
---|
| 1827 |
|
---|
| 1828 | if ((func3.length() < 1) || (func3 == "-") || (func3 == ".") ) goto fin;
|
---|
| 1829 | f = dynlink2->GetFunction(func3);
|
---|
| 1830 | if (f) { nok++; usfmap2[func3] = f; }
|
---|
| 1831 | else cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur linking " << func3 << endl;
|
---|
| 1832 |
|
---|
| 1833 | fin:
|
---|
| 1834 | if (nok < 1) { if (dynlink2) delete dynlink2; dynlink2 = NULL; return(3); }
|
---|
| 1835 | else return(0);
|
---|
| 1836 | }
|
---|
| 1837 |
|
---|
[388] | 1838 | /* Nouvelle-Fonction */
|
---|
| 1839 | void RegisterPIGraphicsHelp(PIACmd* piac)
|
---|
| 1840 | {
|
---|
| 1841 | string kw,grp,usage;
|
---|
| 1842 |
|
---|
| 1843 | grp = "Graphics";
|
---|
| 1844 |
|
---|
| 1845 | kw = "PIImage";
|
---|
| 1846 | usage = "Manages the display of a 2-D array (P2DArrayAdapter) as an image \n";
|
---|
| 1847 | usage += "and controls a zoom widget, as well as a global image view widget \n";
|
---|
| 1848 | usage += ">>>> Mouse controls : \n";
|
---|
| 1849 | usage += "o Button-1: Display current coordinates and pixel value\n";
|
---|
| 1850 | usage += " Position the cursor an refresh the zoom widget\n";
|
---|
| 1851 | usage += "o Button-2: Defines an image zone and positions the cursor \n";
|
---|
| 1852 | usage += "o Button-3: Moves the viewed portion of the array inside the window \n";
|
---|
| 1853 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1854 | usage += "o <Alt>R : Refresh display \n";
|
---|
| 1855 | usage += "o <Alt>O : Shows the PIImageTools (image display parameter controls) \n";
|
---|
| 1856 | usage += "o <Alt>G : Show the PIDrawerTools (Graphic attributes of overlayed graphics (Drawers)) \n";
|
---|
| 1857 | usage += "o <Alt>V : Copy/Paste / Text paste at the current cursor position \n";
|
---|
| 1858 | usage += "o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer \n";
|
---|
| 1859 | usage += "o <Alt>X : Show/Hide the Cut Window \n";
|
---|
[2263] | 1860 | usage += "o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) \n";
|
---|
| 1861 | usage += "o <Alt>E : Removes the last added graphic element \n";
|
---|
[2158] | 1862 | usage += "o <Alt>+ or <Cntl>+ : Zoom in \n";
|
---|
| 1863 | usage += "o <Alt>- or <Cntl>- : Zoom out \n";
|
---|
[388] | 1864 | usage += "o Cursor keys : Moves the image cursor \n";
|
---|
| 1865 | piac->RegisterHelp(kw, usage, grp);
|
---|
| 1866 |
|
---|
| 1867 | kw = "PIScDrawWdg";
|
---|
| 1868 | usage = "Manages display of 2-D drawers with interactive zoom \n";
|
---|
| 1869 | usage += ">>>> Mouse controls : \n";
|
---|
| 1870 | usage += "o Button-1: Display current coordinates \n";
|
---|
| 1871 | usage += "o Button-2: Defines a rectangle for zoom \n";
|
---|
| 1872 | usage += "o Button-3: Defines a rectangle for Text-Info (<Alt>I) \n";
|
---|
| 1873 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1874 | usage += "o <Alt>R : Refresh display \n";
|
---|
| 1875 | usage += "o <Alt>O : Displays a specific control window (default: PIDrawerTools) \n";
|
---|
| 1876 | usage += " Specific controls for 2-D histograms \n";
|
---|
| 1877 | usage += "o <Alt>G : Show the PIDrawerTools (Graphic attributes of displayed Drawers) \n";
|
---|
| 1878 | usage += " Drawer 0 manages the axes, as well as the added text \n";
|
---|
| 1879 | usage += "o <Alt>V : Copy/Paste / Text paste at the current position \n";
|
---|
[2263] | 1880 | usage += "o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) \n";
|
---|
| 1881 | usage += "o <Alt>E : Removes the last added graphic element \n";
|
---|
[1134] | 1882 | usage += "o <Alt>I : Shows (or updates) a text info window on the selected rectangle \n";
|
---|
[1911] | 1883 | usage += "o <Alt>M : Activate/Deactivate a measurement cursor on Button-1\n";
|
---|
| 1884 | usage += "o <Alt>L : Deactivate DX,DY print (see below)\n";
|
---|
[1883] | 1885 | usage += ">>>> Mouse + Keyboard controls : \n";
|
---|
| 1886 | usage += "o Button-1 + <Alt>K : Set (reset) the reference point for DX,DY print \n";
|
---|
[388] | 1887 | piac->RegisterHelp(kw, usage, grp);
|
---|
| 1888 |
|
---|
| 1889 | kw = "PIDraw3DWdg";
|
---|
| 1890 | usage = "Manages display of 3-D objects (drawers) \n";
|
---|
| 1891 | usage += ">>>> Mouse controls : \n";
|
---|
| 1892 | usage += "o Button-2: Rotates the observer (camera) around object \n";
|
---|
| 1893 | usage += "o Shift-Button-2: Rotates object with camera fixed \n";
|
---|
| 1894 | usage += " The object rotation mode can be assigned to Button-2 with <Alt>S \n";
|
---|
| 1895 | usage += "o Button-3: Zoom control (Camera distance And/Or view angle) \n";
|
---|
| 1896 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1897 | usage += "o <Alt>R : Resets the 3-D view and refreshes the display \n";
|
---|
| 1898 | usage += "o <Alt>G : Show the PIDrawerTools (Graphic attributes of displayed Drawers) \n";
|
---|
| 1899 | usage += "o <Alt>O : = <Alt>G \n";
|
---|
| 1900 | usage += "o <Alt>V : Copy/Paste / Text paste at the current position (Drawer 0)\n";
|
---|
[2263] | 1901 | usage += "o <Alt>Z : Removes added graphic elements (handled by BaseDrawer - 0) \n";
|
---|
| 1902 | usage += "o <Alt>E : Removes the last added graphic element \n";
|
---|
[388] | 1903 | usage += "o <Alt>A : Activate/Deactivate axes drawing \n";
|
---|
| 1904 | usage += "o <Alt>S : Activate/Deactivate object rotation mode on Button-2 \n";
|
---|
| 1905 | piac->RegisterHelp(kw, usage, grp);
|
---|
| 1906 |
|
---|
| 1907 | kw = "Windows";
|
---|
| 1908 | usage = "Objects can be displayed in different windows, or overlayed on the \n";
|
---|
| 1909 | usage += "previous display. The graphics attributes next,win,stack,same control \n";
|
---|
| 1910 | usage += "the display window. \n";
|
---|
| 1911 | usage += "o GraphicWindow : This is the default mode (gr_att=next)\n";
|
---|
| 1912 | usage += " Graphic windows can be divided int zones. Object is displayed \n";
|
---|
| 1913 | usage += " in the next available position, removing a previously displayed \n";
|
---|
| 1914 | usage += " widget if necessary \n";
|
---|
| 1915 | usage += "o Window : An object is displayed in its own window (gr_att= win) \n";
|
---|
| 1916 | usage += "o StackWindow : multpile widgets can be stacked in a StackWindow (gr_att= stack) \n";
|
---|
| 1917 | usage += " A single widget is displayed a any time. Different widgets in a StackWindow \n";
|
---|
| 1918 | usage += " can be displayed using the stacknext command, as well as the StackTools item \n";
|
---|
| 1919 | usage += " in the Tools menu (from Menubar). An automatic cyclic display mode can also \n";
|
---|
| 1920 | usage += " be activated using the StackTools menu (Blink) \n";
|
---|
[548] | 1921 | usage += "o Most objects can be also be displayed overlayed \n";
|
---|
| 1922 | usage += " on the last displayed widget (gr_att= same) \n";
|
---|
| 1923 | usage += "o The overlay can be on a selected rectangle of the \n";
|
---|
| 1924 | usage += " last displayed widget (gr_att= inset) - See setinsetlimits\n";
|
---|
[553] | 1925 | usage += "\n Related commands: newwin zone stacknext graphicatt setinsetlimits";
|
---|
[388] | 1926 | piac->RegisterHelp(kw, usage, grp);
|
---|
[484] | 1927 |
|
---|
| 1928 | kw = "PIConsole";
|
---|
| 1929 | usage = "Text output area and command editing window (console) \n";
|
---|
| 1930 | usage += ">>>> Mouse controls : \n";
|
---|
| 1931 | usage += "o Button-1: Rectangle selection for copy/paste \n";
|
---|
| 1932 | usage += "o Button-2: Paste text in the command editing line \n";
|
---|
| 1933 | usage += "o Button-3: activate display option menu \n";
|
---|
| 1934 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1935 | usage += "o <Alt>O : activate display option menu \n";
|
---|
| 1936 | usage += "o <Alt>V : Paste text in the command editing line \n";
|
---|
| 1937 | usage += "o <Alt>A : Selection of the whole window for copy \n";
|
---|
| 1938 | usage += "o <Alt>L : Command history (List of command history buffer) \n";
|
---|
| 1939 | usage += "o <Ctl>A : Command editing -> Goto the beginning of line \n";
|
---|
| 1940 | usage += "o <Ctl>E : Command editing -> Goto the end of line \n";
|
---|
| 1941 | usage += "o <Ctl>K : Command editing -> Clear to the end of line \n";
|
---|
| 1942 | usage += "o <Ctl>C : Command editing -> Clear the line \n";
|
---|
| 1943 | usage += "o Cursor left,right : Command editing -> Move cursor \n";
|
---|
| 1944 | usage += "o Cursor Up,Down : recall command from history buffer \n";
|
---|
| 1945 | usage += "o Backspace,Del : Command editing \n";
|
---|
| 1946 | usage += "o <Return>,<Enter> : Execute command \n";
|
---|
| 1947 | piac->RegisterHelp(kw, usage, grp);
|
---|
[388] | 1948 | }
|
---|