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__)
|
---|
11 | using 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 |
|
---|
28 |
|
---|
29 | /* --Methode-- */
|
---|
30 | Services2NObjMgr::Services2NObjMgr(PIStdImgApp* app, string& tmpdir)
|
---|
31 | {
|
---|
32 | TmpDir = tmpdir;
|
---|
33 | PDynLinkMgr::SetTmpDir(tmpdir);
|
---|
34 | mImgapp = app;
|
---|
35 | dynlink = NULL;
|
---|
36 | InitGrAttNames();
|
---|
37 | }
|
---|
38 |
|
---|
39 | /* --Methode-- */
|
---|
40 | Services2NObjMgr::~Services2NObjMgr()
|
---|
41 | {
|
---|
42 | CloseDLL();
|
---|
43 | }
|
---|
44 |
|
---|
45 | /* --Methode-- */
|
---|
46 | void Services2NObjMgr::RegisterClass(AnyDataObj* o, NObjMgrAdapter* oa)
|
---|
47 | {
|
---|
48 | ObjAdaptList::iterator it;
|
---|
49 | for(it = objadaplist.begin(); it != objadaplist.end(); it++)
|
---|
50 | if (typeid(*o) == typeid(*((*it).obj))) THROW(dupIdErr);
|
---|
51 |
|
---|
52 | dataobj_adapter oba;
|
---|
53 | oba.obj = o;
|
---|
54 | oba.obja = oa;
|
---|
55 | objadaplist.push_back(oba);
|
---|
56 | }
|
---|
57 |
|
---|
58 | /* --Methode-- */
|
---|
59 | NObjMgrAdapter* Services2NObjMgr::GetAdapter(AnyDataObj* o)
|
---|
60 | {
|
---|
61 | ObjAdaptList::iterator it;
|
---|
62 | for(it = objadaplist.begin(); it != objadaplist.end(); it++)
|
---|
63 | if (typeid(*o) == typeid(*((*it).obj))) return((*it).obja->Clone(o));
|
---|
64 | return(new NObjMgrAdapter(o));
|
---|
65 | }
|
---|
66 |
|
---|
67 | /* --Methode-- */
|
---|
68 | void Services2NObjMgr::Nobj_ComputeExpressions(NObjMgrAdapter* obja, string& expx, string& expy, string& expz,
|
---|
69 | string& expwt, string& expcut, NTuple* nt, Histo* h1, Histo2D* h2, HProf* hp)
|
---|
70 | {
|
---|
71 | if (obja == NULL) return;
|
---|
72 | NTupleInterface* objnt = obja->GetNTupleInterface();
|
---|
73 | if (objnt == NULL) return;
|
---|
74 | string vardec = objnt->VarList_C("_zz61qq_");
|
---|
75 |
|
---|
76 | PlotExprFunc f = LinkExprFunc(vardec, expx, expy, expz, expwt, expcut);
|
---|
77 | if (!f) {
|
---|
78 | cerr << "NamedObjMgr_ComputeExpressions() Error Creation PlotExprFunc " << endl;
|
---|
79 | return;
|
---|
80 | }
|
---|
81 |
|
---|
82 | double xnt[10];
|
---|
83 | float fxnt[10];
|
---|
84 |
|
---|
85 | int i,j,k;
|
---|
86 | for(i=0; i<10; i++) xnt[i] = 0.;
|
---|
87 |
|
---|
88 | TRY {
|
---|
89 | double* xn;
|
---|
90 | for(k=0; k<objnt->NbLines(); k++) {
|
---|
91 | xn = objnt->GetLineD(k);
|
---|
92 | if (f(xn, xnt, xnt+1, xnt+2, xnt+3) != 0) {
|
---|
93 | if (nt) {
|
---|
94 | for(i=0; i<4; i++) fxnt[i] = xnt[i];
|
---|
95 | nt->Fill(fxnt);
|
---|
96 | }
|
---|
97 | if (h1) h1->Add(xnt[0], xnt[3]);
|
---|
98 | if (h2) h2->Add(xnt[0], xnt[1], xnt[3]);
|
---|
99 | if (hp) hp->Add(xnt[0], xnt[1], xnt[3]);
|
---|
100 | }
|
---|
101 | }
|
---|
102 | }
|
---|
103 | CATCH(merr) {
|
---|
104 | fflush(stdout);
|
---|
105 | cout << endl;
|
---|
106 | cerr << endl;
|
---|
107 | string es = PeidaExc(merr);
|
---|
108 | cerr << "NamedObjMgr_ComputeExpressions() Exception :" << merr << es;
|
---|
109 | } ENDTRY;
|
---|
110 |
|
---|
111 |
|
---|
112 | // Fermeture du fichier .so
|
---|
113 | CloseDLL();
|
---|
114 | return;
|
---|
115 | }
|
---|
116 |
|
---|
117 |
|
---|
118 | /* --Methode-- */
|
---|
119 | PlotExprFunc Services2NObjMgr::LinkExprFunc(string& vardec, string& expx, string& expy, string& expz,
|
---|
120 | string& expwt, string& cut)
|
---|
121 | {
|
---|
122 | FILE *fip;
|
---|
123 | string fname = TmpDir + "expf_pia_dl.c";
|
---|
124 | string fnamer = TmpDir + "expf_pia_dl";
|
---|
125 | string cmd;
|
---|
126 | int rc;
|
---|
127 |
|
---|
128 | cmd = "rm -f " + fname;
|
---|
129 | rc = system(cmd.c_str());
|
---|
130 | //DBG printf("LinkExprFunc_Do> %s (Rc=%d)\n", cmd.c_str(), rc);
|
---|
131 |
|
---|
132 | if ((fip = fopen(fname.c_str(), "w")) == NULL) {
|
---|
133 | string sn = fname;
|
---|
134 | cout << "NamedObjMgr/LinkExprFunc_Erreur: Pb. Ouverture " << sn << endl;
|
---|
135 | return(NULL);
|
---|
136 | }
|
---|
137 |
|
---|
138 | // constitution du fichier a compiler
|
---|
139 | fputs("#include <math.h> \n", fip);
|
---|
140 | fputs("int expf_pia_dl_func(double* _zz61qq_, double* _rx_61qq_, double* _ry_61qq_, double* _rz_61qq_, double* _wt_61qq_) \n{\n", fip);
|
---|
141 | fprintf(fip,"%s \n", vardec.c_str());
|
---|
142 | fprintf(fip, "if (!(%s)) { *_rx_61qq_ = *_ry_61qq_ = *_rz_61qq_ = *_wt_61qq_ = 0.; return(0); } \n", cut.c_str());
|
---|
143 | fprintf(fip, "*_rx_61qq_ = %s ; \n", expx.c_str());
|
---|
144 | fprintf(fip, "*_ry_61qq_ = %s ; \n", expy.c_str());
|
---|
145 | fprintf(fip, "*_rz_61qq_ = %s ; \n", expz.c_str());
|
---|
146 | fprintf(fip, "*_wt_61qq_ = %s ; \n", expwt.c_str());
|
---|
147 | fputs("return(1); \n} \n", fip);
|
---|
148 | fclose(fip);
|
---|
149 |
|
---|
150 | return((PlotExprFunc)LinkFunctionFromFile(fnamer, "expf_pia_dl_func"));
|
---|
151 | }
|
---|
152 |
|
---|
153 |
|
---|
154 | /* --Methode-- */
|
---|
155 | DlFunction Services2NObjMgr::LinkFunctionFromFile(string& fnamer, char* funcname)
|
---|
156 | {
|
---|
157 | string fname = fnamer + ".c" ;
|
---|
158 | string fnameobj = fnamer + ".o" ;
|
---|
159 | string fnameso = fnamer + ".so";
|
---|
160 |
|
---|
161 | // Le link dynamique
|
---|
162 | CloseDLL();
|
---|
163 | dynlink = PDynLinkMgr::BuildFromCFile(fname);
|
---|
164 | if (dynlink == NULL) {
|
---|
165 | cerr << "NamedObjMgr/LinkFunctionFromFile_Erreur: Erreur ouverture SO " << endl;
|
---|
166 | return(NULL);
|
---|
167 | }
|
---|
168 |
|
---|
169 | DlFunction retfunc = dynlink->GetFunction(funcname);
|
---|
170 | if (retfunc == NULL) {
|
---|
171 | string sn = funcname;
|
---|
172 | cerr << "NamedObjMgr/LinkExprFunc_Erreur: Erreur linking " << sn << endl;
|
---|
173 | CloseDLL();
|
---|
174 | return(NULL);
|
---|
175 | }
|
---|
176 | else return(retfunc);
|
---|
177 | }
|
---|
178 |
|
---|
179 | /* --Methode-- */
|
---|
180 | void Services2NObjMgr::CloseDLL()
|
---|
181 | {
|
---|
182 | if (dynlink) delete dynlink; dynlink = NULL;
|
---|
183 | }
|
---|
184 |
|
---|
185 | /* --Methode-- */
|
---|
186 | string Services2NObjMgr::FileName2Name(string const & fn)
|
---|
187 | {
|
---|
188 |
|
---|
189 | char fsep[2] = {FILESEP, '\0'};
|
---|
190 | char tsep[2] = {'.', '\0'};
|
---|
191 | size_t p = fn.find_last_of(fsep);
|
---|
192 | size_t l = fn.length();
|
---|
193 | if (p >= l) p = 0;
|
---|
194 | else p++;
|
---|
195 | size_t q = fn.find_first_of(tsep,p);
|
---|
196 | if (q < p) q = l;
|
---|
197 | return(fn.substr(p,q-p));
|
---|
198 | }
|
---|
199 |
|
---|
200 |
|
---|
201 | typedef vector<string> GraTok;
|
---|
202 |
|
---|
203 | /* --Methode-- */
|
---|
204 | int Services2NObjMgr::DecodeDispOption(string& gratt, bool& fgsrgr)
|
---|
205 | {
|
---|
206 | int ropt = Disp_Next;
|
---|
207 | if (!mImgapp) return(ropt);
|
---|
208 |
|
---|
209 | for(int i=0; i<gratt.length(); i++) gratt[i] = tolower(gratt[i]);
|
---|
210 |
|
---|
211 | if (fgsrgr) mImgapp->SaveGraphicAtt();
|
---|
212 |
|
---|
213 | if (gratt.substr(0,3) == "def") { // Remise aux valeurs par defaut = non defini
|
---|
214 | mImgapp->SetColAtt();
|
---|
215 | mImgapp->SetLineAtt();
|
---|
216 | mImgapp->SetFontAtt();
|
---|
217 | mImgapp->SetMarkerAtt();
|
---|
218 | mImgapp->SetColMapId();
|
---|
219 | mImgapp->SetZoomAtt();
|
---|
220 | return(ropt);
|
---|
221 | }
|
---|
222 |
|
---|
223 | // On separe en mots separes par des virgules
|
---|
224 | gratt = ","+gratt;
|
---|
225 | size_t p = 0;
|
---|
226 | size_t q = 0;
|
---|
227 | size_t l = gratt.length();
|
---|
228 | string token;
|
---|
229 |
|
---|
230 | GraTok grt;
|
---|
231 |
|
---|
232 | while (q < l) {
|
---|
233 | p = gratt.find_first_not_of(" ,",q+1); // au debut d'un token
|
---|
234 | if (p>=l) break;
|
---|
235 | q = gratt.find_first_of(" ,",p); // la fin du token;
|
---|
236 | token = gratt.substr(p,q-p);
|
---|
237 | grt.push_back(token);
|
---|
238 | }
|
---|
239 |
|
---|
240 |
|
---|
241 | static GrAttNames::iterator it;
|
---|
242 |
|
---|
243 | int k;
|
---|
244 | bool fgcont = true;
|
---|
245 | fgsrgr = false;
|
---|
246 |
|
---|
247 | for(k=0; k<grt.size(); k++) {
|
---|
248 | // cout << "--DBG--SetGraphicAttributes() " << grt[k] << endl;
|
---|
249 |
|
---|
250 | // Decodage option affichage (win, next, etc
|
---|
251 | fgcont = true;
|
---|
252 | if ( (grt[k] == "win") || (grt[k] == "w") ) ropt = Disp_Win;
|
---|
253 | else if ( (grt[k] == "same") || (grt[k] == "s") ) ropt = Disp_Same;
|
---|
254 | else if ( (grt[k] == "stack") || (grt[k] == "st") ) ropt = Disp_Stack;
|
---|
255 | else fgcont = false;
|
---|
256 | if (fgcont) continue;
|
---|
257 |
|
---|
258 | // Si c'est une couleur
|
---|
259 | it = GrAcolors.find(grt[k]);
|
---|
260 | if (it != GrAcolors.end()) { mImgapp->SetColAtt((PIColors)((*it).second.a1)); fgsrgr = true; continue; }
|
---|
261 | // Si c'est un attribut de lignes
|
---|
262 | it = GrAlines.find(grt[k]);
|
---|
263 | if (it != GrAlines.end()) { mImgapp->SetLineAtt((PILineAtt)((*it).second.a1)); fgsrgr = true; continue; }
|
---|
264 | // Si c'est un attribut de fontes
|
---|
265 | it = GrAfonts.find(grt[k]);
|
---|
266 | if (it != GrAfonts.end()) { mImgapp->SetFontAtt((PIFontSize)((*it).second.a2), (PIFontAtt)((*it).second.a1) );
|
---|
267 | fgsrgr = true; continue; }
|
---|
268 | // Si c'est un attribut de markers
|
---|
269 | it = GrAmarkers.find(grt[k]);
|
---|
270 | if (it != GrAmarkers.end()) { mImgapp->SetMarkerAtt((*it).second.a2, (PIMarker)((*it).second.a1) );
|
---|
271 | fgsrgr = true; continue; }
|
---|
272 | // Si c'est un colormap
|
---|
273 | it = GrAcmap.find(grt[k]);
|
---|
274 | if (it != GrAcmap.end()) { mImgapp->SetColMapId( (CMapId)((*it).second.a1) ); fgsrgr = true; continue; }
|
---|
275 | // Si c'est un facteur de zoom
|
---|
276 | it = GrAzoom.find(grt[k]);
|
---|
277 | if (it != GrAzoom.end()) { mImgapp->SetZoomAtt( (*it).second.a1 ); fgsrgr = true; continue; }
|
---|
278 | // Si c'est un attribut d'axe
|
---|
279 | it = GrAaxes.find(grt[k]);
|
---|
280 | if (it != GrAaxes.end()) { mImgapp->SetAxesAtt( (*it).second.a1 ); fgsrgr = true; continue; }
|
---|
281 |
|
---|
282 | }
|
---|
283 |
|
---|
284 | return(ropt);
|
---|
285 | }
|
---|
286 |
|
---|
287 |
|
---|
288 |
|
---|
289 | // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
---|
290 | // Initialisation des chaines de caracteres designant les attributs graphiques
|
---|
291 |
|
---|
292 | /* --Methode-- */
|
---|
293 | void Services2NObjMgr::InitGrAttNames()
|
---|
294 | {
|
---|
295 | gratt_item gi;
|
---|
296 | // Les couleurs
|
---|
297 | gi.a2 = 0;
|
---|
298 | gi.a1 = PI_NotDefColor;
|
---|
299 | GrAcolors["defcol"] = gi;
|
---|
300 | gi.a1 = PI_Black;
|
---|
301 | GrAcolors["black"] = gi;
|
---|
302 | gi.a1 = PI_White;
|
---|
303 | GrAcolors["white"] = gi;
|
---|
304 | gi.a1 = PI_Grey;
|
---|
305 | GrAcolors["grey"] = gi;
|
---|
306 | gi.a1 = PI_Red;
|
---|
307 | GrAcolors["red"] = gi;
|
---|
308 | gi.a1 = PI_Blue;
|
---|
309 | GrAcolors["blue"] = gi;
|
---|
310 | gi.a1 = PI_Green;
|
---|
311 | GrAcolors["green"] = gi;
|
---|
312 | gi.a1 = PI_Yellow;
|
---|
313 | GrAcolors["yellow"] = gi;
|
---|
314 | gi.a1 = PI_Magenta;
|
---|
315 | GrAcolors["magenta"] = gi;
|
---|
316 |
|
---|
317 | gi.a1 = PI_Cyan;
|
---|
318 | GrAcolors["cyan"] = gi;
|
---|
319 | gi.a1 = PI_Turquoise;
|
---|
320 | GrAcolors["turquoise"] = gi;
|
---|
321 | gi.a1 = PI_NavyBlue;
|
---|
322 | GrAcolors["navyblue"] = gi;
|
---|
323 | gi.a1 = PI_Orange;
|
---|
324 | GrAcolors["orange"] = gi;
|
---|
325 | gi.a1 = PI_SiennaRed;
|
---|
326 | GrAcolors["siennared"] = gi;
|
---|
327 | gi.a1 = PI_Purple;
|
---|
328 | GrAcolors["purple"] = gi;
|
---|
329 | gi.a1 = PI_LimeGreen;
|
---|
330 | GrAcolors["limegreen"] = gi;
|
---|
331 | gi.a1 = PI_Gold;
|
---|
332 | GrAcolors["gold"] = gi;
|
---|
333 |
|
---|
334 | // Les attributs de lignes
|
---|
335 | gi.a2 = 0;
|
---|
336 | gi.a1 = PI_NotDefLineAtt;
|
---|
337 | GrAlines["defline"] = gi;
|
---|
338 | gi.a1 = PI_NormalLine;
|
---|
339 | GrAlines["normalline"] = gi;
|
---|
340 | gi.a1 = PI_ThinLine;
|
---|
341 | GrAlines["thinline"] = gi;
|
---|
342 | gi.a1 = PI_ThickLine;
|
---|
343 | GrAlines["thickline"] = gi;
|
---|
344 | gi.a1 = PI_DashedLine;
|
---|
345 | GrAlines["dashedline"] = gi;
|
---|
346 | gi.a1 = PI_ThinDashedLine;
|
---|
347 | GrAlines["thindashedline"] = gi;
|
---|
348 | gi.a1 = PI_ThickDashedLine;
|
---|
349 | GrAlines["thickdashedline"] = gi;
|
---|
350 | gi.a1 = PI_DottedLine;
|
---|
351 | GrAlines["dottedline"] = gi;
|
---|
352 | gi.a1 = PI_ThinDottedLine;
|
---|
353 | GrAlines["thindottedline"] = gi;
|
---|
354 | gi.a1 = PI_ThickDottedLine;
|
---|
355 | GrAlines["thickdottedline"] = gi;
|
---|
356 |
|
---|
357 | // Les fontes
|
---|
358 | gi.a2 = PI_NotDefFontSize;
|
---|
359 | gi.a1 = PI_NotDefFontAtt;
|
---|
360 | GrAlines["deffont"] = gi;
|
---|
361 |
|
---|
362 | gi.a2 = PI_NormalSizeFont;
|
---|
363 | gi.a1 = PI_RomanFont;
|
---|
364 | GrAlines["normalfont"] = gi;
|
---|
365 | gi.a1 = PI_BoldFont;
|
---|
366 | GrAlines["boldfont"] = gi;
|
---|
367 | gi.a1 = PI_ItalicFont;
|
---|
368 | GrAlines["italicfont"] = gi;
|
---|
369 | gi.a2 = PI_SmallSizeFont;
|
---|
370 | gi.a1 = PI_RomanFont;
|
---|
371 | GrAlines["smallfont"] = gi;
|
---|
372 | gi.a1 = PI_BoldFont;
|
---|
373 | GrAlines["smallboldfont"] = gi;
|
---|
374 | gi.a1 = PI_ItalicFont;
|
---|
375 | GrAlines["smallitalicfont"] = gi;
|
---|
376 | gi.a2 = PI_BigSizeFont;
|
---|
377 | gi.a1 = PI_RomanFont;
|
---|
378 | GrAlines["bigfont"] = gi;
|
---|
379 | gi.a1 = PI_BoldFont;
|
---|
380 | GrAlines["bigboldfont"] = gi;
|
---|
381 | gi.a1 = PI_ItalicFont;
|
---|
382 | GrAlines["bigitalicfont"] = gi;
|
---|
383 | gi.a2 = PI_HugeSizeFont;
|
---|
384 | gi.a1 = PI_RomanFont;
|
---|
385 | GrAlines["hugefont"] = gi;
|
---|
386 | gi.a1 = PI_BoldFont;
|
---|
387 | GrAlines["hugeboldfont"] = gi;
|
---|
388 | gi.a1 = PI_ItalicFont;
|
---|
389 | GrAlines["hugeitalicfont"] = gi;
|
---|
390 |
|
---|
391 |
|
---|
392 | // Les markers
|
---|
393 | const char* mrkn[11] = { "dotmarker", "plusmarker", "crossmarker",
|
---|
394 | "circlemarker", "fcirclemarker", "boxmarker", "fboxmarker",
|
---|
395 | "trianglemarker", "ftrianglemarker", "starmarker", "fstarmarker"};
|
---|
396 | PIMarker mrk[11] = { PI_DotMarker, PI_PlusMarker, PI_CrossMarker,
|
---|
397 | PI_CircleMarker, PI_FCircleMarker, PI_BoxMarker, PI_FBoxMarker,
|
---|
398 | PI_TriangleMarker, PI_FTriangleMarker, PI_StarMarker, PI_FStarMarker};
|
---|
399 |
|
---|
400 | gi.a2 = 0;
|
---|
401 | gi.a1 = PI_NotDefMarker;
|
---|
402 | GrAmarkers["defmarker"] = gi;
|
---|
403 |
|
---|
404 | for(int j=0; j<11; j++) {
|
---|
405 | string smrk;
|
---|
406 | char buff[16];
|
---|
407 | for(int m=1; m<10; m+=2) {
|
---|
408 | sprintf(buff,"%d",m);
|
---|
409 | smrk = (string)mrkn[j] + (string)buff;
|
---|
410 | gi.a1 = mrk[j]; gi.a2 = m;
|
---|
411 | GrAmarkers[smrk] = gi;
|
---|
412 | }
|
---|
413 | }
|
---|
414 |
|
---|
415 | // Les tables de couleurs
|
---|
416 | gi.a2 = 0;
|
---|
417 | gi.a1 = CMAP_OTHER;
|
---|
418 | GrAcmap["defcmap"] = gi;
|
---|
419 | gi.a1 = CMAP_GREY32;
|
---|
420 | GrAcmap["grey32"] = gi;
|
---|
421 | gi.a1 = CMAP_GREYINV32;
|
---|
422 | GrAcmap["greyinv32"] = gi;
|
---|
423 | gi.a1 = CMAP_COLRJ32;
|
---|
424 | GrAcmap["colrj32"] = gi;
|
---|
425 | gi.a1 = CMAP_COLBR32;
|
---|
426 | GrAcmap["colbr32"] = gi;
|
---|
427 | gi.a1 = CMAP_GREY128;
|
---|
428 | GrAcmap["grey128"] = gi;
|
---|
429 | gi.a1 = CMAP_GREYINV128;
|
---|
430 | GrAcmap["greyinv128"] = gi;
|
---|
431 | gi.a1 = CMAP_COLRJ128;
|
---|
432 | GrAcmap["colrj128"] = gi;
|
---|
433 | gi.a1 = CMAP_COLBR128;
|
---|
434 | GrAcmap["colbr128"] = gi;
|
---|
435 |
|
---|
436 | // La valeur de zoom
|
---|
437 | gi.a2 = 0;
|
---|
438 | gi.a1 = 0;
|
---|
439 | GrAzoom["defzoom"] = gi;
|
---|
440 | gi.a1 = 1;
|
---|
441 | GrAzoom["zoomx1"] = gi;
|
---|
442 | gi.a1 = 2;
|
---|
443 | GrAzoom["zoomx2"] = gi;
|
---|
444 | gi.a1 = 3;
|
---|
445 | GrAzoom["zoomx3"] = gi;
|
---|
446 | gi.a1 = 4;
|
---|
447 | GrAzoom["zoomx4"] = gi;
|
---|
448 | gi.a1 = 5;
|
---|
449 | GrAzoom["zoomx5"] = gi;
|
---|
450 | gi.a1 = -2;
|
---|
451 | GrAzoom["zoom/2"] = gi;
|
---|
452 | gi.a1 = -3;
|
---|
453 | GrAzoom["zoom/3"] = gi;
|
---|
454 | gi.a1 = -4;
|
---|
455 | GrAzoom["zoom/4"] = gi;
|
---|
456 | gi.a1 = -5;
|
---|
457 | GrAzoom["zoom/5"] = gi;
|
---|
458 |
|
---|
459 | // Attributs d'axes
|
---|
460 | gi.a2 = 0;
|
---|
461 | gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels);
|
---|
462 | GrAaxes["stdaxes"] = gi;
|
---|
463 | GrAaxes["defaxes"] = gi;
|
---|
464 | GrAaxes["boxaxes"] = gi;
|
---|
465 | gi.a1 = (int)kAxesDflt;
|
---|
466 | GrAaxes["simpleaxes"] = gi;
|
---|
467 | gi.a1 = (int)(kBoxAxes | kExtTicks | kLabels | kGridOn);
|
---|
468 | GrAaxes["boxaxesgrid"] = gi;
|
---|
469 |
|
---|
470 | gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks);
|
---|
471 | GrAaxes["fineaxes"] = gi;
|
---|
472 | gi.a1 = (int)(kBoxAxes | kTicks | kLabels | kMinTicks | kMajTicks | kGridOn);
|
---|
473 | GrAaxes["grid"] = gi;
|
---|
474 | GrAaxes["fineaxesgrid"] = gi;
|
---|
475 |
|
---|
476 | }
|
---|