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