source: Sophya/trunk/SophyaPI/PIext/servnobjm.cc@ 331

Last change on this file since 331 was 331, checked in by ercodmgr, 26 years ago

Ajout SetXYLimits et debut d'introduction de repertoire dans la gestion des objets nommes - Reza 28/6/99

File size: 16.9 KB
Line 
1#include <stdio.h>
2#include <stdlib.h>
3#include <ctype.h>
4
5#include <typeinfo>
6#include <iostream.h>
7#include <string>
8#include <list>
9#include <map>
10#if defined(__KCC__)
11using std::string ;
12#include <list.h>
13#include <map.h>
14#endif
15
16#include "strutil.h"
17
18#include "nobjmgr.h"
19#include "servnobjm.h"
20#include "nomgadapter.h"
21#include "pistdimgapp.h"
22
23#include "histos.h"
24#include "histos2.h"
25#include "ntuple.h"
26#include "hisprof.h"
27
28#include "piscdrawwdg.h"
29#include "pisurfdr.h"
30#include "pipodrw.h"
31
32
33
34/* --Methode-- */
35Services2NObjMgr::Services2NObjMgr(PIStdImgApp* app, string& tmpdir)
36{
37TmpDir = tmpdir;
38PDynLinkMgr::SetTmpDir(tmpdir);
39mImgapp = app;
40dynlink = NULL;
41InitGrAttNames();
42}
43
44/* --Methode-- */
45Services2NObjMgr::~Services2NObjMgr()
46{
47CloseDLL();
48}
49
50/* --Methode-- */
51void Services2NObjMgr::RegisterClass(AnyDataObj* o, NObjMgrAdapter* oa)
52{
53ObjAdaptList::iterator it;
54for(it = objadaplist.begin(); it != objadaplist.end(); it++)
55 if (typeid(*o) == typeid(*((*it).obj))) THROW(dupIdErr);
56
57dataobj_adapter oba;
58oba.obj = o;
59oba.obja = oa;
60objadaplist.push_back(oba);
61}
62
63/* --Methode-- */
64NObjMgrAdapter* Services2NObjMgr::GetAdapter(AnyDataObj* o)
65{
66ObjAdaptList::iterator it;
67for(it = objadaplist.begin(); it != objadaplist.end(); it++)
68 if (typeid(*o) == typeid(*((*it).obj))) return((*it).obja->Clone(o));
69return(new NObjMgrAdapter(o));
70}
71
72/* --Methode-- */
73void Services2NObjMgr::Nobj_ComputeExpressions(NObjMgrAdapter* obja, string& expx, string& expy, string& expz,
74 string& expwt, string& expcut, NTuple* nt, Histo* h1, Histo2D* h2, HProf* hp)
75{
76if (obja == NULL) return;
77NTupleInterface* objnt = obja->GetNTupleInterface();
78if (objnt == NULL) return;
79string vardec = objnt->VarList_C("_zz61qq_");
80
81PlotExprFunc f = LinkExprFunc(vardec, expx, expy, expz, expwt, expcut);
82if (!f) {
83 cerr << "NamedObjMgr_ComputeExpressions() Error Creation PlotExprFunc " << endl;
84 return;
85 }
86
87double xnt[10];
88float fxnt[10];
89
90int i,j,k;
91for(i=0; i<10; i++) xnt[i] = 0.;
92
93TRY {
94 double* xn;
95 for(k=0; k<objnt->NbLines(); k++) {
96 xn = objnt->GetLineD(k);
97 if (f(xn, xnt, xnt+1, xnt+2, xnt+3) != 0) {
98 if (nt) {
99 for(i=0; i<4; i++) fxnt[i] = xnt[i];
100 nt->Fill(fxnt);
101 }
102 if (h1) h1->Add(xnt[0], xnt[3]);
103 if (h2) h2->Add(xnt[0], xnt[1], xnt[3]);
104 if (hp) hp->Add(xnt[0], xnt[1], xnt[3]);
105 }
106 }
107 }
108CATCH(merr) {
109 fflush(stdout);
110 cout << endl;
111 cerr << endl;
112 string es = PeidaExc(merr);
113 cerr << "NamedObjMgr_ComputeExpressions() Exception :" << merr << es;
114 } ENDTRY;
115
116
117// Fermeture du fichier .so
118CloseDLL();
119return;
120}
121
122
123/* --Methode-- */
124PlotExprFunc Services2NObjMgr::LinkExprFunc(string& vardec, string& expx, string& expy, string& expz,
125 string& expwt, string& cut)
126{
127FILE *fip;
128string fname = TmpDir + "expf_pia_dl.c";
129string cmd;
130int rc;
131
132cmd = "rm -f " + fname;
133rc = system(cmd.c_str());
134//DBG printf("LinkExprFunc_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
135
136if ((fip = fopen(fname.c_str(), "w")) == NULL) {
137 string sn = fname;
138 cout << "NamedObjMgr/LinkExprFunc_Erreur: Pb. Ouverture " << sn << endl;
139 return(NULL);
140 }
141
142// constitution du fichier a compiler
143fputs("#include <math.h> \n", fip);
144fputs("int expf_pia_dl_func(double* _zz61qq_, double* _rx_61qq_, double* _ry_61qq_, double* _rz_61qq_, double* _wt_61qq_) \n{\n", fip);
145fprintf(fip,"%s \n", vardec.c_str());
146fprintf(fip, "if (!(%s)) { *_rx_61qq_ = *_ry_61qq_ = *_rz_61qq_ = *_wt_61qq_ = 0.; return(0); } \n", cut.c_str());
147fprintf(fip, "*_rx_61qq_ = %s ; \n", expx.c_str());
148fprintf(fip, "*_ry_61qq_ = %s ; \n", expy.c_str());
149fprintf(fip, "*_rz_61qq_ = %s ; \n", expz.c_str());
150fprintf(fip, "*_wt_61qq_ = %s ; \n", expwt.c_str());
151fputs("return(1); \n} \n", fip);
152fclose(fip);
153string func = "expf_pia_dl_func";
154return((PlotExprFunc)LinkFunctionFromFile(fname, func));
155}
156
157
158/* --Methode-- */
159DlFunction Services2NObjMgr::LinkFunctionFromFile(string const & fname, string const & funcname)
160{
161// Le link dynamique
162CloseDLL();
163dynlink = PDynLinkMgr::BuildFromCFile(fname);
164if (dynlink == NULL) {
165 cerr << "NamedObjMgr/LinkFunctionFromFile_Erreur: Erreur creation/Ouverture SO " << endl;
166 return(NULL);
167 }
168
169DlFunction retfunc = dynlink->GetFunction(funcname);
170if (retfunc == NULL) {
171 string sn = funcname;
172 cerr << "NamedObjMgr/LinkExprFunc_Erreur: Erreur linking " << sn << endl;
173 CloseDLL();
174 return(NULL);
175 }
176else return(retfunc);
177}
178
179/* --Methode-- */
180void Services2NObjMgr::CloseDLL()
181{
182if (dynlink) delete dynlink; dynlink = NULL;
183}
184
185/* --Methode-- */
186void Services2NObjMgr::PlotFunc(string const & expfunc, float xmin, float xmax, int np, string dopt)
187{
188FILE *fip;
189string fname = TmpDir + "func1_pia_dl.c";
190string cmd;
191int rc;
192
193if (!mImgapp) return;
194
195cmd = "rm -f " + fname;
196rc = system(cmd.c_str());
197// printf("PlotFunc_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
198
199if ((fip = fopen(fname.c_str(), "w")) == NULL) {
200 string sn = fname;
201 cout << "NamedObjMgr/PlotFunc_Erreur: Pb. Ouverture " << sn << endl;
202 return;
203 }
204
205// constitution du fichier a compiler
206fputs("#include <math.h> \n", fip);
207fputs("double func1_pia_dl_func(double x) \n{\n", fip);
208fprintf(fip,"return(%s); \n}\n", expfunc.c_str());
209fclose(fip);
210
211string func = "func1_pia_dl_func";
212DlFunctionOfX f = (DlFunctionOfX) LinkFunctionFromFile(fname, func);
213if (!f) return;
214PlotFunc(f, xmin, xmax, np, dopt);
215CloseDLL();
216return;
217}
218
219/* --Methode-- */
220void Services2NObjMgr::PlotFunc2D(string const & expfunc, float xmin, float xmax, float ymin, float ymax,
221 int npx, int npy, string dopt)
222{
223FILE *fip;
224string fname = TmpDir + "func2_pia_dl.c";
225string cmd;
226int rc;
227
228if (!mImgapp) return;
229
230cmd = "rm " + fname;
231rc = system(cmd.c_str());
232// printf("PlotFunc2D_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
233
234if ((fip = fopen(fname.c_str(), "w")) == NULL) {
235 string sn = fname;
236 cout << "NamedObjMgr/PlotFunc2D_Erreur: Pb. Ouverture " << sn << endl;
237 return;
238 }
239
240// constitution du fichier a compiler
241fputs("#include <math.h> \n", fip);
242fputs("double func2_pia_dl_func(double x, double y) \n{\n", fip);
243fprintf(fip,"return(%s); \n}\n", expfunc.c_str());
244fclose(fip);
245
246string func = "func2_pia_dl_func";
247DlFunctionOfXY f = (DlFunctionOfXY) LinkFunctionFromFile(fname, func);
248if (!f) return;
249PlotFunc2D(f, xmin, xmax, ymin, ymax, npx, npy, dopt);
250CloseDLL();
251return;
252}
253
254/* --Methode-- */
255void Services2NObjMgr::PlotFuncFrCFile(string const & fname, string const & func, float xmin, float xmax,
256 int np, string dopt)
257{
258DlFunctionOfX f = (DlFunctionOfX) LinkFunctionFromFile(fname, func);
259if (!f) return;
260PlotFunc(f, xmin, xmax, np, dopt);
261CloseDLL();
262return;
263}
264
265/* --Methode-- */
266void Services2NObjMgr::PlotFunc2DFrCFile(string const & fname, string const & func, float xmin, float xmax,
267 float ymin, float ymax, int npx, int npy, string dopt)
268{
269DlFunctionOfXY f = (DlFunctionOfXY) LinkFunctionFromFile(fname, func);
270if (!f) return;
271PlotFunc2D(f, xmin, xmax, ymin, ymax, npx, npy, dopt);
272CloseDLL();
273return;
274}
275
276/* --Methode-- */
277void Services2NObjMgr::PlotFunc(DlFunctionOfX f, float xmin, float xmax, int np, string dopt)
278{
279if (!mImgapp) return;
280
281int k;
282if (np < 1) np = 1;
283if (xmax <= xmin) xmax = xmin+1.;
284Vector* vpy = new Vector(np);
285
286double xx;
287double dx = (xmax-xmin)/np;
288TRY {
289 for(k=0; k<np; k++) { xx = xmin+dx*k; (*vpy)(k) = f(xx); }
290} CATCH(merr) {
291 fflush(stdout);
292 cout << endl;
293 cerr << endl;
294 string es = PeidaExc(merr);
295 cerr << "Services2NObjMgr::PlotFunc() Exception :" << merr << es;
296 delete vpy;
297 vpy = NULL;
298 } ENDTRY;
299
300
301if (vpy) {
302 string nom = "Func";
303 P1DArrayAdapter* vya = new POVectorAdapter(vpy, true);
304 vya->DefineXCoordinate(xmin, (xmax-xmin)/np);
305 PIYfXDrawer* dr = new PIYfXDrawer(vya, NULL, true) ;
306 bool fgsr = true;
307 dopt = "thinline," + dopt;
308 int opt = DecodeDispOption(dopt, fgsr);
309 int wrsid = mImgapp->DispScDrawer(dr, nom, opt);
310 if (fgsr) mImgapp->RestoreGraphicAtt();
311 }
312
313return;
314}
315
316/* --Methode-- */
317void Services2NObjMgr::PlotFunc2D(DlFunctionOfXY f, float xmin, float xmax, float ymin, float ymax,
318 int npx, int npy, string dopt)
319{
320if (!mImgapp) return;
321
322if (npx < 3) npx = 3;
323if (npy < 3) npy = 3;
324if (npx > 250) npx = 250;
325if (npy > 250) npy = 250;
326if (xmax <= xmin) xmax = xmin+1.;
327if (ymax <= ymin) ymax = ymin+1.;
328
329Matrix* mtx = new Matrix(npy, npx);
330
331int i,j;
332double xx, yy;
333double dx = (xmax-xmin)/npx;
334double dy = (ymax-ymin)/npy;
335// printf(" -- DBG -- %d %d , %g %g , %g %g \n", npx, npy, xmin, xmax, ymin, ymax);
336TRY {
337 for(j=0; j<npy; j++) {
338 yy = ymin+dy*j;
339 for(i=0; i<npx; i++) {
340 xx = xmin+dx*i;
341 (*mtx)(j, i) = f(xx, yy);
342 }
343 }
344} CATCH(merr) {
345 fflush(stdout);
346 cout << endl;
347 cerr << endl;
348 string es = PeidaExc(merr);
349 cerr << "Services2NObjMgr::PlotFunc2D() Exception :" << merr << es;
350 delete mtx; mtx = NULL;
351 } ENDTRY;
352
353if (mtx) {
354 string nom = "Func2";
355 int wrsid = 0;
356 bool fgsr = true;
357 int opt = DecodeDispOption(dopt, fgsr);
358 P2DArrayAdapter* arr = new POMatrixAdapter(mtx, true);
359 arr->DefineXYCoordinates(xmin, ymin, dx, dy);
360 PISurfaceDrawer* sdr = new PISurfaceDrawer(arr, true, true, true);
361 wrsid = mImgapp->Disp3DDrawer(sdr, nom, opt);
362 if (fgsr) mImgapp->RestoreGraphicAtt();
363 }
364
365return;
366}
367
368/* --Methode-- */
369string Services2NObjMgr::FileName2Name(string const & fn)
370{
371
372char fsep[2] = {FILESEP, '\0'};
373char tsep[2] = {'.', '\0'};
374size_t p = fn.find_last_of(fsep);
375size_t l = fn.length();
376if (p >= l) p = 0;
377else p++;
378size_t q = fn.find_first_of(tsep,p);
379if (q < p) q = l;
380return(fn.substr(p,q-p));
381}
382
383
384typedef vector<string> GraTok;
385
386/* --Methode-- */
387int Services2NObjMgr::DecodeDispOption(string& gratt, bool& fgsrgr)
388{
389int ropt = Disp_Next;
390if (!mImgapp) return(ropt);
391
392for(int i=0; i<gratt.length(); i++) gratt[i] = tolower(gratt[i]);
393
394if (fgsrgr) mImgapp->SaveGraphicAtt();
395
396if ( (gratt == "def") || (gratt == "default") ) { // Remise aux valeurs par defaut = non defini
397 mImgapp->SetColAtt();
398 mImgapp->SetLineAtt();
399 mImgapp->SetFontAtt();
400 mImgapp->SetMarkerAtt();
401 mImgapp->SetColMapId();
402 mImgapp->SetZoomAtt();
403 mImgapp->SetAxesAtt();
404 mImgapp->SetXYLimits();
405 mImgapp->UseXYLimits();
406 return(ropt);
407 }
408
409// On separe en mots separes par des virgules
410gratt = ","+gratt;
411size_t p = 0;
412size_t q = 0;
413size_t l = gratt.length();
414string token;
415
416GraTok grt;
417
418while (q < l) {
419 p = gratt.find_first_not_of(" ,",q+1); // au debut d'un token
420 if (p>=l) break;
421 q = gratt.find_first_of(" ,",p); // la fin du token;
422 token = gratt.substr(p,q-p);
423 grt.push_back(token);
424 }
425
426
427static GrAttNames::iterator it;
428
429int k;
430bool fgcont = true;
431fgsrgr = false;
432
433for(k=0; k<grt.size(); k++) {
434// cout << "--DBG--SetGraphicAttributes() " << grt[k] << endl;
435
436 // Decodage option affichage (win, next, etc
437 fgcont = true;
438 if ( (grt[k] == "win") || (grt[k] == "w") ) ropt = Disp_Win;
439 else if ( (grt[k] == "same") || (grt[k] == "s") ) ropt = Disp_Same;
440 else if ( (grt[k] == "stack") || (grt[k] == "st") ) ropt = Disp_Stack;
441 else fgcont = false;
442 if (fgcont) continue;
443
444 // Utilisation limites X-Y
445 if ( grt[k] == "xylimits" ) { mImgapp->UseXYLimits(true); fgsrgr = true; continue; }
446 // Si c'est une couleur
447 it = GrAcolors.find(grt[k]);
448 if (it != GrAcolors.end()) { mImgapp->SetColAtt((PIColors)((*it).second.a1)); fgsrgr = true; continue; }
449 // Si c'est un attribut de lignes
450 it = GrAlines.find(grt[k]);
451 if (it != GrAlines.end()) { mImgapp->SetLineAtt((PILineAtt)((*it).second.a1)); fgsrgr = true; continue; }
452 // Si c'est un attribut de fontes
453 it = GrAfonts.find(grt[k]);
454 if (it != GrAfonts.end()) { mImgapp->SetFontAtt((PIFontSize)((*it).second.a2), (PIFontAtt)((*it).second.a1) );
455 fgsrgr = true; continue; }
456 // Si c'est un attribut de markers
457 it = GrAmarkers.find(grt[k]);
458 if (it != GrAmarkers.end()) { mImgapp->SetMarkerAtt((*it).second.a2, (PIMarker)((*it).second.a1) );
459 fgsrgr = true; continue; }
460 // Si c'est un colormap
461 it = GrAcmap.find(grt[k]);
462 if (it != GrAcmap.end()) { mImgapp->SetColMapId( (CMapId)((*it).second.a1) ); fgsrgr = true; continue; }
463 // Si c'est un facteur de zoom
464 it = GrAzoom.find(grt[k]);
465 if (it != GrAzoom.end()) { mImgapp->SetZoomAtt( (*it).second.a1 ); fgsrgr = true; continue; }
466 // Si c'est un attribut d'axe
467 it = GrAaxes.find(grt[k]);
468 if (it != GrAaxes.end()) { mImgapp->SetAxesAtt( (*it).second.a1 ); fgsrgr = true; continue; }
469
470 }
471
472return(ropt);
473}
474
475
476
477// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
478// Initialisation des chaines de caracteres designant les attributs graphiques
479
480/* --Methode-- */
481void Services2NObjMgr::InitGrAttNames()
482{
483gratt_item gi;
484// Les couleurs
485gi.a2 = 0;
486gi.a1 = PI_NotDefColor;
487GrAcolors["defcol"] = gi;
488gi.a1 = PI_Black;
489GrAcolors["black"] = gi;
490gi.a1 = PI_White;
491GrAcolors["white"] = gi;
492gi.a1 = PI_Grey;
493GrAcolors["grey"] = gi;
494gi.a1 = PI_Red;
495GrAcolors["red"] = gi;
496gi.a1 = PI_Blue;
497GrAcolors["blue"] = gi;
498gi.a1 = PI_Green;
499GrAcolors["green"] = gi;
500gi.a1 = PI_Yellow;
501GrAcolors["yellow"] = gi;
502gi.a1 = PI_Magenta;
503GrAcolors["magenta"] = gi;
504
505gi.a1 = PI_Cyan;
506GrAcolors["cyan"] = gi;
507gi.a1 = PI_Turquoise;
508GrAcolors["turquoise"] = gi;
509gi.a1 = PI_NavyBlue;
510GrAcolors["navyblue"] = gi;
511gi.a1 = PI_Orange;
512GrAcolors["orange"] = gi;
513gi.a1 = PI_SiennaRed;
514GrAcolors["siennared"] = gi;
515gi.a1 = PI_Purple;
516GrAcolors["purple"] = gi;
517gi.a1 = PI_LimeGreen;
518GrAcolors["limegreen"] = gi;
519gi.a1 = PI_Gold;
520GrAcolors["gold"] = gi;
521
522// Les attributs de lignes
523gi.a2 = 0;
524gi.a1 = PI_NotDefLineAtt;
525GrAlines["defline"] = gi;
526gi.a1 = PI_NormalLine;
527GrAlines["normalline"] = gi;
528gi.a1 = PI_ThinLine;
529GrAlines["thinline"] = gi;
530gi.a1 = PI_ThickLine;
531GrAlines["thickline"] = gi;
532gi.a1 = PI_DashedLine;
533GrAlines["dashedline"] = gi;
534gi.a1 = PI_ThinDashedLine;
535GrAlines["thindashedline"] = gi;
536gi.a1 = PI_ThickDashedLine;
537GrAlines["thickdashedline"] = gi;
538gi.a1 = PI_DottedLine;
539GrAlines["dottedline"] = gi;
540gi.a1 = PI_ThinDottedLine;
541GrAlines["thindottedline"] = gi;
542gi.a1 = PI_ThickDottedLine;
543GrAlines["thickdottedline"] = gi;
544
545// Les fontes
546gi.a2 = PI_NotDefFontSize;
547gi.a1 = PI_NotDefFontAtt;
548GrAlines["deffont"] = gi;
549
550gi.a2 = PI_NormalSizeFont;
551gi.a1 = PI_RomanFont;
552GrAlines["normalfont"] = gi;
553gi.a1 = PI_BoldFont;
554GrAlines["boldfont"] = gi;
555gi.a1 = PI_ItalicFont;
556GrAlines["italicfont"] = gi;
557gi.a2 = PI_SmallSizeFont;
558gi.a1 = PI_RomanFont;
559GrAlines["smallfont"] = gi;
560gi.a1 = PI_BoldFont;
561GrAlines["smallboldfont"] = gi;
562gi.a1 = PI_ItalicFont;
563GrAlines["smallitalicfont"] = gi;
564gi.a2 = PI_BigSizeFont;
565gi.a1 = PI_RomanFont;
566GrAlines["bigfont"] = gi;
567gi.a1 = PI_BoldFont;
568GrAlines["bigboldfont"] = gi;
569gi.a1 = PI_ItalicFont;
570GrAlines["bigitalicfont"] = gi;
571gi.a2 = PI_HugeSizeFont;
572gi.a1 = PI_RomanFont;
573GrAlines["hugefont"] = gi;
574gi.a1 = PI_BoldFont;
575GrAlines["hugeboldfont"] = gi;
576gi.a1 = PI_ItalicFont;
577GrAlines["hugeitalicfont"] = gi;
578
579
580// Les markers
581const char* mrkn[11] = { "dotmarker", "plusmarker", "crossmarker",
582 "circlemarker", "fcirclemarker", "boxmarker", "fboxmarker",
583 "trianglemarker", "ftrianglemarker", "starmarker", "fstarmarker"};
584PIMarker mrk[11] = { PI_DotMarker, PI_PlusMarker, PI_CrossMarker,
585 PI_CircleMarker, PI_FCircleMarker, PI_BoxMarker, PI_FBoxMarker,
586 PI_TriangleMarker, PI_FTriangleMarker, PI_StarMarker, PI_FStarMarker};
587
588gi.a2 = 0;
589gi.a1 = PI_NotDefMarker;
590GrAmarkers["defmarker"] = gi;
591
592for(int j=0; j<11; j++) {
593 string smrk;
594 char buff[16];
595 for(int m=1; m<10; m+=2) {
596 sprintf(buff,"%d",m);
597 smrk = (string)mrkn[j] + (string)buff;
598 gi.a1 = mrk[j]; gi.a2 = m;
599 GrAmarkers[smrk] = gi;
600 }
601 }
602
603// Les tables de couleurs
604gi.a2 = 0;
605gi.a1 = CMAP_OTHER;
606GrAcmap["defcmap"] = gi;
607gi.a1 = CMAP_GREY32;
608GrAcmap["grey32"] = gi;
609gi.a1 = CMAP_GREYINV32;
610GrAcmap["greyinv32"] = gi;
611gi.a1 = CMAP_COLRJ32;
612GrAcmap["colrj32"] = gi;
613gi.a1 = CMAP_COLBR32;
614GrAcmap["colbr32"] = gi;
615gi.a1 = CMAP_GREY128;
616GrAcmap["grey128"] = gi;
617gi.a1 = CMAP_GREYINV128;
618GrAcmap["greyinv128"] = gi;
619gi.a1 = CMAP_COLRJ128;
620GrAcmap["colrj128"] = gi;
621gi.a1 = CMAP_COLBR128;
622GrAcmap["colbr128"] = gi;
623
624// La valeur de zoom
625gi.a2 = 0;
626gi.a1 = 0;
627GrAzoom["defzoom"] = gi;
628gi.a1 = 1;
629GrAzoom["zoomx1"] = gi;
630gi.a1 = 2;
631GrAzoom["zoomx2"] = gi;
632gi.a1 = 3;
633GrAzoom["zoomx3"] = gi;
634gi.a1 = 4;
635GrAzoom["zoomx4"] = gi;
636gi.a1 = 5;
637GrAzoom["zoomx5"] = gi;
638gi.a1 = -2;
639GrAzoom["zoom/2"] = gi;
640gi.a1 = -3;
641GrAzoom["zoom/3"] = gi;
642gi.a1 = -4;
643GrAzoom["zoom/4"] = gi;
644gi.a1 = -5;
645GrAzoom["zoom/5"] = gi;
646
647// Attributs d'axes
648gi.a2 = 0;
649gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels);
650GrAaxes["stdaxes"] = gi;
651GrAaxes["defaxes"] = gi;
652GrAaxes["boxaxes"] = gi;
653gi.a1 = (int)kAxesDflt;
654GrAaxes["simpleaxes"] = gi;
655gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels | kGridOn);
656GrAaxes["boxaxesgrid"] = gi;
657
658gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks);
659GrAaxes["fineaxes"] = gi;
660 gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn);
661GrAaxes["grid"] = gi;
662GrAaxes["fineaxesgrid"] = gi;
663
664}
Note: See TracBrowser for help on using the repository browser.