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

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

1/ NTupleInterface mis ds Outils++ et complete -
2/ Les PINtuple et PINtup3D utilisent maintenant NTupleInterface
3/ Debut modification interface NObjMgr - Reza 23/6/99

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