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