source: Sophya/trunk/SophyaPI/PIext/basexecut.cc@ 2011

Last change on this file since 2011 was 1971, checked in by ansari, 23 years ago

1/ Basculement de decodage des options de display aux methodes
PIDrawer/PIWdg::DecodeOptionString()
2/ Possibilite de Show/Hide de la partie Zoom/ColorMap/Stat du MainWindow

Reza 30/4/2002

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