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