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