[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"
|
---|
| 11 |
|
---|
| 12 | #include "pistdimgapp.h"
|
---|
| 13 | #include "nobjmgr.h"
|
---|
[326] | 14 | #include "servnobjm.h"
|
---|
[293] | 15 |
|
---|
| 16 | #include "histos.h"
|
---|
| 17 | #include "histos2.h"
|
---|
| 18 | #include "hisprof.h"
|
---|
| 19 | #include "ntuple.h"
|
---|
| 20 | #include "generaldata.h"
|
---|
[769] | 21 |
|
---|
| 22 | #ifdef SANS_EVOLPLANCK
|
---|
[333] | 23 | #include "cvector.h"
|
---|
[769] | 24 | #else
|
---|
| 25 | #include "tvector.h"
|
---|
| 26 | #endif
|
---|
[293] | 27 |
|
---|
| 28 |
|
---|
| 29 | /* --Methode-- */
|
---|
| 30 | PIABaseExecutor::PIABaseExecutor(PIACmd* piac, NamedObjMgr* omg, PIStdImgApp* app)
|
---|
| 31 | {
|
---|
| 32 | mpiac = piac;
|
---|
| 33 | mObjMgr = omg;
|
---|
| 34 | mImgApp = app;
|
---|
[312] | 35 | dynlink = NULL;
|
---|
[1276] | 36 | dynlink2 = NULL;
|
---|
[293] | 37 | RegisterCommands();
|
---|
| 38 | }
|
---|
| 39 |
|
---|
| 40 | PIABaseExecutor::~PIABaseExecutor()
|
---|
| 41 | {
|
---|
[1276] | 42 | if (dynlink) delete dynlink;
|
---|
| 43 | if (dynlink2) delete dynlink2;
|
---|
[293] | 44 | }
|
---|
| 45 |
|
---|
| 46 |
|
---|
| 47 |
|
---|
| 48 | /* --Methode-- */
|
---|
[1268] | 49 | int PIABaseExecutor::Execute(string& kw, vector<string>& tokens, string& toks)
|
---|
[293] | 50 | {
|
---|
[333] | 51 | Services2NObjMgr* srvo = mObjMgr->GetServiceObj();
|
---|
[293] | 52 | // >>>>> Chargement de modules
|
---|
| 53 | if (kw == "loadmodule") {
|
---|
| 54 | if (tokens.size() < 2) { cout << "Usage: loadmodule fnameso modulename" << endl; return(0); }
|
---|
| 55 | mpiac->LoadModule(tokens[0], tokens[1]);
|
---|
| 56 | }
|
---|
| 57 | // >>>>>>>>>>> Fenetre graphique , changement d'attributs graphiques
|
---|
| 58 | else if (kw == "zone") {
|
---|
[384] | 59 | while (tokens.size() < 2) tokens.push_back("1");
|
---|
[293] | 60 | int nx, ny;
|
---|
| 61 | nx = ny = 1;
|
---|
| 62 | nx = atoi(tokens[0].c_str()); ny = atoi(tokens[1].c_str());
|
---|
| 63 | mObjMgr->SetGraphicWinZone(nx, ny, false);
|
---|
| 64 | }
|
---|
| 65 | else if (kw == "newwin") {
|
---|
[1451] | 66 | int nx=1, ny=1;
|
---|
| 67 | //if(tokens.size() < 2) { cout << "Usage: newwin nx ny" << endl; return(0); }
|
---|
| 68 | if(tokens.size() > 0) nx = atoi(tokens[0].c_str());
|
---|
| 69 | if(tokens.size() > 1) ny = atoi(tokens[1].c_str());
|
---|
[293] | 70 | mObjMgr->SetGraphicWinZone(nx, ny, true);
|
---|
| 71 | }
|
---|
| 72 | else if (kw == "stacknext") mImgApp->StackWinNext();
|
---|
[553] | 73 | else if (kw == "graphicatt") {
|
---|
| 74 | if (tokens.size() < 1) { cout << "Usage: graphicatt attributes_list (att=def->defaut)" << endl; return(0); }
|
---|
[293] | 75 | mObjMgr->SetGraphicAttributes(tokens[0]);
|
---|
| 76 | }
|
---|
[331] | 77 | else if (kw == "setxylimits") {
|
---|
| 78 | if (tokens.size() < 4) { cout << "Usage: setxylimits xmin xmax ymin ymax" << endl; return(0); }
|
---|
| 79 | double xmin = atof(tokens[0].c_str());
|
---|
| 80 | double xmax = atof(tokens[1].c_str());
|
---|
| 81 | double ymin = atof(tokens[2].c_str());
|
---|
| 82 | double ymax = atof(tokens[3].c_str());
|
---|
| 83 | mImgApp->SetXYLimits(xmin, xmax, ymin, ymax);
|
---|
| 84 | }
|
---|
[548] | 85 | else if (kw == "setinsetlimits") {
|
---|
| 86 | if (tokens.size() < 4) { cout << "Usage: setinsetlimits xmin xmax ymin ymax" << endl; return(0); }
|
---|
| 87 | double xmin = atof(tokens[0].c_str());
|
---|
| 88 | double xmax = atof(tokens[1].c_str());
|
---|
| 89 | double ymin = atof(tokens[2].c_str());
|
---|
| 90 | double ymax = atof(tokens[3].c_str());
|
---|
| 91 | mImgApp->SetInsetLimits(xmin, xmax, ymin, ymax);
|
---|
| 92 | }
|
---|
[558] | 93 | else if (kw == "setimgcenter") {
|
---|
| 94 | if (tokens.size() < 2) { cout << "Usage: setimgcenter xc yc" << endl; return(0); }
|
---|
| 95 | int xc = atoi(tokens[0].c_str());
|
---|
| 96 | int yc = atoi(tokens[1].c_str());
|
---|
| 97 | mImgApp->SetImageCenterPosition(xc, yc);
|
---|
| 98 | }
|
---|
[349] | 99 | else if (kw == "addtext") {
|
---|
[1642] | 100 | if (tokens.size() < 3) { cout << "Usage: addtext x y txt [colfontatt]" << endl; return(0); }
|
---|
[349] | 101 | double xp = atof(tokens[0].c_str());
|
---|
| 102 | double yp = atof(tokens[1].c_str());
|
---|
[1642] | 103 | string txt = tokens[2];
|
---|
| 104 | bool fgsr = false;
|
---|
| 105 | if (tokens.size() > 3)
|
---|
| 106 | mObjMgr->GetServiceObj()->DecodeDispOption(tokens[3], fgsr);
|
---|
[349] | 107 | mImgApp->AddText(txt, xp, yp);
|
---|
| 108 | if (fgsr) mImgApp->RestoreGraphicAtt();
|
---|
| 109 | }
|
---|
[1642] | 110 | else if ((kw == "addline") || (kw == "addrect") || (kw == "addfrect")) {
|
---|
| 111 | if (tokens.size() < 4) { cout << "Usage: addline/addrect/addfrect x1 y1 x2 y2 [colatt]" << endl; return(0); }
|
---|
| 112 | double xp1 = atof(tokens[0].c_str());
|
---|
| 113 | double yp1 = atof(tokens[1].c_str());
|
---|
| 114 | double xp2 = atof(tokens[2].c_str());
|
---|
| 115 | double yp2 = atof(tokens[3].c_str());
|
---|
| 116 | bool fgsr = false;
|
---|
| 117 | if (tokens.size() > 4)
|
---|
| 118 | mObjMgr->GetServiceObj()->DecodeDispOption(tokens[4], fgsr);
|
---|
| 119 | if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2);
|
---|
| 120 | else {
|
---|
| 121 | bool fgfill = (kw == "addrect") ? false : true;
|
---|
| 122 | mImgApp->AddRectangle(xp1, yp1, xp2, yp2, fgfill);
|
---|
| 123 | }
|
---|
| 124 | if (fgsr) mImgApp->RestoreGraphicAtt();
|
---|
| 125 | }
|
---|
| 126 | else if ((kw == "addcirc") || (kw == "addfcirc")) {
|
---|
| 127 | if (tokens.size() < 3) { cout << "Usage: addcirc/addfcirc xc yc r [colatt]" << endl; return(0); }
|
---|
| 128 | double xc = atof(tokens[0].c_str());
|
---|
| 129 | double yc = atof(tokens[1].c_str());
|
---|
| 130 | double rad = atof(tokens[2].c_str());
|
---|
| 131 | bool fgsr = false;
|
---|
| 132 | if (tokens.size() > 3)
|
---|
| 133 | mObjMgr->GetServiceObj()->DecodeDispOption(tokens[3], fgsr);
|
---|
| 134 | bool fgfill = (kw == "addcirc") ? false : true;
|
---|
| 135 | mImgApp->AddCircle(xc, yc, rad, fgfill);
|
---|
| 136 | if (fgsr) mImgApp->RestoreGraphicAtt();
|
---|
| 137 | }
|
---|
| 138 |
|
---|
| 139 |
|
---|
[1131] | 140 | else if (kw == "settitle") {
|
---|
[1642] | 141 | if (tokens.size() < 1) { cout << "Usage: settitle TopTitle [BotTitle] [fontatt]" << endl; return(0); }
|
---|
[1131] | 142 | bool fgsr = true;
|
---|
[1642] | 143 | if (tokens.size() > 2)
|
---|
| 144 | mObjMgr->GetServiceObj()->DecodeDispOption(tokens[2], fgsr);
|
---|
| 145 | if (tokens.size() < 2)
|
---|
| 146 | tokens.push_back("");
|
---|
| 147 | mImgApp->SetTitle(tokens[0], tokens[1]);
|
---|
[1131] | 148 | if (fgsr) mImgApp->RestoreGraphicAtt();
|
---|
| 149 | }
|
---|
[349] | 150 |
|
---|
[293] | 151 | // >>>>>>>>>>> Link dynamique de fonctions C++
|
---|
| 152 | else if (kw == "link" ) {
|
---|
| 153 | if (tokens.size() < 2) { cout << "Usage: link fnameso f1 [f2 f3]" << endl; return(0); }
|
---|
| 154 | string sph = "";
|
---|
| 155 | for(int gg=0; gg<5; gg++) tokens.push_back(sph);
|
---|
| 156 | int rc = LinkUserFuncs(tokens[0], tokens[1], tokens[2], tokens[3]);
|
---|
| 157 | if (rc == 0) cout << "PIABaseExecutor: Link from " << tokens[0] << " OK " << endl;
|
---|
| 158 | }
|
---|
[1276] | 159 | else if (kw == "linkff2" ) {
|
---|
| 160 | if (tokens.size() < 2) { cout << "Usage: linkff2 fnameso f1 [f2 f3]" << endl; return(0); }
|
---|
| 161 | string sph = "";
|
---|
| 162 | for(int gg=0; gg<5; gg++) tokens.push_back(sph);
|
---|
| 163 | int rc = LinkUserFuncs2(tokens[0], tokens[1], tokens[2], tokens[3]);
|
---|
| 164 | if (rc == 0) cout << "PIABaseExecutor: Link2 from " << tokens[0] << " OK " << endl;
|
---|
| 165 | }
|
---|
[293] | 166 | else if (kw == "call" ) {
|
---|
| 167 | if (tokens.size() < 1) { cout << "Usage: call userf [arg1 arg2 ...]" << endl; return(0); }
|
---|
[1276] | 168 | UsFmap::iterator it;
|
---|
| 169 | UsFmap::iterator it1 = usfmap.find(tokens[0]);
|
---|
| 170 | UsFmap::iterator it2 = usfmap2.find(tokens[0]);
|
---|
| 171 | if ((it1 == usfmap.end()) && (it2 == usfmap2.end()) ) {
|
---|
[293] | 172 | cerr << "PIABaseExecutor: No User Function " << tokens[0] << endl;
|
---|
| 173 | return(0);
|
---|
| 174 | }
|
---|
[1276] | 175 | if (it1 == usfmap.end()) it = it2;
|
---|
| 176 | else it = it1;
|
---|
[293] | 177 | cout << "PIABaseExecutor: Call " << tokens[0] << "( ... )" << endl;
|
---|
| 178 | // on est oblige de faire un cast etant donne qu'on
|
---|
| 179 | // utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++)
|
---|
| 180 | DlUserProcFunction fuf = (DlUserProcFunction)(*it).second;
|
---|
| 181 | // On redirige la sortie sur le terminal
|
---|
| 182 | bool red = mImgApp->HasRedirectedStdOutErr();
|
---|
| 183 | mImgApp->RedirectStdOutErr(false);
|
---|
[1276] | 184 | #ifdef SANS_EVOLPLANCK
|
---|
[293] | 185 | TRY {
|
---|
| 186 | tokens.erase(tokens.begin());
|
---|
| 187 | fuf(tokens);
|
---|
| 188 | } CATCH(merr) {
|
---|
| 189 | fflush(stdout);
|
---|
[1276] | 190 | string es = PeidaExc(merr);
|
---|
| 191 | cerr << "\n PIABaseExecutor: Call UserFunc Exception :" << merr << es;
|
---|
[293] | 192 | cout << endl;
|
---|
| 193 | }
|
---|
[1276] | 194 | #else
|
---|
| 195 | try {
|
---|
| 196 | tokens.erase(tokens.begin());
|
---|
| 197 | fuf(tokens);
|
---|
| 198 | }
|
---|
| 199 | catch ( PThrowable & exc ) {
|
---|
| 200 | cerr << "\n PIABaseExecutor: Call / Catched Exception :"
|
---|
| 201 | << (string)typeid(exc).name() << " Msg= "
|
---|
| 202 | << exc.Msg() << endl;
|
---|
| 203 | cout << endl;
|
---|
| 204 | }
|
---|
| 205 | catch ( ... ) {
|
---|
| 206 | cerr << "\n PIABaseExecutor: Call / Catched Exception ... "
|
---|
| 207 | << endl;
|
---|
| 208 | cout << endl;
|
---|
| 209 | }
|
---|
| 210 | #endif
|
---|
[293] | 211 | mImgApp->RedirectStdOutErr(red);
|
---|
| 212 | }
|
---|
| 213 |
|
---|
| 214 | // >>>>>>>>>>> lecture/ecriture des objets, gestion des objets
|
---|
| 215 | else if (kw == "openfits" ) {
|
---|
| 216 | if (tokens.size() < 1) { cout << "Usage: openfits file " << endl; return(0); }
|
---|
[331] | 217 | else { string nomobj = ""; mObjMgr->ReadFits(tokens[0], nomobj); }
|
---|
[293] | 218 | }
|
---|
| 219 | else if (kw == "savefits" ) {
|
---|
| 220 | if (tokens.size() < 2) { cout << "Usage: savefits nameobj filename " << endl; return(0); }
|
---|
| 221 | else mObjMgr->SaveFits(tokens[0], tokens[1]);
|
---|
| 222 | }
|
---|
| 223 | else if (kw == "openppf" ) {
|
---|
| 224 | if (tokens.size() < 1) { cout << "Usage: openppf file " << endl; return(0); }
|
---|
| 225 | mObjMgr->ReadAll(tokens[0]);
|
---|
| 226 | }
|
---|
[333] | 227 | else if (kw == "saveobjs" ) {
|
---|
| 228 | if (tokens.size() < 2) { cout << "Usage: saveobjs patt filename " << endl; return(0); }
|
---|
| 229 | mObjMgr->SaveObjects(tokens[0], tokens[1]);
|
---|
| 230 | }
|
---|
[293] | 231 | else if (kw == "saveall" ) {
|
---|
| 232 | if (tokens.size() < 1) { cout << "Usage: saveall file " << endl; return(0); }
|
---|
| 233 | mObjMgr->SaveAll(tokens[0]);
|
---|
| 234 | }
|
---|
| 235 | else if (kw == "print" ) {
|
---|
| 236 | if (tokens.size() < 1) { cout << "Usage: print nameobj " << endl; return(0); }
|
---|
| 237 | mObjMgr->PrintObj(tokens[0]);
|
---|
| 238 | }
|
---|
[333] | 239 | else if ( (kw == "rename" ) || (kw == "mv") ) {
|
---|
[293] | 240 | if (tokens.size() < 2) { cout << "Usage: rename nameobj namenew" << endl; return(0); }
|
---|
| 241 | mObjMgr->RenameObj(tokens[0], tokens[1]);
|
---|
| 242 | }
|
---|
[333] | 243 | else if ( (kw == "del" ) || (kw == "rm") ) {
|
---|
[1655] | 244 | if (tokens.size() < 1) { cout << "Usage: del nameobj [nameobj2 ...]" << endl; return(0); }
|
---|
| 245 | if (tokens.size()>0)
|
---|
| 246 | for(uint_4 i=0;i<tokens.size();i++) mObjMgr->DelObj(tokens[i]);
|
---|
[293] | 247 | }
|
---|
| 248 | else if (kw == "delobjs" ) {
|
---|
| 249 | if (tokens.size() < 1) { cout << "Usage: delobjs nomobjpattern (*,?) " << endl; return(0); }
|
---|
| 250 | mObjMgr->DelObjects(tokens[0]);
|
---|
| 251 | }
|
---|
[333] | 252 | else if ( (kw == "listobjs") || (kw == "ls") ) {
|
---|
[331] | 253 | if (tokens.size() < 1) tokens.push_back("*");
|
---|
| 254 | mObjMgr->ListObjs(tokens[0]);
|
---|
| 255 | }
|
---|
[333] | 256 | // Gestion des repertoires
|
---|
| 257 | else if (kw == "mkdir" ) {
|
---|
[344] | 258 | if (tokens.size() < 1) { cout << "Usage: mkdir dirname [true]" << endl; return(0); }
|
---|
| 259 | bool crd = mObjMgr->CreateDir(tokens[0]);
|
---|
| 260 | if ( crd && (tokens.size() > 1) && (tokens[1] == "true") )
|
---|
| 261 | mObjMgr->SetKeepOldDirAtt(tokens[0], true);
|
---|
[333] | 262 | }
|
---|
| 263 | else if (kw == "rmdir" ) {
|
---|
| 264 | if (tokens.size() < 1) { cout << "Usage: rmdir dirname " << endl; return(0); }
|
---|
| 265 | mObjMgr->DeleteDir(tokens[0]);
|
---|
| 266 | }
|
---|
| 267 | else if (kw == "cd") {
|
---|
| 268 | if (tokens.size() < 1) tokens.push_back("home");
|
---|
| 269 | mObjMgr->SetCurrentDir(tokens[0]);
|
---|
| 270 | }
|
---|
[345] | 271 | else if (kw == "pwd") {
|
---|
| 272 | string dirn;
|
---|
| 273 | mObjMgr->GetCurrentDir(dirn);
|
---|
| 274 | cout << "CurrentDirectory: " << dirn << endl;
|
---|
| 275 | }
|
---|
[333] | 276 | else if (kw == "listdirs") {
|
---|
| 277 | if (tokens.size() < 1) tokens.push_back("*");
|
---|
| 278 | mObjMgr->ListDirs(tokens[0]);
|
---|
| 279 | }
|
---|
[293] | 280 |
|
---|
| 281 | // >>>>>>>>>>> Creation d'histos 1D-2D
|
---|
| 282 | else if (kw == "newh1d") {
|
---|
| 283 | if (tokens.size() < 4) { cout << "Usage: newh1d name xmin xmax nbin" << endl; return(0); }
|
---|
[1091] | 284 | int_4 nbx = 100;
|
---|
| 285 | r_8 xmin = 0., xmax = 1.;
|
---|
[293] | 286 | nbx = atoi(tokens[3].c_str());
|
---|
| 287 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 288 | Histo* h = new Histo(xmin, xmax, nbx);
|
---|
| 289 | mObjMgr->AddObj(h, tokens[0]);
|
---|
| 290 | }
|
---|
| 291 | else if (kw == "newh2d") {
|
---|
| 292 | if (tokens.size() < 7) {
|
---|
| 293 | cout << "Usage: newh2d name xmin xmax nbinx ymin ymax nbiny" << endl;
|
---|
| 294 | return(0);
|
---|
| 295 | }
|
---|
[1091] | 296 | int_4 nbx = 50, nby = 50;
|
---|
| 297 | r_8 xmin = 0., xmax = 1.;
|
---|
| 298 | r_8 ymin = 0., ymax = 1.;
|
---|
[293] | 299 | nbx = atoi(tokens[3].c_str());
|
---|
| 300 | nby = atoi(tokens[6].c_str());
|
---|
| 301 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 302 | ymin = atof(tokens[4].c_str()); ymax = atof(tokens[5].c_str());
|
---|
| 303 | Histo2D* h = new Histo2D(xmin, xmax, nbx, ymin, ymax, nby);
|
---|
| 304 | mObjMgr->AddObj(h, tokens[0]);
|
---|
| 305 | }
|
---|
[1035] | 306 | else if (kw == "newprof" || kw == "newprofe") {
|
---|
[293] | 307 | if (tokens.size() < 4)
|
---|
[1035] | 308 | { cout << "Usage: newprof[e] name xmin xmax nbin [ymin ymax]" << endl; return(0); }
|
---|
[1091] | 309 | int_4 nbx = 100;
|
---|
| 310 | r_8 xmin = 0., xmax = 1., ymin = 1., ymax = -1.;
|
---|
[293] | 311 | if(tokens.size() > 5)
|
---|
| 312 | {ymin = atof(tokens[4].c_str()); ymax = atof(tokens[5].c_str());}
|
---|
| 313 | nbx = atoi(tokens[3].c_str());
|
---|
| 314 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 315 | HProf* h = new HProf(xmin, xmax, nbx, ymin, ymax);
|
---|
[1035] | 316 | if(kw == "newprofe") h->SetErrOpt(false);
|
---|
[293] | 317 | mObjMgr->AddObj(h, tokens[0]);
|
---|
| 318 | }
|
---|
[447] | 319 |
|
---|
| 320 | // Creation de NTuple
|
---|
| 321 | else if (kw == "newnt") {
|
---|
| 322 | if(tokens.size() < 2)
|
---|
| 323 | {cout<<"Usage: newnt name v1 v2 ... vn / newnt name nvar"<<endl; return(0);}
|
---|
| 324 | vector<string> varname;
|
---|
| 325 | int nvar = 0;
|
---|
| 326 | const char *c = tokens[1].c_str();
|
---|
| 327 | if(isdigit(c[0])) {
|
---|
| 328 | nvar = atoi(tokens[1].c_str());
|
---|
| 329 | if(nvar<=0 || nvar>=10000)
|
---|
| 330 | {cout<<"newnt name nvar : nvar must be an positive integer<10000"<<endl;
|
---|
| 331 | return(0);}
|
---|
| 332 | for(int i=0;i<nvar;i++) {
|
---|
| 333 | char str[16]; sprintf(str,"%d",i);
|
---|
| 334 | string dum = "v"; dum += str;
|
---|
| 335 | varname.push_back(dum.c_str());
|
---|
| 336 | }
|
---|
| 337 | } else if( islower(c[0]) || isupper(c[0]) ) {
|
---|
[1548] | 338 | for(int i=1;i<(int)tokens.size();i++) {
|
---|
[447] | 339 | varname.push_back(tokens[i].c_str());
|
---|
| 340 | nvar++;
|
---|
| 341 | }
|
---|
| 342 | } else {
|
---|
| 343 | cout<<"newnt name v1 v2 ... vn : name vi must begin by a letter"<<endl
|
---|
| 344 | <<"newnt name nvar : nvar must be an positive integer"<<endl;
|
---|
| 345 | return(0);
|
---|
| 346 | }
|
---|
| 347 | char **noms = new char*[nvar];
|
---|
| 348 | for(int i=0;i<nvar;i++) noms[i] = (char *)varname[i].c_str();
|
---|
| 349 | NTuple* nt = new NTuple(nvar,noms);
|
---|
| 350 | delete [] noms;
|
---|
| 351 | mObjMgr->AddObj(nt,tokens[0]);
|
---|
| 352 | }
|
---|
| 353 |
|
---|
| 354 | // Creation de GeneralFitData
|
---|
[293] | 355 | else if (kw == "newgfd") {
|
---|
| 356 | if (tokens.size() < 3)
|
---|
| 357 | { cout << "Usage: newgfd nvar nalloc [errx(0/1)]" << endl; return(0); }
|
---|
| 358 | int nvar, nalloc, errx=0;
|
---|
| 359 | if (tokens.size() > 3)
|
---|
| 360 | { errx = atoi(tokens[3].c_str()); if(errx>0) errx=1; else errx = 0;}
|
---|
| 361 | nvar = atoi(tokens[1].c_str()); nalloc = atoi(tokens[2].c_str());
|
---|
| 362 | if(nvar>0 && nalloc>0) {
|
---|
| 363 | GeneralFitData* gfd = new GeneralFitData(nvar,nalloc,errx);
|
---|
| 364 | mObjMgr->AddObj(gfd, tokens[0]);
|
---|
| 365 | }
|
---|
| 366 | }
|
---|
| 367 |
|
---|
[333] | 368 | // Creation/remplissage de vecteur et de matrice
|
---|
| 369 | else if (kw == "newvec") {
|
---|
| 370 | if (tokens.size() < 2) {
|
---|
| 371 | cout << "Usage: newvec name size [f(i) dopt] " << endl; return(0);
|
---|
| 372 | }
|
---|
| 373 | int n = atoi(tokens[1].c_str());
|
---|
| 374 | double xmin, xmax;
|
---|
| 375 | xmin = 0.; xmax = n;
|
---|
[357] | 376 | if (tokens.size() < 3) {
|
---|
| 377 | Vector* v = new Vector(n);
|
---|
| 378 | mObjMgr->AddObj(v, tokens[0]);
|
---|
| 379 | }
|
---|
| 380 | else {
|
---|
| 381 | if (tokens.size() < 4) tokens.push_back("");
|
---|
| 382 | mObjMgr->GetServiceObj()->PlotFunc(tokens[2], tokens[0], xmin, xmax, n, tokens[3]);
|
---|
| 383 | }
|
---|
[333] | 384 | }
|
---|
| 385 | else if (kw == "newmtx") {
|
---|
| 386 | if (tokens.size() < 3) {
|
---|
[1917] | 387 | cout << "Usage: newmtx name sizeX(Col) sizeY(Lines) [f(i,j) dopt] " << endl; return(0);
|
---|
[333] | 388 | }
|
---|
| 389 | int nx = atoi(tokens[1].c_str());
|
---|
| 390 | int ny = atoi(tokens[2].c_str());
|
---|
| 391 | double xmin, xmax, ymin, ymax;
|
---|
| 392 | xmin = 0.; xmax = nx;
|
---|
| 393 | ymin = 0.; ymax = ny;
|
---|
[357] | 394 | if (tokens.size() < 4) {
|
---|
| 395 | Matrix* mtx = new Matrix(ny,nx);
|
---|
| 396 | mObjMgr->AddObj(mtx, tokens[0]);
|
---|
| 397 | }
|
---|
| 398 | else {
|
---|
| 399 | if (tokens.size() < 5) tokens.push_back("n");
|
---|
| 400 | mObjMgr->GetServiceObj()->PlotFunc2D(tokens[3], tokens[0], xmin, xmax, ymin, ymax,
|
---|
| 401 | nx, ny, tokens[4]);
|
---|
| 402 | }
|
---|
[333] | 403 | }
|
---|
| 404 |
|
---|
[455] | 405 | // Copie d'objets
|
---|
| 406 | else if (kw == "copy") {
|
---|
| 407 | if(tokens.size()<2) {
|
---|
| 408 | cout<<"Usage: copy name_from name_to"<<endl;return(0);
|
---|
| 409 | }
|
---|
[463] | 410 | mObjMgr->CopyObj(tokens[0],tokens[1]);
|
---|
[455] | 411 | }
|
---|
| 412 |
|
---|
| 413 |
|
---|
[293] | 414 | // >>>>>>>>>>> Affichage des objets
|
---|
[295] | 415 | else if ( (kw == "disp") || (kw == "surf") || (kw == "imag") ) {
|
---|
| 416 | if (tokens.size() < 1) { cout << "Usage: disp/surf/imag nameobj [opt]" << endl; return(0); }
|
---|
[293] | 417 | string opt = "n";
|
---|
| 418 | if (tokens.size() > 1) opt = tokens[1];
|
---|
| 419 | if (kw == "disp") mObjMgr->DisplayObj(tokens[0], opt);
|
---|
| 420 | else if (kw == "surf") mObjMgr->DisplaySurf3D(tokens[0], opt);
|
---|
[295] | 421 | else if (kw == "imag") mObjMgr->DisplayImage(tokens[0], opt);
|
---|
[293] | 422 | }
|
---|
| 423 |
|
---|
| 424 | else if (kw == "nt2d") {
|
---|
[486] | 425 | if (tokens.size() < 3) {
|
---|
| 426 | cout << "Usage: nt2d nameobj varx vary [errx erry wt label opt]" << endl;
|
---|
| 427 | return(0);
|
---|
[293] | 428 | }
|
---|
[486] | 429 | while (tokens.size() < 8) tokens.push_back("");
|
---|
[333] | 430 | string ph = "";
|
---|
[486] | 431 | mObjMgr->DisplayNT(tokens[0], tokens[1], tokens[2], ph, tokens[3], tokens[4], ph,
|
---|
| 432 | tokens[5], tokens[6], tokens[7], false);
|
---|
[333] | 433 | }
|
---|
[293] | 434 | else if (kw == "nt3d") {
|
---|
[486] | 435 | if (tokens.size() < 7) {
|
---|
| 436 | cout << "Usage: nt3d nameobj varx vary varz [errx erry errz wt label opt]" << endl;
|
---|
| 437 | return(0);
|
---|
[293] | 438 | }
|
---|
[486] | 439 | while (tokens.size() < 10) tokens.push_back("");
|
---|
| 440 | mObjMgr->DisplayNT(tokens[0], tokens[1], tokens[2], tokens[3], tokens[4], tokens[5],
|
---|
| 441 | tokens[6], tokens[7], tokens[8], tokens[9], true);
|
---|
| 442 | }
|
---|
[1525] | 443 | else if (kw == "vecplot") {
|
---|
| 444 | if (tokens.size() < 2) {
|
---|
| 445 | cout << "Usage: vecplot nameVecX nameVecY [opt]" << endl;
|
---|
| 446 | }
|
---|
| 447 | while (tokens.size() < 3) tokens.push_back("");
|
---|
| 448 | mObjMgr->DisplayVector(tokens[0], tokens[1], tokens[2]);
|
---|
| 449 | }
|
---|
[293] | 450 |
|
---|
[339] | 451 | // Obsolete : ne pas virer SVP, cmv 26/7/99
|
---|
[293] | 452 | else if (kw == "gfd2d") {
|
---|
[339] | 453 | cout<<"----- gfd2d OBSOLETE: utilisez nt2d -----"<<endl;
|
---|
[293] | 454 | if(tokens.size()<2)
|
---|
| 455 | {cout<<"Usage: gfd2d nomobj numvarx erreur=(x y xy) opt"<<endl;
|
---|
| 456 | return(0);}
|
---|
| 457 | string numvary = "";
|
---|
| 458 | string err = "";
|
---|
| 459 | string opt = "n";
|
---|
| 460 | if(tokens.size()>2) err = tokens[2];
|
---|
| 461 | if(tokens.size()>3) opt = tokens[3];
|
---|
| 462 | mObjMgr->DisplayGFD(tokens[0],tokens[1],numvary,err,opt);
|
---|
| 463 | }
|
---|
| 464 | else if (kw == "gfd3d") {
|
---|
[339] | 465 | cout<<"----- gfd3d OBSOLETE: utilisez nt3d -----"<<endl;
|
---|
[293] | 466 | if(tokens.size()<3)
|
---|
| 467 | {cout<<"Usage: gfd3d nameobj numvarx numvary erreur=(x y z xy xz yz xyz) opt"<<endl;
|
---|
| 468 | return(0);}
|
---|
| 469 | string err = "";
|
---|
| 470 | string opt = "n";
|
---|
| 471 | if(tokens.size()>3) err = tokens[3];
|
---|
| 472 | if(tokens.size()>4) opt = tokens[4];
|
---|
| 473 | mObjMgr->DisplayGFD(tokens[0],tokens[1],tokens[2],err,opt);
|
---|
| 474 | }
|
---|
| 475 |
|
---|
| 476 | // >>>>>>>>>>> Trace de fonctions
|
---|
| 477 | else if ( (kw == "func") ) {
|
---|
[1938] | 478 | if(tokens.size()<3) {cout<<"Usage: func f(x) xmin xmax [npt opt]"<<endl; return(0);}
|
---|
| 479 | int np = 100;
|
---|
| 480 | double xmin=0., xmax=1.;
|
---|
| 481 | string opt = "", nom = "";
|
---|
| 482 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 483 | if (tokens.size() > 3) np = atoi(tokens[3].c_str());
|
---|
[293] | 484 | if (tokens.size() > 4) opt = tokens[4];
|
---|
[333] | 485 | mObjMgr->GetServiceObj()->PlotFunc(tokens[0], nom, xmin, xmax, np, opt);
|
---|
[293] | 486 | }
|
---|
[326] | 487 | else if ( (kw == "funcff") ) {
|
---|
[1938] | 488 | if (tokens.size()<4) {cout<<"Usage: funcff C-filename f(x)-name xmin xmax [npt opt]"<<endl; return(0);}
|
---|
| 489 | int np = 100;
|
---|
| 490 | double xmin=0., xmax=1.;
|
---|
| 491 | string opt = "", nom = "";
|
---|
| 492 | xmin = atof(tokens[2].c_str()); xmax = atof(tokens[3].c_str());
|
---|
| 493 | if(tokens.size()>4) np = atoi(tokens[4].c_str());
|
---|
| 494 | if(tokens.size()>5) opt = tokens[5];
|
---|
[333] | 495 | mObjMgr->GetServiceObj()->PlotFuncFrCFile(tokens[0], tokens[1], nom, xmin, xmax, np, opt);
|
---|
[326] | 496 | }
|
---|
[293] | 497 | else if ( (kw == "func2d") ) {
|
---|
| 498 | if (tokens.size() < 7) {
|
---|
[357] | 499 | cout << "Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty [opt]" << endl;
|
---|
[293] | 500 | return(0);
|
---|
| 501 | }
|
---|
| 502 | int npx, npy;
|
---|
[333] | 503 | double xmin, xmax;
|
---|
| 504 | double ymin, ymax;
|
---|
[293] | 505 | npx = npy = 50;
|
---|
| 506 | xmin = 0.; xmax = 1.;
|
---|
| 507 | ymin = 0.; ymax = 1.;
|
---|
| 508 | npx = atoi(tokens[3].c_str());
|
---|
| 509 | npy = atoi(tokens[6].c_str());
|
---|
| 510 | xmin = atof(tokens[1].c_str()); xmax = atof(tokens[2].c_str());
|
---|
| 511 | ymin = atof(tokens[4].c_str()); ymax = atof(tokens[5].c_str());
|
---|
[357] | 512 | string opt = "";
|
---|
[293] | 513 | if (tokens.size() > 7) opt = tokens[7];
|
---|
[333] | 514 | string nom = "";
|
---|
| 515 | mObjMgr->GetServiceObj()->PlotFunc2D(tokens[0], nom, xmin, xmax, ymin, ymax, npx, npy, opt);
|
---|
[293] | 516 | }
|
---|
[326] | 517 | else if ( (kw == "func2dff") ) {
|
---|
| 518 | if (tokens.size() < 8) {
|
---|
[357] | 519 | cout << "Usage: func2d C-filename F(x,y)-name xmax nptx ymin ymax npty [opt]" << endl;
|
---|
[326] | 520 | return(0);
|
---|
| 521 | }
|
---|
| 522 | int npx, npy;
|
---|
[333] | 523 | double xmin, xmax;
|
---|
| 524 | double ymin, ymax;
|
---|
[326] | 525 | npx = npy = 50;
|
---|
| 526 | xmin = 0.; xmax = 1.;
|
---|
| 527 | ymin = 0.; ymax = 1.;
|
---|
| 528 | npx = atoi(tokens[4].c_str());
|
---|
| 529 | npy = atoi(tokens[7].c_str());
|
---|
| 530 | xmin = atof(tokens[2].c_str()); xmax = atof(tokens[3].c_str());
|
---|
| 531 | ymin = atof(tokens[5].c_str()); ymax = atof(tokens[6].c_str());
|
---|
[357] | 532 | string opt = "";
|
---|
[326] | 533 | if (tokens.size() > 8) opt = tokens[8];
|
---|
[333] | 534 | string nom = "";
|
---|
| 535 | mObjMgr->GetServiceObj()->PlotFunc2DFrCFile(tokens[0], tokens[1], nom, xmin, xmax, ymin, ymax, npx, npy, opt);
|
---|
[326] | 536 | }
|
---|
[293] | 537 |
|
---|
| 538 | // >>>>>>>>>>> Trace d'expressions de N_Tuple, StarList, etc ...
|
---|
| 539 | else if (kw == "plot2d" ) {
|
---|
[357] | 540 | if (tokens.size() < 3) {
|
---|
| 541 | cout << "Usage: plot2d nameobj expx expy [expcut opt loop_par]" << endl;
|
---|
[293] | 542 | return(0);
|
---|
| 543 | }
|
---|
[357] | 544 | string errx = ""; string erry = "";
|
---|
| 545 | if (tokens.size() < 4) tokens.push_back("1");
|
---|
| 546 | while (tokens.size() < 6) tokens.push_back("");
|
---|
| 547 | srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],errx,erry,tokens[3],tokens[4],tokens[5]);
|
---|
| 548 | }
|
---|
| 549 |
|
---|
| 550 | else if (kw == "plot2de" ) { // Plot2D avec les erreurs
|
---|
| 551 | if (tokens.size() < 5) {
|
---|
| 552 | cout << "Usage: plot2de nameobj expx expy experrx experry [expcut opt loop_par]" << endl;
|
---|
| 553 | return(0);
|
---|
[293] | 554 | }
|
---|
[357] | 555 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 556 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 557 | srvo->DisplayPoints2D(tokens[0],tokens[1],tokens[2],tokens[3],tokens[4],
|
---|
| 558 | tokens[5],tokens[6],tokens[7]);
|
---|
[293] | 559 | }
|
---|
| 560 |
|
---|
[357] | 561 | else if (kw == "plot2dw" ) { // Plot2d avec poids
|
---|
| 562 | if (tokens.size() < 4) {
|
---|
| 563 | cout << "Usage: plot2dw nomobj expx expy expwt [expcut opt loop_par]" << endl;
|
---|
[333] | 564 | return(0);
|
---|
| 565 | }
|
---|
[357] | 566 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 567 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 568 | srvo->DisplayPoints2DW(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
|
---|
[333] | 569 | }
|
---|
[357] | 570 | else if (kw == "plot3d" ) {
|
---|
| 571 | if (tokens.size() < 4) {
|
---|
| 572 | cout << "Usage: plot3d nomobj expx expy expz [expcut opt loop_par]" << endl;
|
---|
[293] | 573 | return(0);
|
---|
| 574 | }
|
---|
[357] | 575 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 576 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 577 | srvo->DisplayPoints3D(tokens[0],tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6]);
|
---|
[293] | 578 | }
|
---|
| 579 |
|
---|
| 580 | else if (kw == "projh1d" ) {
|
---|
[357] | 581 | if (tokens.size() < 3) {
|
---|
| 582 | cout << "Usage: projh1d nomh1 nomobj expx [expwt expcut opt loop_par]" << endl;
|
---|
[293] | 583 | return(0);
|
---|
| 584 | }
|
---|
[357] | 585 | if (tokens.size() < 4) tokens.push_back("1.");
|
---|
| 586 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 587 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 588 | srvo->ProjectH1(tokens[1], tokens[2], tokens[3], tokens[4], tokens[0], tokens[5], tokens[6] );
|
---|
[293] | 589 | }
|
---|
| 590 |
|
---|
[357] | 591 |
|
---|
| 592 | // Projection dans histogrammes
|
---|
[293] | 593 | else if (kw == "projh2d" ) {
|
---|
[357] | 594 | if (tokens.size() < 4) {
|
---|
| 595 | cout << "Usage: projh2d nomh2 nomobj expx expy [expwt expcut opt loop_par]" << endl;
|
---|
[293] | 596 | return(0);
|
---|
| 597 | }
|
---|
[357] | 598 | if (tokens.size() < 5) tokens.push_back("1.");
|
---|
| 599 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 600 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 601 | srvo->ProjectH2(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
|
---|
| 602 | tokens[6], tokens[7] );
|
---|
[293] | 603 | }
|
---|
| 604 |
|
---|
| 605 | else if (kw == "projprof" ) {
|
---|
[357] | 606 | if (tokens.size() < 4) {
|
---|
| 607 | cout << "Usage: projprof nomprof nomobj expx expy [expwt expcut opt loop_par]" << endl;
|
---|
[293] | 608 | return(0);
|
---|
| 609 | }
|
---|
[357] | 610 | if (tokens.size() < 5) tokens.push_back("1.");
|
---|
| 611 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 612 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 613 | srvo->ProjectHProf(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
|
---|
[1091] | 614 | tokens[6], tokens[7] );
|
---|
[357] | 615 | }
|
---|
[293] | 616 |
|
---|
[357] | 617 | // Projection dans vector/matrix
|
---|
| 618 | else if (kw == "fillvec" ) {
|
---|
| 619 | if (tokens.size() < 4) {
|
---|
| 620 | cout << "Usage: fillvec nomvec nomobj expx expv [expcut opt loop_par]" << endl;
|
---|
| 621 | return(0);
|
---|
| 622 | }
|
---|
| 623 | if (tokens.size() < 5) tokens.push_back("1");
|
---|
| 624 | while (tokens.size() < 7) tokens.push_back("");
|
---|
| 625 | srvo->FillVect(tokens[1], tokens[2], tokens[3], tokens[4], tokens[0], tokens[5], tokens[6] );
|
---|
[293] | 626 | }
|
---|
| 627 |
|
---|
[357] | 628 | else if (kw == "fillmtx" ) {
|
---|
| 629 | if (tokens.size() < 5) {
|
---|
| 630 | cout << "Usage: fillmtx nommtx nomobj expx expy expv [expcut opt loop_par]" << endl;
|
---|
| 631 | return(0);
|
---|
| 632 | }
|
---|
| 633 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 634 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 635 | srvo->FillMatx(tokens[1], tokens[2], tokens[3], tokens[4], tokens[5], tokens[0],
|
---|
| 636 | tokens[6], tokens[7] );
|
---|
| 637 | }
|
---|
| 638 |
|
---|
| 639 | // Remplissage NTuple,Vecteurs, ... , boucle de NTuple
|
---|
[447] | 640 | else if (kw == "ntfrascii" ) {
|
---|
| 641 | if(tokens.size() < 2) {
|
---|
| 642 | cout<<"Usage: ntfrascii nt_name file_name [def_init_val]"<<endl;
|
---|
| 643 | return(0);
|
---|
| 644 | }
|
---|
| 645 | double def_val = 0.;
|
---|
| 646 | if(tokens.size()>=3) def_val = atof(tokens[2].c_str());
|
---|
| 647 | srvo->NtFromASCIIFile(tokens[0],tokens[1],def_val);
|
---|
| 648 | }
|
---|
| 649 |
|
---|
[293] | 650 | else if (kw == "fillnt" ) {
|
---|
[357] | 651 | if (tokens.size() < 5) {
|
---|
| 652 | cout << "Usage: fillnt nameobj expx expy expz expt [expcut ntname loop_par]" << endl;
|
---|
[293] | 653 | return(0);
|
---|
| 654 | }
|
---|
[357] | 655 | while (tokens.size() < 8) tokens.push_back("");
|
---|
| 656 | srvo->FillNT(tokens[0],tokens[1],tokens[2], tokens[3], tokens[4], tokens[5], tokens[6], tokens[7] );
|
---|
[293] | 657 | }
|
---|
| 658 |
|
---|
[333] | 659 | else if (kw == "ntloop" ) {
|
---|
| 660 | if (tokens.size() < 3) {
|
---|
[357] | 661 | cout << "Usage: ntloop nameobj fname funcname [ntname loop_par ]" << endl;
|
---|
[333] | 662 | return(0);
|
---|
| 663 | }
|
---|
[357] | 664 | while (tokens.size() < 5) tokens.push_back("");
|
---|
| 665 | srvo->FillNTFrCFile(tokens[0],tokens[1], tokens[2], tokens[3], tokens[4]);
|
---|
[333] | 666 | }
|
---|
| 667 |
|
---|
| 668 | else if (kw == "ntexpcfile" ) {
|
---|
| 669 | if (tokens.size() < 3) {
|
---|
| 670 | cout << "Usage: ntexpcfile nameobj fname funcname" << endl;
|
---|
| 671 | return(0);
|
---|
| 672 | }
|
---|
| 673 | srvo->PrepareNTExpressionCFile(tokens[0],tokens[1], tokens[2]);
|
---|
| 674 | }
|
---|
| 675 |
|
---|
[357] | 676 | else if (kw == "exptovec" ) {
|
---|
| 677 | if (tokens.size() < 3) {
|
---|
| 678 | cout << "Usage: exptovec nomvec nameobj expx [expcut opt loop_par]" << endl;
|
---|
[293] | 679 | return(0);
|
---|
| 680 | }
|
---|
[357] | 681 | while (tokens.size() < 6) tokens.push_back("");
|
---|
| 682 | srvo->ExpressionToVector(tokens[1],tokens[2],tokens[3],tokens[0],tokens[4],tokens[5]);
|
---|
[293] | 683 | }
|
---|
| 684 |
|
---|
| 685 | else if (kw == "fillgd1" ) {
|
---|
| 686 | if (tokens.size() < 5) {
|
---|
[357] | 687 | cout << "Usage: fillgd1 nomgfd nomobj expx expy experry [expcut loop_par] " << endl;
|
---|
[293] | 688 | return(0);
|
---|
| 689 | }
|
---|
[357] | 690 | if (tokens.size() < 6) tokens.push_back("1");
|
---|
| 691 | if (tokens.size() < 7) tokens.push_back("");
|
---|
[293] | 692 | string expy = "";
|
---|
[357] | 693 | srvo->FillGFD(tokens[1],tokens[2], expy, tokens[3], tokens[4], tokens[5], tokens[0]);
|
---|
[293] | 694 | }
|
---|
| 695 |
|
---|
| 696 | else if (kw == "fillgd2" ) {
|
---|
| 697 | if (tokens.size() < 6) {
|
---|
[357] | 698 | cout << "Usage: fillgd2 nomgfd nomobj expx expy expz experrz [expcut loop_par]" << endl;
|
---|
[293] | 699 | return(0);
|
---|
| 700 | }
|
---|
[357] | 701 | if (tokens.size() < 7) tokens.push_back("1");
|
---|
| 702 | if (tokens.size() < 8) tokens.push_back("");
|
---|
| 703 | srvo->FillGFD(tokens[1],tokens[2],tokens[3], tokens[4], tokens[5], tokens[6], tokens[0], tokens[7]);
|
---|
[293] | 704 | }
|
---|
| 705 |
|
---|
[1067] | 706 | else if (kw == "gdfrvec" ) {
|
---|
| 707 | if(tokens.size()<3) {
|
---|
| 708 | cout<<"Usage: gdfrvec namegfd X Y\n"
|
---|
| 709 | <<" gdfrvec namegfd X Y"
|
---|
| 710 | <<" gdfrvec namegfd X Y ! EY\n"
|
---|
| 711 | <<" gdfrvec namegfd X Y Z\n"
|
---|
| 712 | <<" gdfrvec namegfd X Y Z EZ"<<endl;
|
---|
| 713 | return(0);
|
---|
| 714 | }
|
---|
| 715 | while(tokens.size()<5) tokens.push_back("!");
|
---|
| 716 | srvo->FillGFDfrVec(tokens[0],tokens[1],tokens[2],tokens[3],tokens[4]);
|
---|
| 717 | }
|
---|
[293] | 718 |
|
---|
| 719 |
|
---|
| 720 | else {
|
---|
| 721 | cerr << "PIABaseExecutor::Do() Erreur - Commande " << kw << " inconuue ! " << endl;
|
---|
| 722 | return(-1);
|
---|
| 723 | }
|
---|
| 724 |
|
---|
| 725 | return(0);
|
---|
| 726 | }
|
---|
| 727 |
|
---|
[388] | 728 | // Fonction pour enregistrer le Help des Widgets et Windows de piapp
|
---|
| 729 | static void RegisterPIGraphicsHelp(PIACmd* piac);
|
---|
| 730 |
|
---|
[293] | 731 | /* --Methode-- */
|
---|
| 732 | void PIABaseExecutor::RegisterCommands()
|
---|
| 733 | {
|
---|
| 734 | string kw, usage;
|
---|
| 735 | kw = "loadmodule";
|
---|
| 736 | usage = "To load and initialize modules \n Usage: loadmodule fnameso modulename";
|
---|
| 737 | usage += "\n Related commands: link";
|
---|
[330] | 738 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[293] | 739 | kw = "link";
|
---|
| 740 | usage = "Dynamic linking of compiled user functions \n Usage: link fnameso f1 [f2 f3]";
|
---|
| 741 | usage += "\n fnameso: Shared-object file name, f1,f2,f3 : User function names ";
|
---|
[1276] | 742 | usage += "\n Related commands: call loadmodule linkff2";
|
---|
[330] | 743 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[1276] | 744 | kw = "linkff2";
|
---|
| 745 | usage = "Dynamic linking of compiled user functions (Set 2)\n Usage: linkff2 fnameso f1 [f2 f3]";
|
---|
| 746 | usage += "\n fnameso: Shared-object file name, f1,f2,f3 : User function names ";
|
---|
| 747 | usage += "\n Related commands: call link loadmodule";
|
---|
| 748 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[293] | 749 | kw = "call";
|
---|
| 750 | usage = "Dynamically linked user function call \n Usage: call userf [arg1 arg2 ...]";
|
---|
| 751 | usage += "\n User function : f(vector<string>& args)";
|
---|
| 752 | usage += "\n Related commands: link";
|
---|
[330] | 753 | mpiac->RegisterCommand(kw, usage, this, "External Modules");
|
---|
[293] | 754 |
|
---|
| 755 | kw = "zone";
|
---|
[384] | 756 | usage = "To Divide the Graphic window \n Usage: zone [nx=1 ny=1]";
|
---|
[388] | 757 | usage += "\n Related commands: newwin";
|
---|
[330] | 758 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 759 | kw = "newwin";
|
---|
| 760 | usage = "To Create a New Graphic window, with zones \n Usage: newwin nx ny";
|
---|
[388] | 761 | usage += "\n Related commands: zone";
|
---|
[330] | 762 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 763 | kw = "stacknext";
|
---|
| 764 | usage = "Displays the next widget on stack window \n Usage: stacknext";
|
---|
[330] | 765 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 766 |
|
---|
[553] | 767 | kw = "graphicatt";
|
---|
| 768 | usage = "To change default graphic options \n Usage: graphicatt att_list \n";
|
---|
[293] | 769 | usage += "att_list=def back to default values, Example: gratt red,circlemarker5";
|
---|
| 770 | usage += "\n ------------------ Graphic attribute list ------------------ \n";
|
---|
[1642] | 771 | usage += ">> Colors: defcol black white grey red blue green yellow \n";
|
---|
| 772 | usage += " magenta cyan turquoise navyblue orange siennared purple \n";
|
---|
| 773 | usage += " limegreen gold violet violetred blueviolet darkviolet \n";
|
---|
[293] | 774 | usage += ">> Lines: defline normalline thinline thickline dashedline thindashedline \n";
|
---|
| 775 | usage += " thickdashedline dottedline thindottedline thickdottedline \n";
|
---|
[1569] | 776 | usage += ">> Font Att: deffontatt normalfont boldfont italicfont bolditalicfont \n";
|
---|
| 777 | usage += " smallfont smallboldfont smallitalicfont smallbolditalicfont \n";
|
---|
| 778 | usage += " bigfont bigboldfont bigitalicfont bigbolditalicfont \n";
|
---|
| 779 | usage += " hugefont hugeboldfont hugeitalicfont hugebolditalicfont \n";
|
---|
| 780 | usage += ">> Font Names: deffont courierfont helveticafont timesfont symbolfont \n";
|
---|
[293] | 781 | usage += ">> Marker: dotmarker<T> plusmarker<T> crossmarker<T> circlemarker <T> \n";
|
---|
| 782 | usage += " fcirclemarker<T> boxmarker<T> fboxmarker<T> trianglemarker<T> \n";
|
---|
| 783 | usage += " ftrianglemarker<T> starmarker<T> fstarmarker<T> \n";
|
---|
| 784 | usage += " with <T> = 1 3 5 7 9 , Example fboxmarker5 , plusmarker9 ... \n";
|
---|
[1126] | 785 | usage += ">> ColorTables: defcmap grey32 invgrey32 colrj32 colbr32 \n";
|
---|
| 786 | usage += " grey128 invgrey128 colrj128 colbr128 \n";
|
---|
| 787 | usage += " midas_pastel midas_heat midas_rainbow3 midas_bluered\n";
|
---|
| 788 | usage += " midas_bluewhite midas_redwhite \n";
|
---|
| 789 | usage += " rainbow16 \n";
|
---|
[1504] | 790 | usage += " revcmap : This flag reverses ColorMap indexing \n";
|
---|
[293] | 791 | usage += ">> ZoomFactors: defzoom zoomx1 zoomx2 zoomx3 zoomx4 zoomx5 \n";
|
---|
| 792 | usage += " zoom/2 zoom/3 zoom/4 zoom/5 \n";
|
---|
[558] | 793 | usage += ">> Image centering: centerimg -> Position the image in widget \n";
|
---|
[293] | 794 | usage += ">> Axes: stdaxes=defaxes=boxaxes simpleaxes boxaxesgrid \n";
|
---|
| 795 | usage += " fineaxes grid=fineaxesgrid \n";
|
---|
[506] | 796 | usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
|
---|
[331] | 797 | usage += ">> XYLimits : xylimits -> Forces X-Y limits in 2-D plots \n";
|
---|
[546] | 798 | usage += ">> stat/nostat or stats/nostats -> Toggle statistic display flag \n";
|
---|
[1131] | 799 | usage += ">> title/notitle or tit/notit -> Toggle Auto AddTitle flag \n";
|
---|
[548] | 800 | usage += ">> DisplayWindow: next same win stack inset \n";
|
---|
[558] | 801 | usage += " Related commands: setxylimits setinsetlimits setimgcenter";
|
---|
[330] | 802 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
[293] | 803 |
|
---|
[331] | 804 | kw = "setxylimits";
|
---|
| 805 | usage = "Define 2-D plot limits \n Usage: setxylimits xmin xmax ymin ymax";
|
---|
[558] | 806 | usage += "\n Related commands: graphicatt /xylimits";
|
---|
[331] | 807 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 808 |
|
---|
[548] | 809 | kw = "setinsetlimits";
|
---|
| 810 | usage = "Define the display rectangle for drawers added as insets \n";
|
---|
| 811 | usage += " over existing graphic objects - limits expressed as fraction \n";
|
---|
| 812 | usage += " graphic object size (0. .. 1.) Xmax at right, YMax top. ";
|
---|
| 813 | usage += " Usage: setinsetlimits xmin xmax ymin ymax";
|
---|
[558] | 814 | usage += "\n Related commands: graphicatt /inset";
|
---|
[548] | 815 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 816 |
|
---|
[558] | 817 | kw = "setimgcenter";
|
---|
| 818 | usage = "Define image center postion \n Usage: setimgcenter xc yc";
|
---|
| 819 | usage += "\n Related commands: graphicatt /centerimg";
|
---|
| 820 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 821 |
|
---|
[349] | 822 | kw = "addtext";
|
---|
| 823 | usage = "Adds a text string to the current graphic object";
|
---|
[1642] | 824 | usage += "\n at the specified position (+ color and font attributes) ";
|
---|
| 825 | usage += "\n The Base/AxesDrawer is used to handle added text strings" ;
|
---|
| 826 | usage += "\n Alt<Z> to remove added elements";
|
---|
| 827 | usage += "\n Font attribute is common with axes";
|
---|
| 828 | usage += "\n Usage: addtext x y TextString [ColFontAtt]";
|
---|
| 829 | usage += "\n (use quotes '' for multi word text strings) ";
|
---|
| 830 | usage += "\n Related commands: addline addrect addfrect addcirc addfcirc settitle graphicatt";
|
---|
[349] | 831 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 832 |
|
---|
[1642] | 833 | kw = "addline";
|
---|
| 834 | usage = "Adds a line to the current graphic object";
|
---|
| 835 | usage += "\n at the specified position (+ color attribute)";
|
---|
| 836 | usage += "\n The Base/AxesDrawer is used to handle added lines";
|
---|
| 837 | usage += "\n Alt<Z> to remove added elements";
|
---|
| 838 | usage += "\n Usage: addline x1 y1 x2 y2 [ColAtt]";
|
---|
| 839 | usage += "\n Related commands: addtext addrect addfrect addcirc addfcirc graphicatt";
|
---|
| 840 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 841 |
|
---|
| 842 | kw = "addrect";
|
---|
| 843 | usage = "Adds a rectangle to the current graphic object";
|
---|
| 844 | usage += "\n between the specified positions (+ color attribute)";
|
---|
| 845 | usage += "\n The Base/AxesDrawer is used to handle added rectangle";
|
---|
| 846 | usage += "\n Alt<Z> to remove added elements";
|
---|
| 847 | usage += "\n Usage: addrect x1 y1 x2 y2 [ColAtt]";
|
---|
| 848 | usage += "\n Related commands: addtext addline addfrect addcirc addfcirc graphicatt";
|
---|
| 849 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 850 |
|
---|
| 851 | kw = "addfrect";
|
---|
| 852 | usage = "Adds a filled rectangle to the current graphic object";
|
---|
| 853 | usage += "\n between the specified positions (+ color attribute)";
|
---|
| 854 | usage += "\n The Base/AxesDrawer is used to handle added rectangle";
|
---|
| 855 | usage += "\n Alt<Z> to remove added elements";
|
---|
| 856 | usage += "\n Usage: addfrect x1 y1 x2 y2 [ColAtt]";
|
---|
| 857 | usage += "\n Related commands: addtext addline addrect addcirc addfcirc graphicatt";
|
---|
| 858 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 859 |
|
---|
| 860 | kw = "addcirc";
|
---|
| 861 | usage = "Adds a circle to the current graphic object";
|
---|
| 862 | usage += "\n with the specified center and radius (+ color attribute)";
|
---|
| 863 | usage += "\n The Base/AxesDrawer is used to handle added circles";
|
---|
| 864 | usage += "\n Alt<Z> to remove added elements";
|
---|
| 865 | usage += "\n Usage: addcirc xcenter ycenter radius [ColAtt]";
|
---|
| 866 | usage += "\n Related commands: addtext addline addfrect addfrect addfcirc graphicatt";
|
---|
| 867 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 868 |
|
---|
| 869 | kw = "addfcirc";
|
---|
| 870 | usage = "Adds a filled circle to the current graphic object";
|
---|
| 871 | usage += "\n with the specified center and radius (+ color attribute)";
|
---|
| 872 | usage += "\n The Base/AxesDrawer is used to handle added circles";
|
---|
| 873 | usage += "\n Alt<Z> to remove added elements";
|
---|
| 874 | usage += "\n Usage: addcirc xcenter ycenter radius [ColAtt]";
|
---|
| 875 | usage += "\n Related commands: addtext addline addfrect addfrect addcirc graphicatt";
|
---|
| 876 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 877 |
|
---|
[1131] | 878 | kw = "settitle";
|
---|
[1642] | 879 | usage = "Set the title string (top title / bottom title) for the current graphic object";
|
---|
| 880 | usage += "\n Usage: settitle TopTitle [BottomTitle] [fontAtt]";
|
---|
[1131] | 881 | usage += "\n Related commands: addtext graphicatt";
|
---|
| 882 | mpiac->RegisterCommand(kw, usage, this, "Graphics");
|
---|
| 883 |
|
---|
[388] | 884 | RegisterPIGraphicsHelp(mpiac);
|
---|
| 885 |
|
---|
[293] | 886 | kw = "openfits";
|
---|
| 887 | usage = "Loads a FITS file into an Image<T> \n Usage: openfits filename";
|
---|
| 888 | usage += "\n Related commands: savefits openppf";
|
---|
[330] | 889 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 890 | kw = "savefits";
|
---|
| 891 | usage = "Save an object into a FITS file \n Usage: savefits nameobj filename";
|
---|
| 892 | usage += "\n Related commands: openfits saveall";
|
---|
[330] | 893 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 894 | kw = "openppf";
|
---|
| 895 | usage = "Reads all objects from a PPF file \n Usage: openppf filename";
|
---|
| 896 | usage += "\n Related commands: saveall openfits";
|
---|
[330] | 897 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[333] | 898 | kw = "saveobjs";
|
---|
| 899 | usage = "Saves objects with names matching a pattern (x?y*) into a PPF file \n";
|
---|
[1068] | 900 | usage += "Usage: saveobjs nameobjpattern filename";
|
---|
[333] | 901 | usage += "\n Related commands: saveall openppf savefits";
|
---|
| 902 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 903 | kw = "saveall";
|
---|
| 904 | usage = "Saves all objects into a PPF file \n Usage: saveall filename";
|
---|
[333] | 905 | usage += "\n Related commands: saveobj openppf savefits";
|
---|
[330] | 906 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[449] | 907 | kw = "ntfrascii";
|
---|
| 908 | usage = "Fills an existing NTuple from ASCII table file";
|
---|
| 909 | usage += "\n Usage: ntfrascii nt_name file_name [def_init_val]";
|
---|
| 910 | usage += "\n Related commands: ntloop fillnt ";
|
---|
| 911 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 912 |
|
---|
[449] | 913 |
|
---|
[293] | 914 | kw = "print";
|
---|
| 915 | usage = "Prints an object \n Usage: print nameobj";
|
---|
[330] | 916 | mpiac->RegisterCommand(kw, usage, this, "FileIO");
|
---|
[293] | 917 |
|
---|
[333] | 918 | kw = "mkdir";
|
---|
| 919 | usage = "Create a directory";
|
---|
[344] | 920 | usage += "\n Usage: mkdir dirname [true]";
|
---|
| 921 | usage += "\n if second argument==true, the directory's KeepOld attribute is set to true";
|
---|
[463] | 922 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 923 | kw = "rmdir";
|
---|
| 924 | usage = "Removes an empty directory";
|
---|
| 925 | usage += "\n Usage: remove dirname";
|
---|
[463] | 926 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 927 | kw = "cd";
|
---|
| 928 | usage = "Change current directory";
|
---|
| 929 | usage += "\n Usage: cd [dirname]";
|
---|
[463] | 930 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 931 | kw = "pwd";
|
---|
| 932 | usage = "Prints current directory";
|
---|
| 933 | usage += "\n Usage: pwd";
|
---|
[463] | 934 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[333] | 935 | kw = "listdirs";
|
---|
| 936 | usage = "Prints the list of directories";
|
---|
| 937 | usage += "\n Usage: listdirs [patt=*] \n patt : * , ? ";
|
---|
[463] | 938 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[295] | 939 | kw = "listobjs";
|
---|
[333] | 940 | usage = "Prints the list of objects (Alias: ls)";
|
---|
| 941 | usage += "\n Usage: listobjs [patt=*] \n patt : /*/x?y* ... ";
|
---|
[463] | 942 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 943 | kw = "rename";
|
---|
[333] | 944 | usage = "Rename an object (Alias: mv) \n Usage: rename nameobj namenew";
|
---|
[293] | 945 | usage += "\n Related commands: del delobjs";
|
---|
[463] | 946 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
| 947 | kw = "copy";
|
---|
| 948 | usage = "Copy objects \n";
|
---|
| 949 | usage +=" Usage: copy name_from name_to";
|
---|
| 950 | usage += "\n Related commands: new...";
|
---|
| 951 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 952 | kw = "del";
|
---|
[1655] | 953 | usage = "Deletes an object (Alias: rm) \n Usage: del nameobj [nameobj2 ...]";
|
---|
[293] | 954 | usage += "\n Related commands: delobjs rename";
|
---|
[463] | 955 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 956 | kw = "delobjs";
|
---|
| 957 | usage = "Delete a set of objects with names matching a pattern (x?y*)";
|
---|
| 958 | usage += "\n Usage: delobjs nameobjpattern \n";
|
---|
| 959 | usage += "\n Related commands: del rename";
|
---|
[463] | 960 | mpiac->RegisterCommand(kw, usage, this, "Object Management");
|
---|
[293] | 961 |
|
---|
| 962 | kw = "newh1d";
|
---|
| 963 | usage = "Creates a 1D histogramm \n Usage: newh1d name xmin xmax nbin";
|
---|
[1035] | 964 | usage += "\n Related commands: newh2d newprof[e] newnt newgfd ";
|
---|
[333] | 965 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 966 | kw = "newh2d";
|
---|
| 967 | usage = "Creates a 2D histogramm \n Usage: newh2d name xmin xmax nbinx ymin ymax nbiny";
|
---|
[1035] | 968 | usage += "\n Related commands: newh1d newprof[e] newnt newgfd ";
|
---|
[333] | 969 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 970 | kw = "newprof";
|
---|
| 971 | usage = "Creates a profile histogramm \n Usage: newprof name xmin xmax nbin [ymin ymax]";
|
---|
[1035] | 972 | usage += "\n Errors represent the data spread in the X bin ";
|
---|
| 973 | usage += "\n Related commands: newh1d newh2d newprofe newnt newgfd ";
|
---|
[333] | 974 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[1035] | 975 | kw = "newprofe";
|
---|
| 976 | usage = "Creates a profile histogramm \n Usage: newprofe name xmin xmax nbin [ymin ymax]";
|
---|
| 977 | usage += "\n Errors represent the error on the data mean in the X bin ";
|
---|
| 978 | usage += "\n Related commands: newh1d newh2d newprof newnt newgfd ";
|
---|
| 979 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[447] | 980 | kw = "newnt";
|
---|
| 981 | usage = "Creates a ntuple \n Usage: newnt name v1 v2 v3 .. vn";
|
---|
| 982 | usage += "\n newnt name nvar";
|
---|
[1035] | 983 | usage += "\n Related commands: newh1d newh2d newprof[e] newgfd ";
|
---|
[447] | 984 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 985 | kw = "newgfd";
|
---|
| 986 | usage = "Creates GeneralFit Data object \n Usage: newgfd nvar nalloc [errx(0/1)]";
|
---|
[1035] | 987 | usage += "\n Related commands: newh1d newh2d newprof[e] newnt ";
|
---|
[333] | 988 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
| 989 | kw = "newvec";
|
---|
[357] | 990 | usage = "Creates (and optionaly fills) a vector \n Usage: newvec name size [f(i) [dopt] ] ";
|
---|
[333] | 991 | usage += "\n Related commands: newmtx";
|
---|
[357] | 992 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[333] | 993 | kw = "newmtx";
|
---|
[357] | 994 | usage = "Creates (and optionaly fills) a matrix \n";
|
---|
[1917] | 995 | usage +=" Usage: newmtx name sizeX(Col) sizeY(Lines) [f(i,j) [dopt] ] ";
|
---|
[333] | 996 | usage += "\n Related commands: newvec";
|
---|
[357] | 997 | mpiac->RegisterCommand(kw, usage, this, "Objects");
|
---|
[293] | 998 |
|
---|
| 999 | kw = "disp";
|
---|
| 1000 | usage = "Displays an object \n Usage: disp nameobj [graphic_attributes]";
|
---|
[1525] | 1001 | usage += "\n Related commands: surf nt2d nt3d vecplot";
|
---|
[330] | 1002 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[295] | 1003 | kw = "imag";
|
---|
| 1004 | usage = "Displays an object as an image \n Usage: imag nameobj [graphic_attributes]";
|
---|
[1525] | 1005 | usage += "\n Related commands: disp surf nt2d nt3d vecplot";
|
---|
[330] | 1006 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1007 | kw = "surf";
|
---|
| 1008 | usage = "Displays an object as a 3D surface \n Usage: surf nameobj [graphic_attributes]";
|
---|
[1525] | 1009 | usage += "\n Related commands: disp nt2d nt3d vecplot";
|
---|
[330] | 1010 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1011 | kw = "nt2d";
|
---|
[486] | 1012 | usage = "Displays Points (X-Y) [with error-bar / Weight / Label ] from an NTuple ";
|
---|
| 1013 | usage += "\n Usage : nt2d nameobj varx vary [errx erry wt label graphic_attributes]";
|
---|
[1525] | 1014 | usage += "\n Related commands: disp surf nt3d gfd2d vecplot";
|
---|
[330] | 1015 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1016 | kw = "nt3d";
|
---|
[486] | 1017 | usage = "Displays 3D-Points (X-Y-Z) [with error-bars / Weight / Label ] from an NTuple ";
|
---|
| 1018 | usage += "\n Usage : nt3d nameobj varx vary varz [errx erry errz wt label graphic_attributes]";
|
---|
| 1019 | usage += "\n Related commands: disp surf nt2d gfd3d ";
|
---|
[330] | 1020 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[1525] | 1021 | kw = "vecplot";
|
---|
| 1022 | usage = "Displays Points (X-Y) with coordinates defined by two vectors ";
|
---|
| 1023 | usage += "\n Usage : vecplot nameVecX nameVecY [graphic_attributes]";
|
---|
| 1024 | usage += "\n Related commands: disp nt2d ";
|
---|
| 1025 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[339] | 1026 |
|
---|
| 1027 | // Ceci est maintenant obsolete, on garde pour info.
|
---|
[293] | 1028 | kw = "gfd2d";
|
---|
| 1029 | usage = "Displays Points (X-Y) with error-bars from a GeneralFit Data ";
|
---|
| 1030 | usage += "\n Usage : gfd2d nameobj numvarx erreur=(x y xy) [graphic_attributes]";
|
---|
[339] | 1031 | usage += "\n Related commands: gfd3d nt2d nt3d ";
|
---|
| 1032 | usage += "\n ----- OBSOLETE: utilisez nt2d -----";
|
---|
[330] | 1033 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1034 | kw = "gfd3d";
|
---|
| 1035 | usage = "Displays 3D-Points (X-Y-Z) with error-bars from a GeneralFit Data ";
|
---|
| 1036 | usage += "\n Usage : gfd3d nameobj numvarx numvary erreur=(x y z xy xz yz xyz) [graphic_attributes]";
|
---|
| 1037 | usage += "\n Related commands: gfd2d nt2d nt3d ";
|
---|
[339] | 1038 | usage += "\n ----- OBSOLETE: utilisez nt3d -----";
|
---|
[330] | 1039 | mpiac->RegisterCommand(kw, usage, this, "Obj. Display");
|
---|
[293] | 1040 |
|
---|
| 1041 | kw = "func";
|
---|
| 1042 | usage = "Displays a function y=f(x) (Fills a vector with function values)";
|
---|
[1938] | 1043 | usage += "\n Usage: func f(x) xmin xmax [npt graphic_attributes]";
|
---|
[326] | 1044 | usage += "\n Related commands: funcff func2d func2dff ";
|
---|
[330] | 1045 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[326] | 1046 | kw = "funcff";
|
---|
| 1047 | usage = "Displays a function y=f(x) from a C-file (Fills a vector with function values)";
|
---|
[1938] | 1048 | usage += "\n Usage: funcff C-FileName FunctionName xmin xmax [npt graphic_attributes]";
|
---|
[326] | 1049 | usage += "\n Related commands: func func2d func2dff ";
|
---|
[330] | 1050 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[293] | 1051 | kw = "func2d";
|
---|
| 1052 | usage = "Displays a function z=f(x,y) (Fills a matrix with function values)";
|
---|
| 1053 | usage += "\n Usage: func2d f(x,y) xmin xmax nptx ymin ymax npty [graphic_attributes]";
|
---|
| 1054 | usage += "\n Related commands: func";
|
---|
[330] | 1055 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[326] | 1056 | kw = "func2dff";
|
---|
| 1057 | usage = "Displays a function z=f(x,y) from a C-file (Fills a matrix with function values)";
|
---|
| 1058 | usage += "\n Usage: func2dff C-FileName FunctionName xmin xmax nptx ymin ymax npty [graphic_attributes]";
|
---|
| 1059 | usage += "\n Related commands: func funcff func2d ";
|
---|
[330] | 1060 | mpiac->RegisterCommand(kw, usage, this, "Func Plot");
|
---|
[293] | 1061 |
|
---|
[357] | 1062 | kw = "ObjectExpressions";
|
---|
| 1063 | usage = "Any mathematical expression (math.h) with object variables can be used";
|
---|
| 1064 | usage += "\n ------ Object Variable names (double) -------- ";
|
---|
[1548] | 1065 | usage += "\n- NTuple: ntuple variable names";
|
---|
| 1066 | usage += "\n- Histo1D/HProf: i,x,val,err";
|
---|
| 1067 | usage += "\n- Histo2D: i,j,x,y,val,err";
|
---|
| 1068 | usage += "\n- Vector/Matrix: n,r,c,val,real,imag,mod,phas";
|
---|
| 1069 | usage += "\n- TArray: n,x,y,z,t,u,val,real,imag,mod,phas";
|
---|
| 1070 | usage += "\n- Image: i,j,x,y,val(=pix)";
|
---|
| 1071 | usage += "\n- GeneralFitData: x0,ex0 x1,ex1 ... xn,exn y,ey ok";
|
---|
| 1072 | usage += "\n- LocalMap/SphereThetaPhi/SphereHEALPix: ";
|
---|
| 1073 | usage += "\n- i,k,val,real,imag,mod,phas,teta,phi";
|
---|
| 1074 | usage += "\n- FITS Binary/ASCII table: fits column names";
|
---|
| 1075 | usage += "\n ------ Other parameters -------- ";
|
---|
[357] | 1076 | usage += "\nLoop parameters can be specified as I1[:I2[:DI]] for(int i=I1; i<I2; i+=DI)";
|
---|
| 1077 | usage += "\nThe default Cut() expression in true (=1) for all";
|
---|
[1548] | 1078 | usage += "\n\n Related commands: plot2d plot2de plot2dw plot3d ";
|
---|
[357] | 1079 | usage += "\n projh1d projh2d projprof fillvec fillmtx ";
|
---|
| 1080 | usage += "\n fillnt fillgd1 fillgd2 ntloop exptovec ... ";
|
---|
| 1081 | mpiac->RegisterCommand(kw, usage, NULL, "Expr. Plotting");
|
---|
[293] | 1082 | kw = "plot2d";
|
---|
| 1083 | usage = "Plots (2D) Y=g(Object) vs. X=f(Object) --- Object Variable names (double) :";
|
---|
[357] | 1084 | usage += "\n Usage: plot2d nameobj f_X() g_Y() [f_Cut() graphic_attributes loop_param]";
|
---|
| 1085 | usage += "\n Related commands: plot2de plot2dw plot3d ObjectExpressions ...";
|
---|
[330] | 1086 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1087 | kw = "plot2de";
|
---|
| 1088 | usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with error bars eX/Y=f_ErrX/Y(Object) ";
|
---|
| 1089 | usage += "\n Usage: plot2de nameobj f_X() g_Y() f_ErrX() f_ErrY() [f_Cut() graphic_attributes loop_param]";
|
---|
| 1090 | usage += "\n Related commands: plot2d plot2dw plot3d ObjectExpressions ...";
|
---|
| 1091 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[333] | 1092 | kw = "plot2dw";
|
---|
| 1093 | usage = "Plots (2D) Y=g(Object) vs. X=f(Object) with Weight W=h(Object) ";
|
---|
[357] | 1094 | usage += "\n Usage: plot2dw nameobj f_X() g_Y() h_Wt() [Cut() graphic_attributes loop_param]";
|
---|
| 1095 | usage += "\n Related commands: plot2d plot2dw plot3d ObjectExpressions ...";
|
---|
[333] | 1096 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1097 | kw = "plot3d";
|
---|
| 1098 | usage = "Plots (3D) Z=h(Object) vs. Y=g(Object) vs. X=f(Object) vs ";
|
---|
[357] | 1099 | usage += "\n Usage: plot3d nameobj f_X() g_Y() h_Z() [Cut() graphic_attributes loop_param]";
|
---|
| 1100 | usage += "\n Related commands: plot2d plot2dw plot2de plot3d ObjectExpressions ...";
|
---|
[330] | 1101 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1102 |
|
---|
| 1103 | kw = "projh1d";
|
---|
| 1104 | usage = "Projects X=f(Object) with weight WT=h(Object) into a 1D histogram ";
|
---|
[357] | 1105 | usage += "\n Usage: projh1d nameh1d nameobj f_X() [h_WT()=1. Cut() graphic_attributes loop_param]";
|
---|
[293] | 1106 | usage += "\n Histo1D nameh1d is created if necessary ";
|
---|
[357] | 1107 | usage += "\n Related commands: projh2d projprof ObjectExpressions ...";
|
---|
[330] | 1108 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1109 | kw = "projh2d";
|
---|
| 1110 | usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a 2D histogram ";
|
---|
[357] | 1111 | usage += "\n Usage: projh2d nameh2d nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
|
---|
[293] | 1112 | usage += "\n Histo2D nameh2d is created if necessary ";
|
---|
[357] | 1113 | usage += "\n Related commands: projh1d projprof ObjectExpressions ...";
|
---|
[330] | 1114 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1115 | kw = "projprof";
|
---|
| 1116 | usage = "Projects (X=f(Object),Y=g(Object)) with weight WT=h(Object) into a profile histogram ";
|
---|
[709] | 1117 | usage += "\n Usage: projprof nameprof nameobj f_X() g_Y() [h_WT()=1. Cut() graphic_attributes loop_param]";
|
---|
[293] | 1118 | usage += "\n HProf nameprof is created if necessary ";
|
---|
[357] | 1119 | usage += "\n Related commands: projh1d projh2d ObjectExpressions ...";
|
---|
[330] | 1120 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1121 | kw = "fillvec";
|
---|
| 1122 | usage = "Fills a Vector V((int)(f_X(Object)+0.5)) = h_V(Object) ";
|
---|
| 1123 | usage += "\n Usage: fillvec namevec nameobj f_X() h_V() [Cut() graphic_attributes loop_param]";
|
---|
| 1124 | usage += "\n Related commands: fillmtx fillnt ObjectExpressions ...";
|
---|
| 1125 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
| 1126 | kw = "fillmtx";
|
---|
| 1127 | usage = "Fills a Matrix M(Line=g_Y(Object)+0.5, Col=f_X(Object)+0.5)) = h_V(Object) ";
|
---|
| 1128 | usage += "\n Usage: fillvec namevec nameobj f_X() g_Y() h_V() [Cut() graphic_attributes loop_param]";
|
---|
| 1129 | usage += "\n Related commands: fillvec fillnt ObjectExpressions ...";
|
---|
| 1130 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1131 |
|
---|
| 1132 | kw = "fillnt";
|
---|
| 1133 | usage = "Creates and Fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))";
|
---|
[357] | 1134 | usage += "\n Usage: fillnt nameobj f_X() g_Y() h_Z() k_T() [Cut() nameNt loop_param]";
|
---|
[333] | 1135 | usage += "\n Related commands: ntloop plot2d projh1d projh2d projprof ";
|
---|
[357] | 1136 | usage += "\n Related commands: fillvec fillmtx ntloop exptovec fillgd1 fillgd2 ObjectExpressions ...";
|
---|
[330] | 1137 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1138 |
|
---|
[333] | 1139 | kw = "ntloop";
|
---|
| 1140 | usage = "Loops over an Object NTupleInterface calling a function from a C-file \n";
|
---|
| 1141 | usage += "and optionaly fills an NTuple(x,y,z,t) with (X=f(Object),Y=g(...),Z=h(...),T=k(...))";
|
---|
[357] | 1142 | usage += "\n Usage: ntloop nameobj CFileName FuncName [NtupleName loop_param]";
|
---|
| 1143 | usage += "\n Related commands: fillvec fillmtx fillnt fillgd1 fillgd2 exptovec ObjectExpressions ...";
|
---|
[333] | 1144 | usage += "\n Related commands: ntexpcfile fillnt";
|
---|
| 1145 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[357] | 1146 |
|
---|
[333] | 1147 | kw = "ntexpcfile";
|
---|
| 1148 | usage = "Creates a C-File with declarations suitable to be used for ntloop";
|
---|
| 1149 | usage += "\n Usage: ntexpcfile nameobj CFileName FuncName ";
|
---|
| 1150 | usage += "\n Related commands: ntloop";
|
---|
| 1151 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
| 1152 |
|
---|
[357] | 1153 | kw = "exptovec";
|
---|
[293] | 1154 | usage = "Creates and Fills a Vector with X=f(Object)";
|
---|
[357] | 1155 | usage += "\n Usage: exptovec namevec nameobj f_X() [Cut() graphic_attributes loop_param]";
|
---|
| 1156 | usage += "\n Related commands: ntloop fillnt ObjectExpressions ...";
|
---|
[330] | 1157 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1158 | kw = "fillgd1";
|
---|
| 1159 | usage = "Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), ErrY=h(...))";
|
---|
[357] | 1160 | usage += "\n Usage: fillgd1 namegfd nameobj f_X() g_Y() h_ErrY() [Cut() loop_param]";
|
---|
| 1161 | usage += "\n Related commands: ntloop fillnt ObjectExpressions ...";
|
---|
[330] | 1162 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1163 | kw = "fillgd2";
|
---|
| 1164 | usage = "Creates and Fills a GeneralFitData with (X=f(Object), Y=g(...), Z=h(...)) ErrZ=k(...)";
|
---|
[357] | 1165 | usage += "\n Usage: fillgd1 namegfd nameobj f_X() g_Y() h_Z() k_ErrZ() [Cut() loop_param]";
|
---|
| 1166 | usage += "\n Related commands: ntloop fillnt ObjectExpressions ...";
|
---|
[330] | 1167 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[1067] | 1168 | kw = "gdfrvec";
|
---|
| 1169 | usage = "Fills a GeneralFitData with vectors X,Y,Z,EZ";
|
---|
| 1170 | usage += "\n Usage: gdfrvec namegfd X Y";
|
---|
| 1171 | usage += "\n Usage: gdfrvec namegfd X Y ! EY";
|
---|
| 1172 | usage += "\n Usage: gdfrvec namegfd X Y Z";
|
---|
| 1173 | usage += "\n Usage: gdfrvec namegfd X Y Z EZ";
|
---|
| 1174 | usage += "\n Related commands: fillgd1 fillgd2 ...";
|
---|
| 1175 | mpiac->RegisterCommand(kw, usage, this, "Expr. Plotting");
|
---|
[293] | 1176 |
|
---|
| 1177 | }
|
---|
| 1178 |
|
---|
| 1179 | /* --Methode-- */
|
---|
| 1180 | int PIABaseExecutor::LinkUserFuncs(string& fnameso, string& func1, string& func2, string& func3)
|
---|
| 1181 | // string& func4, string& func5)
|
---|
| 1182 | {
|
---|
| 1183 | string cmd;
|
---|
| 1184 |
|
---|
| 1185 | if (dynlink) delete dynlink; dynlink = NULL;
|
---|
| 1186 | usfmap.clear();
|
---|
| 1187 |
|
---|
| 1188 | dynlink = new PDynLinkMgr(fnameso, true);
|
---|
| 1189 | if (dynlink == NULL) {
|
---|
| 1190 | string sn = fnameso;
|
---|
| 1191 | cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur ouverture SO " << sn << endl;
|
---|
| 1192 | return(2);
|
---|
| 1193 | }
|
---|
| 1194 |
|
---|
| 1195 | int nok=0;
|
---|
| 1196 | // on utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++)
|
---|
| 1197 | // DlUserProcFunction f = NULL;
|
---|
| 1198 | DlFunction f = NULL;
|
---|
| 1199 | if ((func1.length() < 1) || (func1 == "-") || (func1 == ".") ) goto fin;
|
---|
| 1200 | // f = (DlUserProcFunction) dlsym(dlhandle, func1.c_str());
|
---|
| 1201 | f = dynlink->GetFunction(func1);
|
---|
| 1202 | if (f) { nok++; usfmap[func1] = f; }
|
---|
| 1203 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func1 << endl;
|
---|
| 1204 |
|
---|
| 1205 | if ((func2.length() < 1) || (func2 == "-") || (func2 == ".") ) goto fin;
|
---|
| 1206 | // f = (DlUserProcFunction) dlsym(dlhandle, func2.c_str());
|
---|
| 1207 | f = dynlink->GetFunction(func2);
|
---|
| 1208 | if (f) { nok++; usfmap[func2] = f; }
|
---|
| 1209 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func2 << endl;
|
---|
| 1210 |
|
---|
| 1211 | if ((func3.length() < 1) || (func3 == "-") || (func3 == ".") ) goto fin;
|
---|
| 1212 | // f = (DlUserProcFunction) dlsym(dlhandle, func3.c_str());
|
---|
| 1213 | f = dynlink->GetFunction(func3);
|
---|
| 1214 | if (f) { nok++; usfmap[func3] = f; }
|
---|
| 1215 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func3 << endl;
|
---|
| 1216 |
|
---|
| 1217 | /* Pb compile g++ 2.7.2
|
---|
| 1218 | if ((func4.length() < 1) || (func4 == "-") || (func4 == ".") ) goto fin;
|
---|
| 1219 | // f = (DlUserProcFunction) dlsym(dlhandle, func4.c_str());
|
---|
| 1220 | f = dynlink->GetFunction(func4);
|
---|
| 1221 | if (f) { nok++; usfmap[func4] = f; }
|
---|
| 1222 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func4 << endl;
|
---|
| 1223 |
|
---|
| 1224 | if ((func5.length() < 1) || (func5 == "-") || (func5 == ".") ) goto fin;
|
---|
| 1225 | // f = (DlUserProcFunction) dlsym(dlhandle, func5.c_str());
|
---|
| 1226 | f = dynlink->GetFunction(func5);
|
---|
| 1227 | if (f) { nok++; usfmap[func5] = f; }
|
---|
| 1228 | else cerr << "PIABaseExecutor/LinkUserFuncs_Erreur: Erreur linking " << func5 << endl;
|
---|
| 1229 | */
|
---|
| 1230 | fin:
|
---|
| 1231 | if (nok < 1) { if (dynlink) delete dynlink; dynlink = NULL; return(3); }
|
---|
| 1232 | else return(0);
|
---|
| 1233 | }
|
---|
| 1234 |
|
---|
[1276] | 1235 | /* --Methode-- */
|
---|
| 1236 | int PIABaseExecutor::LinkUserFuncs2(string& fnameso, string& func1, string& func2, string& func3)
|
---|
| 1237 | {
|
---|
| 1238 | string cmd;
|
---|
| 1239 |
|
---|
| 1240 | if (dynlink2) delete dynlink2; dynlink2 = NULL;
|
---|
| 1241 | usfmap2.clear();
|
---|
| 1242 |
|
---|
| 1243 | dynlink2 = new PDynLinkMgr(fnameso, true);
|
---|
| 1244 | if (dynlink2 == NULL) {
|
---|
| 1245 | string sn = fnameso;
|
---|
| 1246 | cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur ouverture SO " << sn << endl;
|
---|
| 1247 | return(2);
|
---|
| 1248 | }
|
---|
| 1249 |
|
---|
| 1250 | int nok=0;
|
---|
| 1251 | // on utilise donc des DlFunction (Reza 20/08/98) voir commentaire ds .h (pb g++)
|
---|
| 1252 | // DlUserProcFunction f = NULL;
|
---|
| 1253 | DlFunction f = NULL;
|
---|
| 1254 | if ((func1.length() < 1) || (func1 == "-") || (func1 == ".") ) goto fin;
|
---|
| 1255 | f = dynlink2->GetFunction(func1);
|
---|
| 1256 | if (f) { nok++; usfmap2[func1] = f; }
|
---|
| 1257 | else cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur linking " << func1 << endl;
|
---|
| 1258 |
|
---|
| 1259 | if ((func2.length() < 1) || (func2 == "-") || (func2 == ".") ) goto fin;
|
---|
| 1260 | f = dynlink2->GetFunction(func2);
|
---|
| 1261 | if (f) { nok++; usfmap2[func2] = f; }
|
---|
| 1262 | else cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur linking " << func2 << endl;
|
---|
| 1263 |
|
---|
| 1264 | if ((func3.length() < 1) || (func3 == "-") || (func3 == ".") ) goto fin;
|
---|
| 1265 | f = dynlink2->GetFunction(func3);
|
---|
| 1266 | if (f) { nok++; usfmap2[func3] = f; }
|
---|
| 1267 | else cerr << "PIABaseExecutor/LinkUserFuncs2_Erreur: Erreur linking " << func3 << endl;
|
---|
| 1268 |
|
---|
| 1269 | fin:
|
---|
| 1270 | if (nok < 1) { if (dynlink2) delete dynlink2; dynlink2 = NULL; return(3); }
|
---|
| 1271 | else return(0);
|
---|
| 1272 | }
|
---|
| 1273 |
|
---|
[388] | 1274 | /* Nouvelle-Fonction */
|
---|
| 1275 | void RegisterPIGraphicsHelp(PIACmd* piac)
|
---|
| 1276 | {
|
---|
| 1277 | string kw,grp,usage;
|
---|
| 1278 |
|
---|
| 1279 | grp = "Graphics";
|
---|
| 1280 |
|
---|
| 1281 | kw = "PIImage";
|
---|
| 1282 | usage = "Manages the display of a 2-D array (P2DArrayAdapter) as an image \n";
|
---|
| 1283 | usage += "and controls a zoom widget, as well as a global image view widget \n";
|
---|
| 1284 | usage += ">>>> Mouse controls : \n";
|
---|
| 1285 | usage += "o Button-1: Display current coordinates and pixel value\n";
|
---|
| 1286 | usage += " Position the cursor an refresh the zoom widget\n";
|
---|
| 1287 | usage += "o Button-2: Defines an image zone and positions the cursor \n";
|
---|
| 1288 | usage += "o Button-3: Moves the viewed portion of the array inside the window \n";
|
---|
| 1289 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1290 | usage += "o <Alt>R : Refresh display \n";
|
---|
| 1291 | usage += "o <Alt>O : Shows the PIImageTools (image display parameter controls) \n";
|
---|
| 1292 | usage += "o <Alt>G : Show the PIDrawerTools (Graphic attributes of overlayed graphics (Drawers)) \n";
|
---|
| 1293 | usage += "o <Alt>V : Copy/Paste / Text paste at the current cursor position \n";
|
---|
| 1294 | usage += "o <Alt>C : Copy/Paste / Copies the selected regions content as text in the copy/paste buffer \n";
|
---|
| 1295 | usage += "o <Alt>X : Show/Hide the Cut Window \n";
|
---|
| 1296 | usage += "o <Alt>Z : Removes signs overlayed on image (Drawer 0) \n";
|
---|
| 1297 | usage += "o Cursor keys : Moves the image cursor \n";
|
---|
| 1298 | piac->RegisterHelp(kw, usage, grp);
|
---|
| 1299 |
|
---|
| 1300 | kw = "PIScDrawWdg";
|
---|
| 1301 | usage = "Manages display of 2-D drawers with interactive zoom \n";
|
---|
| 1302 | usage += ">>>> Mouse controls : \n";
|
---|
| 1303 | usage += "o Button-1: Display current coordinates \n";
|
---|
| 1304 | usage += "o Button-2: Defines a rectangle for zoom \n";
|
---|
| 1305 | usage += "o Button-3: Defines a rectangle for Text-Info (<Alt>I) \n";
|
---|
| 1306 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1307 | usage += "o <Alt>R : Refresh display \n";
|
---|
| 1308 | usage += "o <Alt>O : Displays a specific control window (default: PIDrawerTools) \n";
|
---|
| 1309 | usage += " Specific controls for 2-D histograms \n";
|
---|
| 1310 | usage += "o <Alt>G : Show the PIDrawerTools (Graphic attributes of displayed Drawers) \n";
|
---|
| 1311 | usage += " Drawer 0 manages the axes, as well as the added text \n";
|
---|
| 1312 | usage += "o <Alt>V : Copy/Paste / Text paste at the current position \n";
|
---|
| 1313 | usage += "o <Alt>Z : Removes added signs (text) to Drawer 0 \n";
|
---|
[1134] | 1314 | usage += "o <Alt>I : Shows (or updates) a text info window on the selected rectangle \n";
|
---|
[1911] | 1315 | usage += "o <Alt>M : Activate/Deactivate a measurement cursor on Button-1\n";
|
---|
| 1316 | usage += "o <Alt>L : Deactivate DX,DY print (see below)\n";
|
---|
[1883] | 1317 | usage += ">>>> Mouse + Keyboard controls : \n";
|
---|
| 1318 | usage += "o Button-1 + <Alt>K : Set (reset) the reference point for DX,DY print \n";
|
---|
[388] | 1319 | piac->RegisterHelp(kw, usage, grp);
|
---|
| 1320 |
|
---|
| 1321 | kw = "PIDraw3DWdg";
|
---|
| 1322 | usage = "Manages display of 3-D objects (drawers) \n";
|
---|
| 1323 | usage += ">>>> Mouse controls : \n";
|
---|
| 1324 | usage += "o Button-2: Rotates the observer (camera) around object \n";
|
---|
| 1325 | usage += "o Shift-Button-2: Rotates object with camera fixed \n";
|
---|
| 1326 | usage += " The object rotation mode can be assigned to Button-2 with <Alt>S \n";
|
---|
| 1327 | usage += "o Button-3: Zoom control (Camera distance And/Or view angle) \n";
|
---|
| 1328 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1329 | usage += "o <Alt>R : Resets the 3-D view and refreshes the display \n";
|
---|
| 1330 | usage += "o <Alt>G : Show the PIDrawerTools (Graphic attributes of displayed Drawers) \n";
|
---|
| 1331 | usage += "o <Alt>O : = <Alt>G \n";
|
---|
| 1332 | usage += "o <Alt>V : Copy/Paste / Text paste at the current position (Drawer 0)\n";
|
---|
| 1333 | usage += "o <Alt>Z : Removes added signs (text) to Drawer 0 \n";
|
---|
| 1334 | usage += "o <Alt>A : Activate/Deactivate axes drawing \n";
|
---|
| 1335 | usage += "o <Alt>S : Activate/Deactivate object rotation mode on Button-2 \n";
|
---|
| 1336 | piac->RegisterHelp(kw, usage, grp);
|
---|
| 1337 |
|
---|
| 1338 | kw = "Windows";
|
---|
| 1339 | usage = "Objects can be displayed in different windows, or overlayed on the \n";
|
---|
| 1340 | usage += "previous display. The graphics attributes next,win,stack,same control \n";
|
---|
| 1341 | usage += "the display window. \n";
|
---|
| 1342 | usage += "o GraphicWindow : This is the default mode (gr_att=next)\n";
|
---|
| 1343 | usage += " Graphic windows can be divided int zones. Object is displayed \n";
|
---|
| 1344 | usage += " in the next available position, removing a previously displayed \n";
|
---|
| 1345 | usage += " widget if necessary \n";
|
---|
| 1346 | usage += "o Window : An object is displayed in its own window (gr_att= win) \n";
|
---|
| 1347 | usage += "o StackWindow : multpile widgets can be stacked in a StackWindow (gr_att= stack) \n";
|
---|
| 1348 | usage += " A single widget is displayed a any time. Different widgets in a StackWindow \n";
|
---|
| 1349 | usage += " can be displayed using the stacknext command, as well as the StackTools item \n";
|
---|
| 1350 | usage += " in the Tools menu (from Menubar). An automatic cyclic display mode can also \n";
|
---|
| 1351 | usage += " be activated using the StackTools menu (Blink) \n";
|
---|
[548] | 1352 | usage += "o Most objects can be also be displayed overlayed \n";
|
---|
| 1353 | usage += " on the last displayed widget (gr_att= same) \n";
|
---|
| 1354 | usage += "o The overlay can be on a selected rectangle of the \n";
|
---|
| 1355 | usage += " last displayed widget (gr_att= inset) - See setinsetlimits\n";
|
---|
[553] | 1356 | usage += "\n Related commands: newwin zone stacknext graphicatt setinsetlimits";
|
---|
[388] | 1357 | piac->RegisterHelp(kw, usage, grp);
|
---|
[484] | 1358 |
|
---|
| 1359 | kw = "PIConsole";
|
---|
| 1360 | usage = "Text output area and command editing window (console) \n";
|
---|
| 1361 | usage += ">>>> Mouse controls : \n";
|
---|
| 1362 | usage += "o Button-1: Rectangle selection for copy/paste \n";
|
---|
| 1363 | usage += "o Button-2: Paste text in the command editing line \n";
|
---|
| 1364 | usage += "o Button-3: activate display option menu \n";
|
---|
| 1365 | usage += ">>>> Keyboard controls : \n";
|
---|
| 1366 | usage += "o <Alt>O : activate display option menu \n";
|
---|
| 1367 | usage += "o <Alt>V : Paste text in the command editing line \n";
|
---|
| 1368 | usage += "o <Alt>A : Selection of the whole window for copy \n";
|
---|
| 1369 | usage += "o <Alt>L : Command history (List of command history buffer) \n";
|
---|
| 1370 | usage += "o <Ctl>A : Command editing -> Goto the beginning of line \n";
|
---|
| 1371 | usage += "o <Ctl>E : Command editing -> Goto the end of line \n";
|
---|
| 1372 | usage += "o <Ctl>K : Command editing -> Clear to the end of line \n";
|
---|
| 1373 | usage += "o <Ctl>C : Command editing -> Clear the line \n";
|
---|
| 1374 | usage += "o Cursor left,right : Command editing -> Move cursor \n";
|
---|
| 1375 | usage += "o Cursor Up,Down : recall command from history buffer \n";
|
---|
| 1376 | usage += "o Backspace,Del : Command editing \n";
|
---|
| 1377 | usage += "o <Return>,<Enter> : Execute command \n";
|
---|
| 1378 | piac->RegisterHelp(kw, usage, grp);
|
---|
[388] | 1379 | }
|
---|