/[PAMELA software]/calo/flight/FQLOOK/macros/FCaloQLOOK.cxx
ViewVC logotype

Annotation of /calo/flight/FQLOOK/macros/FCaloQLOOK.cxx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Thu Mar 9 16:14:32 2006 UTC (18 years, 8 months ago) by mocchiut
Branch: FQLOOK
CVS Tags: start, v1r01
Changes since 1.1: +0 -0 lines
First calorimeter flight quick look release

1 mocchiut 1.1 //
2     // Check for possible errors and shows raw distribution of variables coming from the DSP (no calibrations needed) - Emiliano Mocchiutti
3     //
4     // FCaloQLOOK.c version 1.01 (2006-02-28)
5     //
6     // The only input needed is the path to the directory created by YODA for the data file you want to analyze.
7     //
8     // Changelog:
9     //
10     // 1.00 - 1.01 (2006-02-28): Works on YODA v6 output (single file), does not require anymore calocommon package.
11     //
12     // 0.00 - 1.00 (2006-02-28): Clone of CaloQLOOK.c (ground software).
13     //
14     #include <iostream>
15     #include <fstream>
16     //
17     #include <TObject.h>
18     #include <TString.h>
19     #include <TFile.h>
20     #include <TCanvas.h>
21     #include <TH1.h>
22     #include <TH1F.h>
23     #include <TH2D.h>
24     #include <TLatex.h>
25     #include <TPad.h>
26     #include <TPolyLine.h>
27     #include <TStyle.h>
28     //
29     #include <event/PamelaRun.h>
30     #include <event/physics/calorimeter/CalorimeterEvent.h>
31     //
32     #include <FCaloQLOOKfun.h>
33     //
34     using namespace std;
35     //
36     void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){
37     if ( to == 0 ){
38     Int_t t2length = s2.Length();
39     s1 = "";
40     to = t2length;
41     };
42     for (Int_t i = from; i<to; i++){
43     s1.Append(s2[i],1);
44     };
45     }
46     void stringappend(TString& s1, const TString& s2){
47     Int_t t2length = s2.Length();
48     for (Int_t i = 0; i<t2length; i++){
49     s1.Append(s2[i],1);
50     };
51     }
52    
53     TString getFilename(const TString filename){
54     const string fil = (const char*)filename;
55     Int_t posiz = fil.find("dw_");
56     if ( posiz == -1 ) posiz = fil.find("DW_");
57     if ( posiz == -1 ) return 0;
58     Int_t posiz2 = posiz+13;
59     TString file2;
60     stringcopy(file2,filename,posiz,posiz2);
61     TString pdat(".dat");
62     stringappend(file2,pdat);
63     return file2;
64     }
65    
66     void FCaloQLOOK(TString filename, Int_t fromevent=0, Int_t toevent=0, TString outDir="", TString saveas = "ps"){
67     gStyle->SetPaperSize(19.,25.);
68     const char* startingdir = gSystem->WorkingDirectory();
69     if ( !strcmp(outDir.Data(),"") ) outDir = startingdir;
70     //
71     //
72     ifstream myfile;
73     myfile.open(filename.Data());
74     if ( !myfile ){
75     printf(" No such file, exiting...\n");
76     return;
77     };
78     myfile.close();
79     //
80     TFile *File = new TFile(filename.Data());
81     TTree *tr = (TTree*)File->Get("Physics");
82     //
83     // Define variables
84     //
85     Float_t ctshitthr = 0.65;
86     Float_t cbasethr = 0.95;
87     Float_t cdexythr = 0.995;
88     Float_t cdexycthr = 0.95;
89     //
90     pamela::calorimeter::CalorimeterEvent *ce = 0;
91     pamela::EventHeader *eh = 0;
92     pamela::PscuHeader *ph = 0;
93     //
94     UInt_t found;
95     tr->SetBranchStatus("*",0,&found); //disable all branches
96     //
97     found = 0;
98     tr->SetBranchStatus("iev*",1,&found);
99     // printf("enabled %i branches \n",found);
100     found = 0;
101     tr->SetBranchStatus("dexy*",1,&found);
102     // printf("enabled %i branches \n",found);
103     found = 0;
104     tr->SetBranchStatus("stwerr*",1,&found);
105     // printf("enabled %i branches \n",found);
106     found = 0;
107     tr->SetBranchStatus("perror*",1,&found);
108     // printf("enabled %i branches \n",found);
109     found = 0;
110     tr->SetBranchStatus("cal*",1,&found);
111     // printf("enabled %i branches \n",found);
112     found = 0;
113     tr->SetBranchStatus("base*",1,&found);
114     //printf("enabled %i branches \n",found);
115     found = 0;
116     tr->SetBranchStatus("Pscu*",1,&found);
117     //printf("enabled %i branches \n",found);
118     found = 0;
119     tr->SetBranchStatus("Calorimeter*",1,&found);
120     //printf("calo enabled %i branches \n",found);
121     found = 0;
122     tr->SetBranchStatus("Header*",1,&found);
123     //printf("head enabled %i branches \n",found);
124     //
125     tr->SetBranchAddress("Calorimeter", &ce);
126     tr->SetBranchAddress("Header", &eh);
127     //
128     Long64_t nevents = tr->GetEntries();
129     if ( nevents < 1 ) {
130     printf("The file is empty!\n");
131     return;
132     };
133     Int_t const size = nevents;
134     Double_t iev2[size+1];
135     Int_t ver[4][23], lver[4][23],shit[4][11], rshit[4][11], se,bl, pl, fulldiff[4],cshit, cpre[4],nullsh[4][11], lalarm[4];
136     se = 0;
137     pl = 0;
138     Float_t allbase = 0.;
139     Int_t tshit, trshit, compdata,rawdata, errorfull, calevn1, calevn2, calevn3, calevn4, pshit[4][11];
140     tshit = 0;
141     trshit = 0;
142     char *sezione;
143     Bool_t check = false;
144     sezione = "";
145     stringstream errore;
146     errore.str("");
147     //
148     TString fififile = getFilename(filename);
149     const char *file = fififile;
150     //
151     // book histograms
152     //
153     TH1F *h1;
154     TH1F *h1r;
155     TH1F *hdiff;
156     TH1F *Baseline;
157     TH1F *Dexy;
158     TH1F *Dexyc;
159     TH1F *Calstriphit;
160     TH1F *calev01;
161     TH1F *calev23;
162     TH1F *calev03;
163     TH2D *calev2;
164    
165     h1 = new TH1F("C7","Strips hit, compress mode",100,0.,200.);
166     h1r = new TH1F("C8","Strips hit, raw mode",100,-1,1);
167     h1r->SetBit(TH1F::kCanRebin);
168     hdiff = new TH1F("C6","Differences in full mode",100,-3,3);
169     hdiff->SetBit(TH1F::kCanRebin);
170     Baseline = new TH1F("C9","baselines",100,0,3);
171     Baseline->SetBit(TH1F::kCanRebin);
172     Dexy = new TH1F("C12","dexy",100,0.,37000.);
173     Dexyc = new TH1F("C10","dexyc",100,0,3);
174     Dexyc->SetBit(TH1F::kCanRebin);
175     Calstriphit = new TH1F("C11","calstriphit[1:4]",100,0.,200.);
176    
177     calev01 = new TH1F("C3","|calevnum(1)-calevnum(2)|",100,0,1);
178     calev01->SetBit(TH1F::kCanRebin);
179     calev23 = new TH1F("C4","|calevnum(3)-calevnum(4)|",100,0,1);
180     calev23->SetBit(TH1F::kCanRebin);
181     calev03 = new TH1F("C5","|calevnum(1)-calevnum(4)|",100,0,1);
182     calev03->SetBit(TH1F::kCanRebin);
183     calev2 = new TH2D("C2","calevnum(2)%iev",3000,0.,2.,100,0.,2.);
184     calev2->SetBit(TH2D::kCanRebin);
185    
186     //
187     // run over each event and take out some variables
188     //
189     if ( fromevent > toevent && toevent ){
190     printf("It must be fromevent < toevent \n");
191     return;
192     };
193    
194    
195     if ( fromevent > nevents+1 || fromevent < 0 ) {
196     printf("You can choose fromevent between 0 (all) and %i \n",(int)nevents+1);
197     return;
198     };
199    
200     if ( toevent > nevents+1 || toevent < 0 ) {
201     printf("You can choose toevent between 0 (all) and %i \n",(int)nevents+1);
202     return;
203     };
204     Int_t minevent = 0;
205     Int_t maxevent = 0;
206     if ( fromevent == 0 ) {
207     minevent = 0;
208     maxevent = nevents -1;
209     } else {
210     minevent = fromevent - 1;
211     if ( toevent > 0 ){
212     maxevent = toevent - 1;
213     } else {
214     maxevent = fromevent - 1;
215     };
216     };
217    
218     for (Int_t k = 0; k < 4; k++ ){
219     for (Int_t m = 0; m < 23 ; m++ ){
220     ver[k][m] = 0 ;
221     lver[k][m] = 0 ;
222     cpre[k]=0;
223     if ( m < 11 ) {
224     pshit[k][m] = 0;
225     nullsh[k][m] = 0;
226     };
227     lalarm[k] = 0;
228     };
229     };
230     Int_t pdone, bdone;
231     pdone = 0;
232     bdone = 0;
233     bool isCOMP = 0;
234     bool isFULL = 0;
235     bool isRAW = 0;
236     Int_t alldexy=0;
237     Int_t alldexy2=0;
238     Int_t stri=0;
239     Int_t fcheck = 0;
240     Int_t cestw=0;
241     Int_t cmask = 127 ;
242     compdata = 0;
243     rawdata = 0;
244     errorfull = 0;
245     calevn1 = 0;
246     calevn2 = 0;
247     calevn3 = 0;
248     calevn4 = 0;
249     fulldiff[0] = 0;
250     fulldiff[1] = 0;
251     fulldiff[2] = 0;
252     fulldiff[3] = 0;
253     printf("\n Processed events: \n\n");
254     unsigned short int calev0=0;
255     unsigned short int oldcalev0;
256     unsigned short int calev1=0;
257     unsigned short int oldcalev1;
258     unsigned short int calevv2=0;
259     unsigned short int oldcalev2;
260     unsigned short int calev3=0;
261     unsigned short int oldcalev3;
262     Int_t i = minevent;
263     Float_t headc = 0.;
264     Float_t headco = 0.;
265     Bool_t h1rcheck = false;
266     Int_t intshit = 0;
267     Int_t outtshit = 0;
268     Int_t incshit = 0;
269     Int_t outcshit = 0;
270     Int_t inbase = 0;
271     Int_t outbase = 0;
272     Int_t indexy = 0;
273     Int_t outdexy = 0;
274     Int_t indexyc = 0;
275     Int_t outdexyc = 0;
276     while ( i < maxevent+1){
277     tshit = 0;
278     trshit = 0;
279     tr->GetEntry(i);
280     iev2[i] = ce->iev;
281     //
282     ph = eh->GetPscuHeader();
283     headco = headc;
284     headc = ph->GetCounter();
285     calevn1 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[1]));
286     calevn2 += (int)abs((int)(ce->calevnum[2]-ce->calevnum[3]));
287     calevn3 += (int)abs((int)(ce->calevnum[0]-ce->calevnum[3]));
288     calev01->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[1])));
289     calev23->Fill(abs((int)(ce->calevnum[2]-ce->calevnum[3])));
290     calev03->Fill(abs((int)(ce->calevnum[0]-ce->calevnum[3])));
291     unsigned short calvnm2 = (unsigned short)ce->calevnum[2];
292     calev2->Fill(ce->iev,calvnm2);
293     calevn4 += (int)ce->calevnum[2];
294     oldcalev0 = calev0;
295     calev0 = (int)ce->calevnum[0];
296     oldcalev1 = calev1;
297     calev1 = (int)ce->calevnum[1];
298     oldcalev2 = calevv2;
299     calevv2 = (int)ce->calevnum[2];
300     oldcalev3 = calev3;
301     calev3 = (int)ce->calevnum[3];
302     goto jumpprintout;
303     if ( (headc - headco -1.) == 0. && ((calev0 - oldcalev0 - 1) > 0 || (calev1 - oldcalev1 - 1) > 0 || (calevv2 - oldcalev2 - 1) > 0 || (calev3 - oldcalev3 - 1) > 0) ){
304     if ( i != minevent ) {
305     printf(" %f 0 Event %i: %i\n",headco,i,oldcalev0);
306     printf(" %f 0 Event %i: %i\n",headc,i+1,calev0);
307     printf(" %f 1 Event %i: %i\n",headco,i,oldcalev1);
308     printf(" %f 1 Event %i: %i\n",headc,i+1,calev1);
309     printf(" %f 2 Event %i: %i\n",headco,i,oldcalev2);
310     printf(" %f 2 Event %i: %i\n",headc,i+1,calevv2);
311     printf(" %f 3 Event %i: %i\n",headco,i,oldcalev3);
312     printf(" %f 3 Event %i: %i\n",headc,i+1,calev3);
313     isRAW = 0;
314     if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;
315     if ( (calev0 - oldcalev0 - 1) > 0 && !isRAW && ce->perror[0] != 129 && oldcalev0 != 0) {
316     ver[0][10]++;
317     };
318     isRAW = 0;
319     if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;
320     if ( (calev1 - oldcalev1 - 1) > 0 && !isRAW && ce->perror[1] != 129 && oldcalev1 != 0 ){
321     ver[1][10]++;
322     };
323     isRAW = 0;
324     if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;
325     if ( (calevv2 - oldcalev2 - 1) > 0 && !isRAW && ce->perror[2] != 129 && oldcalev2 != 0 ){
326     ver[2][10]++;
327     };
328     isRAW = 0;
329     if ( ce->stwerr[0] & (1 << 3)) isRAW = 1;
330     if ( (calev3 - oldcalev3 - 1) > 0 && !isRAW && ce->perror[3] != 129 && oldcalev3 != 0 ){
331     ver[3][10]++;
332     };
333     }
334     };
335     jumpprintout:
336     memcpy(shit, nullsh, sizeof(nullsh));
337     memcpy(rshit, nullsh, sizeof(nullsh));
338     for (Int_t l = 0; l < 2; l++ ){
339     for (Int_t ii = 0; ii < 22; ii++){
340     if (l == 0 && ii%2 == 0){
341     se = 3;
342     pl = ii/2;
343     pdone = 0;
344     };
345     if (l == 0 && ii%2 != 0){
346     se = 2;
347     pl = (ii-1)/2;
348     pdone = 0;
349     };
350     if (l == 1 && ii%2 == 0){
351     se = 0;
352     pl = ii/2;
353     pdone = 0;
354     };
355     if (l == 1 && ii%2 != 0){
356     se = 1;
357     pl = (ii-1)/2;
358     pdone = 0;
359     };
360    
361     isCOMP = 0;
362     isFULL = 0;
363     isRAW = 0;
364     if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1;
365     if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1;
366     if ( ce->stwerr[se] & (1 << 3) ) isRAW = 1;
367     bl = -1;
368     for (Int_t kk = 0; kk < 96 ; kk++ ){
369     if ( kk%16 == 0 ){
370     bdone = 0;
371     bl++;
372     allbase = ce->base[l][ii][bl];
373     alldexy=0;
374     alldexy2=0;
375     stri=0;
376     for (Int_t e = 0; e < 16 ; e++ ){
377     stri = e + 16 * bl;
378     alldexy += (int)ce->dexyc[l][ii][stri];
379     alldexy2 += (int)ce->dexy[l][ii][stri];
380     };
381     };
382     if ( !isRAW ) {
383     //
384     if ( !pdone ){
385     if ( (ce->base[l][ii][bl]>32000 || ce->base[l][ii][bl] == 0 ) && ( alldexy > 512000 || alldexy == 0) && ce->perror[se] == 0 ) {
386     pdone = 1;
387     pshit[se][pl]++ ;
388     if ( (ce->stwerr[se] & (1 << 4)) == 0 ) lalarm[se]++;
389     lver[se][2]++ ;
390     };
391     }
392     //
393     if ( !bdone ){
394     Baseline->Fill(ce->base[l][ii][bl]);
395     if ( ce->base[l][ii][bl] > 2000. && ce->base[l][ii][bl] < 4500. ){
396     inbase++;
397     } else {
398     outbase++;
399     };
400     bdone = 1;
401     };
402     //
403     if (ce->dexyc[l][ii][kk] > 0 ) {
404     shit[se][pl]++ ;
405     compdata = 1;
406     };
407     //
408     if ( isFULL ) {
409     if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) {
410     rshit[se][pl]++ ;
411     rawdata = 1;
412     };
413     Dexy->Fill(ce->dexy[l][ii][kk]);
414     if ( ce->dexy[l][ii][kk] < 2000. || ce->dexy[l][ii][kk] > 5000. ) {
415     outdexy++;
416     } else {
417     indexy++;
418     };
419     if ( ce->dexyc[l][ii][kk]>0 && (ce->dexy[l][ii][kk]-ce->dexyc[l][ii][kk]) != 0 && ce->perror[se] != 132 && (ce->base[l][ii][bl] == 0 || ce->base[l][ii][bl] >32000) ){
420     hdiff->Fill(ce->dexyc[l][ii][kk]-ce->dexy[l][ii][kk]);
421     fulldiff[se]++;
422     errorfull = 1;
423     };
424     };
425     //
426     Dexyc->Fill(ce->dexyc[l][ii][kk]);
427     if ( ce->dexyc[l][ii][kk] != 0. && ( ce->dexyc[l][ii][kk] < 2000. || ce->dexyc[l][ii][kk] > 5000. ) ) {
428     outdexyc++;
429     } else {
430     indexyc++;
431     };
432     //
433     if (ce->dexyc[l][ii][kk] < 0 ) ver[se][21]++ ;
434     //
435     if ( allbase == 0. || allbase > 32000.) {
436     fcheck = 0;
437     for (Int_t nn = bl*16; nn < (bl+1)*16 ; nn++){
438     if ( ce->dexyc[l][ii][nn] > 0. && ce->dexyc[l][ii][nn] < 32000. ) fcheck++;
439     };
440     if ( fcheck ) {
441     cpre[se]++;
442     allbase = 1.;
443     };
444     };
445     //
446     } else {
447     if ( !pdone ){
448     if ( (alldexy2>512000 || alldexy2 == 0) && ce->perror[se] == 0 ) {
449     pdone = 1;
450     pshit[se][pl]++ ;
451     if ( (ce->stwerr[se] & (1 << 4)) == 0 ) lalarm[se]++;
452     lver[se][2]++ ;
453     };
454     };
455     if ( ce->dexy[l][ii][kk] > 0 && ce->dexy[l][ii][kk] < 32000 ) {
456     rshit[se][pl]++ ;
457     rawdata = 1;
458     };
459     Dexy->Fill(ce->dexy[l][ii][kk]);
460     if ( ce->dexy[l][ii][kk] < 2000. || ce->dexy[l][ii][kk] > 5000. ) {
461     outdexy++;
462     } else {
463     indexy++;
464     };
465     };
466     };
467     };
468     };
469     cshit = 0;
470     for (Int_t k = 0; k < 4 ; k++ ){
471     isCOMP = 0;
472     isFULL = 0;
473     if ( ce->stwerr[se] & (1 << 16) ) isCOMP = 1;
474     if ( ce->stwerr[se] & (1 << 17) ) isFULL = 1;
475     if ( isCOMP ) ver[k][16]++;
476     if ( isFULL ) ver[k][17]++;
477     cshit += (int)ce->calstriphit[k];
478     cestw=0;
479     if ( ce->stwerr[k] ) cestw = ce->stwerr[k] & cmask ;
480     if ( cestw ){
481     if ( cestw & (1 << 0) ) ver[k][6]++ ;
482     if ( cestw & (1 << 1) ) ver[k][5]++ ;
483     if ( cestw & (1 << 2) ) ver[k][4]++ ;
484     if ( cestw & (1 << 3) ) ver[k][3]++ ;
485     if ( cestw & (1 << 4) ) ver[k][2]++ ;
486     if ( cestw & (1 << 5) ) ver[k][1]++ ;
487     if ( cestw & (1 << 6) ) ver[k][0]++ ;
488     };
489     if ( ce->perror[k] != 0. ){
490     if (ce->perror[k] == 128) ver[k][7]++ ;
491     if (ce->perror[k] == 129) ver[k][8]++ ;
492     if (ce->perror[k] == 132) ver[k][11]++ ;
493     if (ce->perror[k] == 133) ver[k][12]++ ;
494     if (ce->perror[k] == 134) ver[k][13]++ ;
495     if (ce->perror[k] == 135) ver[k][14]++ ;
496     if (ce->perror[k] == 136) ver[k][15]++ ;
497     if (ce->perror[k] == 139) ver[k][18]++ ;
498     if (ce->perror[k] == 140) ver[k][19]++ ;
499     if (ce->perror[k] == 141) ver[k][20]++ ;
500     if (ce->perror[k] == 142) ver[k][22]++ ;
501     };
502     for (Int_t kk = 0; kk < 11 ; kk++ ){
503     tshit += shit[k][kk];
504     trshit += rshit[k][kk];
505     };
506     };
507     Calstriphit->Fill(cshit);
508     if ( (cshit > 0 && cshit < 25) || (cshit > 40 && cshit < 80) ){
509     incshit++;
510     } else {
511     outcshit++;
512     };
513     if ( tshit>0 ) h1->Fill(tshit);
514     if ( (tshit > 0 && tshit < 25) || (tshit > 40 && tshit < 80) ){
515     intshit++;
516     } else {
517     outtshit++;
518     };
519     if ( trshit>0 ) {
520     h1r->Fill(trshit);
521     if ( trshit < 4210 ){
522     h1rcheck = true;
523     // printf("ma come... trshit %i \n",trshit);
524     };
525     };
526     if ( i%1000 == 0 && i > 0 ) printf("%iK\n",i/1000);
527     i++;
528     };
529     printf("\n");
530    
531     //
532     // output figures, first sheet:
533     //
534     gStyle->SetOptDate(0);
535     gStyle->SetOptStat(1111);
536     TCanvas *figura = new TCanvas("Calorimeter_Detector_Report_1/3", "Calorimeter_Detector_Report_1/3", 1100, 900);
537     figura->SetFillColor(10);
538     figura->Range(0,0,100,100);
539     errore.str("");
540     errore << "EXPERT -- File: " << file;
541     errore << " ";
542     TLatex *t=new TLatex();
543     t->SetTextFont(32);
544     t->SetTextColor(1);
545     t->SetTextAlign(12);
546     t->SetTextSize(0.015);
547     t->DrawLatex(2.,99.,errore.str().c_str());
548     TPad *pd5;
549     TPad *pd6;
550     TPad *pad1;
551     TPad *pad2;
552     TPad *pad3;
553     TPad *pad4;
554     TPad *pd1;
555     TPad *pd2;
556     TPad *pd3;
557     TPad *pd4;
558     //
559     Double_t h1max;
560     TPolyLine *banda1;
561     TPolyLine *banda2;
562     Float_t ctshit = 0;
563     Float_t ccshit = 0;
564     Float_t cbase = 0;
565     Float_t cdexy = 0;
566     Float_t cdexyc = 0;
567     //
568     if ( compdata && rawdata ){
569     ctshit = (float)intshit/((float)outtshit + (float)intshit);
570     Int_t pd5col = 10;
571     Int_t pd6col = 10;
572     if ( ctshit < ctshitthr ) {
573     check = true;
574     pd5col = 45;
575     };
576     if ( h1rcheck ) {
577     check = true;
578     pd6col = 45;
579     };
580     pd5 = new TPad("pd5","This is pad5",0.51,0.51,0.98,0.98,pd5col);
581     pd6 = new TPad("pd6","This is pad6",0.51,0.02,0.98,0.49,pd6col);
582     pd5->SetTicks();
583     pd6->SetTicks();
584     pd5->Range(0,0,100,100);
585     pd6->Range(0,0,100,100);
586     figura->cd();
587     pd5->Draw();
588     pd5->cd();
589     h1->SetXTitle("Number of hit (dexyc>0)");
590     h1->SetYTitle("Number of events");
591     h1->Draw();
592     //
593     h1max = h1->GetMaximum()*1.05;
594     Double_t xc[4] = {0.,25.,25.,0.};
595     Double_t yc[4] = {0.,0.,h1max,h1max};
596     banda1 = new TPolyLine(4,xc,yc);
597     banda1->SetLineColor(5);
598     banda1->SetFillColor(5);
599     banda1->SetLineWidth(1);
600     banda1->Draw("fSAME");
601     Double_t xd[4] = {40.,80.,80.,40.};
602     Double_t yd[4] = {0.,0.,h1max,h1max};
603     banda2 = new TPolyLine(4,xd,yd);
604     banda2->SetLineColor(5);
605     banda2->SetFillColor(5);
606     banda2->SetLineWidth(1);
607     banda2->Draw("fSAME");
608     h1->Draw("SAME");
609     //
610     figura->cd();
611     pd6->Draw();
612     pd6->cd();
613     gPad->SetLogy();
614     h1r->SetXTitle("Number of hit (dexy>0)");
615     h1r->SetYTitle("Number of events");
616     h1r->Draw();
617     h1max = h1r->GetMaximum()*2.05;
618     Double_t xg[4] = {4220.,4230.,4230.,4220.};
619     Double_t yg[4] = {0.,0.,h1max,h1max};
620     banda1 = new TPolyLine(4,xg,yg);
621     banda1->SetLineColor(5);
622     banda1->SetFillColor(5);
623     banda1->SetLineWidth(1);
624     banda1->Draw("fSAME");
625     h1r->Draw("SAME");
626     };
627     if ( (compdata && !rawdata) || (!compdata && rawdata) ){
628     if ( tshit !=0 ) {
629     ctshit = (float)intshit/((float)outtshit + (float)intshit);
630     Int_t pd5col = 10;
631     if ( ctshit < ctshitthr ) {
632     check = true;
633     pd5col = 45;
634     };
635     pd5 = new TPad("pd5","This is pad5",0.51,0.02,0.98,0.98,pd5col);
636     pd5->Range(0,0,100,100);
637     pd5->SetTicks();
638     pd5->Draw();
639     pd5->cd();
640     h1->SetXTitle("Number of hit (dexyc>0)");
641     h1->SetYTitle("Number of events");
642     h1->Draw();
643     h1max = h1->GetMaximum()*1.05;
644     Double_t xe[4] = {0.,25.,25.,0.};
645     Double_t ye[4] = {0.,0.,h1max,h1max};
646     banda1 = new TPolyLine(4,xe,ye);
647     banda1->SetLineColor(5);
648     banda1->SetFillColor(5);
649     banda1->SetLineWidth(1);
650     banda1->Draw("fSAME");
651     Double_t xf[4] = {40.,80.,80.,40.};
652     Double_t yf[4] = {0.,0.,h1max,h1max};
653     banda2 = new TPolyLine(4,xf,yf);
654     banda2->SetLineColor(5);
655     banda2->SetFillColor(5);
656     banda2->SetLineWidth(1);
657     banda2->Draw("fSAME");
658     h1->Draw("SAME");
659     };
660     if ( trshit !=0 ) {
661     Int_t pd5col = 10;
662     if ( h1rcheck ) {
663     check = true;
664     pd5col = 45;
665     };
666     pd5 = new TPad("pd5","This is pad5",0.51,0.02,0.98,0.98,pd5col);
667     pd5->Range(0,0,100,100);
668     pd5->SetTicks();
669     pd5->Draw();
670     pd5->cd();
671     gPad->SetLogy();
672     h1r->SetXTitle("Number of hit (dexyc>0 or dexy>0)");
673     h1r->SetYTitle("Number of events");
674     h1r->Draw();
675     h1max = h1r->GetMaximum()*2.05;
676     Double_t xh[4] = {4220.,4230.,4230.,4220.};
677     Double_t yh[4] = {0.,0.,h1max,h1max};
678     banda1 = new TPolyLine(4,xh,yh);
679     banda1->SetLineColor(5);
680     banda1->SetFillColor(5);
681     banda1->SetLineWidth(1);
682     banda1->Draw("fSAME");
683     h1r->Draw("SAME");
684     };
685     };
686     if ( !errorfull ) {
687     if ( calevn1 || calevn2 || calevn3 ) {
688     pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.24,0.98,45);
689     pd2 = new TPad("pd2","This is pad2",0.26,0.51,0.49,0.98,45);
690     pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.24,0.49,45);
691     pd4 = new TPad("pd4","This is pad4",0.26,0.02,0.49,0.49,45);
692     figura->cd();
693     // printf("ou2! \n");
694     check = true;
695     pd1->Range(0,0,100,100);
696     pd2->Range(0,0,100,100);
697     pd3->Range(0,0,100,100);
698     pd4->Range(0,0,100,100);
699     pd1->Draw();
700     pd2->Draw();
701     pd3->Draw();
702     pd4->Draw();
703    
704     pd1->cd();
705     gPad->SetLogy();
706     calev01->SetXTitle("delta calevnum 1-2");
707     calev01->SetYTitle("Number of events");
708     calev01->Draw();
709    
710     pd2->cd();
711     gPad->SetLogy();
712     calev23->SetXTitle("delta calevnum 3-4");
713     calev23->SetYTitle("Number of events");
714     calev23->Draw();
715    
716     pd3->cd();
717     gPad->SetLogy();
718     calev03->SetXTitle("delta calevnum 1-4");
719     calev03->SetYTitle("Number of events");
720     calev03->Draw();
721    
722     pd4->cd();
723     calev2->SetYTitle("calevnum 2");
724     calev2->SetXTitle("iev");
725     calev2->Draw();
726     } else {
727     if ( calevn4 ) {
728     pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.49,0.98,10);
729     figura->cd();
730     pd3->Range(0,0,100,100);
731     pd3->Draw();
732     pd3->cd();
733     calev2->SetYTitle("calevnum 2");
734     calev2->SetXTitle("iev");
735     calev2->Draw();
736     } else {
737     figura->cd();
738     t=new TLatex();
739     t->SetTextFont(32);
740     t->SetTextColor(1);
741     t->SetTextSize(0.04);
742     t->SetTextAlign(12);
743     t->DrawLatex(10.,49.,"No calevnum infos from DSP");
744     };
745     };
746     } else {
747     figura->cd();
748     check = true;
749     // printf("nou! \n");
750     pd1 = new TPad("pd1","This is pad1",0.02,0.02,0.49,0.98,45);
751     pd1->Range(0,0,100,100);
752     pd1->Draw();
753     pd1->cd();
754     gPad->SetLogy();
755     hdiff->SetXTitle("Differences in FULL mode");
756     hdiff->SetYTitle("Number of events");
757     hdiff->Draw();
758     };
759    
760     //
761     // output figures, second sheet:
762     //
763     TCanvas *figura2 = new TCanvas("Calorimeter_Detector_Report_2/3","Calorimeter_Detector_Report_2/3", 1100, 900);
764     if ( compdata ){
765     Int_t pd1col = 10;
766     Int_t pd2col = 10;
767     Int_t pd3col = 10;
768     Int_t pd4col = 10;
769     if ( (outdexy+indexy) ) {
770     cdexy = (float)indexy/((float)outdexy + (float)indexy);
771     if ( cdexy < cdexythr ) {
772     check = true;
773     pd4col = 45;
774     };
775     };
776     if ( (outcshit+incshit) ) {
777     ccshit = (float)incshit/((float)outcshit + (float)incshit);
778     if ( ccshit < ctshitthr ) {
779     check = true;
780     pd3col = 45;
781     };
782     };
783     if ( (outdexyc+indexyc) ) {
784     cdexyc = (float)indexyc/((float)outdexyc + (float)indexyc);
785     if ( cdexyc < cdexycthr ) {
786     check = true;
787     pd2col = 45;
788     };
789     };
790     if ( (outbase+inbase) ) {
791     cbase = (float)inbase/((float)outbase + (float)inbase);
792     if ( cbase < cbasethr ) {
793     check = true;
794     pd1col = 45;
795     };
796     };
797     figura2->SetFillColor(10);
798     figura2->Range(0,0,100,100);
799     errore.str("");
800     errore << "EXPERT -- File: " << file;
801     errore << " ";
802     t=new TLatex();
803     t->SetTextFont(32);
804     t->SetTextColor(1);
805     t->SetTextAlign(12);
806     t->SetTextSize(0.015);
807     t->DrawLatex(2.,99.,errore.str().c_str());
808     pd1 = new TPad("pd1","This is pad1",0.02,0.51,0.49,0.98,pd1col);
809     pd2 = new TPad("pd2","This is pad2",0.51,0.51,0.98,0.98,pd2col);
810     pd3 = new TPad("pd3","This is pad3",0.02,0.02,0.49,0.49,pd3col);
811     pd4 = new TPad("pd4","This is pad4",0.51,0.02,0.98,0.49,pd4col);
812     figura2->cd();
813     pd1->Range(0,0,100,100);
814     pd2->Range(0,0,100,100);
815     pd3->Range(0,0,100,100);
816     pd4->Range(0,0,100,100);
817     pd1->SetTicks();
818     pd2->SetTicks();
819     pd3->SetTicks();
820     pd4->SetTicks();
821     pd1->Draw();
822     pd2->Draw();
823     pd3->Draw();
824     pd4->Draw();
825     pd1->cd();
826     Baseline->SetXTitle("ADC channels");
827     Baseline->SetYTitle("Number of events");
828     Baseline->Draw();
829     h1max = Baseline->GetMaximum()*1.05;
830     Double_t xc[4] = {2000.,4500.,4500.,2000.};
831     Double_t yc[4] = {0.,0.,h1max,h1max};
832     banda1 = new TPolyLine(4,xc,yc);
833     banda1->SetLineColor(5);
834     banda1->SetFillColor(5);
835     banda1->SetLineWidth(1);
836     banda1->Draw("fSAME");
837     Baseline->Draw("SAME");
838     //
839     pd2->cd();
840     gPad->SetLogy();
841     Dexyc->SetXTitle("ADC channels");
842     Dexyc->SetYTitle("Number of events");
843     Dexyc->Draw();
844     h1max = Dexyc->GetMaximum()*2.05;
845     Double_t xe[4] = {2000.,5000.,5000.,2000.};
846     Double_t ye[4] = {0.,0.,h1max,h1max};
847     banda1 = new TPolyLine(4,xe,ye);
848     banda1->SetLineColor(5);
849     banda1->SetFillColor(5);
850     banda1->SetLineWidth(1);
851     banda1->Draw("fSAME");
852     Double_t xj[4] = {0.,40.,40.,0.};
853     Double_t yj[4] = {0.,0.,h1max,h1max};
854     banda2 = new TPolyLine(4,xj,yj);
855     banda2->SetLineColor(5);
856     banda2->SetFillColor(5);
857     banda2->SetLineWidth(1);
858     banda2->Draw("fSAME");
859     Dexyc->Draw("SAME");
860     //
861     pd3->cd();
862     Calstriphit->SetXTitle("Number of hit");
863     Calstriphit->SetYTitle("Number of events");
864     Calstriphit->Draw();
865     h1max = Calstriphit->GetMaximum()*1.05;
866     Double_t xg[4] = {0.,25.,25.,0.};
867     Double_t yg[4] = {0.,0.,h1max,h1max};
868     banda1 = new TPolyLine(4,xg,yg);
869     banda1->SetLineColor(5);
870     banda1->SetFillColor(5);
871     banda1->SetLineWidth(1);
872     banda1->Draw("fSAME");
873     Double_t xh[4] = {40.,80.,80.,40.};
874     Double_t yh[4] = {0.,0.,h1max,h1max};
875     banda2 = new TPolyLine(4,xh,yh);
876     banda2->SetLineColor(5);
877     banda2->SetFillColor(5);
878     banda2->SetLineWidth(1);
879     banda2->Draw("fSAME");
880     Calstriphit->Draw("SAME");
881     //
882     pd4->cd();
883     Dexy->SetXTitle("ADC channels");
884     Dexy->SetYTitle("Number of events");
885     Dexy->Draw();
886     h1max = Dexy->GetMaximum()*1.05;
887     Double_t xd[4] = {2000.,5000.,5000.,2000.};
888     Double_t yd[4] = {0.,0.,h1max,h1max};
889     banda1 = new TPolyLine(4,xd,yd);
890     banda1->SetLineColor(5);
891     banda1->SetFillColor(5);
892     banda1->SetLineWidth(1);
893     banda1->Draw("fSAME");
894     Dexy->Draw("SAME");
895     } else {
896     Int_t pd4col = 10;
897     if ( (outdexy+indexy) ) {
898     cdexy = (float)indexy/((float)outdexy + (float)indexy);
899     if ( cdexy < cdexythr ) {
900     check = true;
901     pd4col = 45;
902     };
903     };
904     figura2->SetFillColor(10);
905     figura2->Range(0,0,100,100);
906     errore.str("");
907     errore << "EXPERT -- File: " << file;
908     errore << " ";
909     t=new TLatex();
910     t->SetTextFont(32);
911     t->SetTextColor(1);
912     t->SetTextAlign(12);
913     t->SetTextSize(0.015);
914     t->DrawLatex(2.,99.,errore.str().c_str());
915     pd4 = new TPad("pd4","This is pad4",0.02,0.02,0.98,0.98,pd4col);
916     figura2->cd();
917     pd4->Range(0,0,100,100);
918     pd4->SetTicks();
919     pd4->Draw();
920     //
921     pd4->cd();
922     Dexy->SetXTitle("ADC channels");
923     Dexy->SetYTitle("Number of events");
924     Dexy->Draw();
925     h1max = Dexy->GetMaximum()*1.05;
926     Double_t xd[4] = {2000.,5000.,5000.,2000.};
927     Double_t yd[4] = {0.,0.,h1max,h1max};
928     banda1 = new TPolyLine(4,xd,yd);
929     banda1->SetLineColor(5);
930     banda1->SetFillColor(5);
931     banda1->SetLineWidth(1);
932     banda1->Draw("fSAME");
933     Dexy->Draw("SAME");
934     };
935     //
936     // output figures, report sheet:
937     //
938     TCanvas *rapporto= new TCanvas("Calorimeter_Detector_Report_3/3", "Calorimeter_Detector_Report_3/3", 1100, 900);
939     rapporto->SetFillColor(10);
940     rapporto->Range(0,0,100,100);
941     t=new TLatex();
942     t->SetTextFont(32);
943     t->SetTextColor(1);
944     t->SetTextSize(0.05);
945     t->SetTextAlign(12);
946     // t->DrawLatex(33.,95.,"Calorimeter quick look: ");
947     errore.str("");
948     errore << "BASIC: C1 - File: " << file;
949     errore << " ";
950     t->SetTextSize(0.02);
951     t->DrawLatex(2.,99.,errore.str().c_str());
952    
953     pad1 = new TPad("pad1","This is pad1",0.02,0.47,0.49,0.90,19);
954     pad2 = new TPad("pad2","This is pad2",0.51,0.47,0.98,0.90,19);
955     pad3 = new TPad("pad3","This is pad3",0.02,0.02,0.49,0.45,19);
956     pad4 = new TPad("pad4","This is pad4",0.51,0.02,0.98,0.45,19);
957     pad1->Range(0,0,100,100);
958     pad2->Range(0,0,100,100);
959     pad3->Range(0,0,100,100);
960     pad4->Range(0,0,100,100);
961    
962     pad1->Draw();
963     pad2->Draw();
964     pad3->Draw();
965     pad4->Draw();
966    
967     for (Int_t i = 0; i < 4; i++){
968     if (i == 2)
969     {
970     pad1->cd() ;
971     sezione = "** Section YE (x even) **";
972     }
973     if (i == 3)
974     {
975     pad2->cd();
976     sezione = "** Section YO (x odd) **";
977     }
978     if (i == 0)
979     {
980     pad3->cd();
981     sezione = "** Section XE (y odd) **";
982     }
983     if (i == 1)
984     {
985     pad4->cd();
986     sezione = "** Section XO (y even) **";
987     }
988     t->SetTextFont(32);
989     t->SetTextColor(1);
990     t->SetTextSize(0.05);
991     t->SetTextAlign(12);
992     t->DrawLatex(33.,97.,sezione);
993     t->SetTextSize(0.05);
994     for (Int_t j = 0; j < 23; j++){
995     if ( ver[i][j] || lver[i][j] ) {
996     t->SetTextColor(50);
997     if (j == 0) {
998     errore.str("");
999     errore << "* DSP ack error: " << ver[i][j];
1000     errore << " time(s)";
1001     t->DrawLatex(2.,30.,errore.str().c_str());
1002     check = true;
1003     }
1004     if (j == 1) {
1005     errore.str("");
1006     errore << "* Temperature alarm: " << ver[i][j];
1007     errore << " time(s)";
1008     t->DrawLatex(2.,74.,errore.str().c_str());
1009     check = true;
1010     }
1011     if (j == 2) {
1012     if ( lalarm[i] ){
1013     errore.str("");
1014     errore << "* Latch up: " << ver[i][j];
1015     errore << " (" << lalarm[i];
1016     errore << " NOT rec!): ";
1017     t->DrawLatex(0.,70.,errore.str().c_str());
1018     check = true;
1019     } else {
1020     errore.str("");
1021     errore << "* Latch up alarm: " << ver[i][j];
1022     errore << " time(s). View(s): ";
1023     t->DrawLatex(2.,70.,errore.str().c_str());
1024     check = true;
1025     };
1026     errore.str("");
1027     errore << "(" << lver[i][j];
1028     errore << " view(s))";
1029     t->DrawLatex(27.,65.,errore.str().c_str());
1030     Float_t inc=1.;
1031     for (Int_t e = 0; e < 11; e++){
1032     if ( pshit[i][e] ) {
1033     errore.str("");
1034     errore << " " << (e+1);
1035     errore << " ";
1036     t->DrawLatex(52.+inc,69.,errore.str().c_str());
1037     Int_t numer = pshit[i][e];
1038     errore.str("");
1039     errore << " (" << numer;
1040     errore << ") ";
1041     t->SetTextAngle(-70);
1042     t->DrawLatex(55.+inc,67.,errore.str().c_str());
1043     t->SetTextAngle(0);
1044     inc += 4.;
1045     }
1046     }
1047     }
1048     if (j == 3) {
1049     errore.str("");
1050     errore << "RAW mode: " << ver[i][j];
1051     errore << " time(s)";
1052     t->SetTextColor(32);
1053     t->DrawLatex(2.,90.,errore.str().c_str());
1054     }
1055     if (j == 4) {
1056     errore.str("");
1057     errore << "* CMD length error: " << ver[i][j];
1058     errore << " time(s)";
1059     t->DrawLatex(2.,66.,errore.str().c_str());
1060     check = true;
1061     }
1062     if (j == 5) {
1063     errore.str("");
1064     errore << "* Execution error: " << ver[i][j];
1065     errore << " time(s)";
1066     t->DrawLatex(2.,62.,errore.str().c_str());
1067     check = true;
1068     }
1069     if (j == 6) {
1070     errore.str("");
1071     errore << "* CRC error (st. word): " << ver[i][j];
1072     errore << " time(s)";
1073     t->DrawLatex(2.,58.,errore.str().c_str());
1074     check = true;
1075     }
1076     if (j == 7) {
1077     errore.str("");
1078     errore << "View or command not recognized: " << ver[i][j];
1079     errore << " time(s)";
1080     t->DrawLatex(2.,54.,errore.str().c_str());
1081     check = true;
1082     }
1083     if (j == 8) {
1084     errore.str("");
1085     errore << "Missing section: " << ver[i][j];
1086     errore << " time(s)";
1087     t->DrawLatex(2.,50.,errore.str().c_str());
1088     check = true;
1089     }
1090     if (j == 10) {
1091     errore.str("");
1092     errore << "Calevnum jump: " << ver[i][j];
1093     errore << " time(s)";
1094     t->DrawLatex(2.,42.,errore.str().c_str());
1095     check = true;
1096     }
1097     if (j == 11) {
1098     errore.str("");
1099     errore << "CRC error (data): " << ver[i][j];
1100     errore << " time(s)";
1101     t->DrawLatex(2.,38.,errore.str().c_str());
1102     check = true;
1103     }
1104     if (j == 12) {
1105     errore.str("");
1106     errore << "Length problems in RAW mode: " << ver[i][j];
1107     errore << " time(s)";
1108     t->DrawLatex(2.,34.,errore.str().c_str());
1109     check = true;
1110     }
1111     if (j == 13) {
1112     errore.str("");
1113     errore << "Length problems in COMPRESS mode: " << ver[i][j];
1114     errore << " time(s)";
1115     t->DrawLatex(2.,34.,errore.str().c_str());
1116     check = true;
1117     }
1118     if (j == 14) {
1119     errore.str("");
1120     errore << "Length problems in FULL mode: " << ver[i][j];
1121     errore << " time(s)";
1122     t->DrawLatex(2.,26.,errore.str().c_str());
1123     check = true;
1124     }
1125     if (j == 15) {
1126     errore.str("");
1127     errore << "Acquisition mode problems: " << ver[i][j];
1128     errore << " time(s)";
1129     t->DrawLatex(2.,22.,errore.str().c_str());
1130     check = true;
1131     }
1132     if (j == 16) {
1133     errore.str("");
1134     errore << "COMPRESS mode: " << ver[i][j];
1135     errore << " time(s)";
1136     t->SetTextColor(32);
1137     t->DrawLatex(2.,86.,errore.str().c_str());
1138     }
1139     if (j == 17) {
1140     errore.str("");
1141     errore << "FULL mode: " << ver[i][j];
1142     errore << " time(s)";
1143     t->SetTextColor(32);
1144     t->DrawLatex(2.,82.,errore.str().c_str());
1145     }
1146     if (j == 18) {
1147     errore.str("");
1148     errore << "Problems with coding: " << ver[i][j];
1149     errore << " time(s)";
1150     t->DrawLatex(2.,18.,errore.str().c_str());
1151     check = true;
1152     }
1153     if (j == 19) {
1154     errore.str("");
1155     errore << "Pedestal checksum wrong: " << ver[i][j];
1156     errore << " time(s)";
1157     t->DrawLatex(2.,14.,errore.str().c_str());
1158     check = true;
1159     }
1160     if (j == 20) {
1161     errore.str("");
1162     errore << "Thresholds checksum wrong: " << ver[i][j];
1163     errore << " time(s)";
1164     t->DrawLatex(2.,10.,errore.str().c_str());
1165     check = true;
1166     }
1167     if (j == 21) {
1168     errore.str("");
1169     errore << "WARNING! DEXYC < 0: " << ver[i][j];
1170     errore << " time(s)";
1171     t->DrawLatex(2.,6.,errore.str().c_str());
1172     check = true;
1173     }
1174     if (j == 22) {
1175     errore.str("");
1176     errore << "Packet length is zero (YODA input error), skipped: " << ver[i][j];
1177     errore << " time(s)";
1178     t->DrawLatex(2.,3.,errore.str().c_str());
1179     check = true;
1180     };
1181     };
1182     };
1183     t->SetTextColor(50);
1184     if ( fulldiff[i] !=0 ) {
1185     check = true;
1186     errore.str("");
1187     errore << "Full mode, differences between RAW and COMPRESS mode: " << fulldiff[i];
1188     errore << " time(s)";
1189     t->DrawLatex(2.,46.,errore.str().c_str());
1190     };
1191     if ( cpre[i] !=0 ) {
1192     errore.str("");
1193     errore << "Preamplifier fully transmitted: " << cpre[i];
1194     errore << " time(s)";
1195     t->SetTextColor(32);
1196     t->DrawLatex(2.,78.,errore.str().c_str());
1197     };
1198     };
1199     rapporto->cd();
1200     t->SetTextFont(32);
1201     t->SetTextColor(1);
1202     t->SetTextSize(0.05);
1203     t->SetTextAlign(12);
1204     t->DrawLatex(22.,95.,"Calorimeter quick look: ");
1205     //printf("check %i \n",check);
1206     if ( check ){
1207     t->SetTextColor(50);
1208     t->DrawLatex(60.,95.," WARNING, CHECK! ");
1209     printf("cdexyc %f cdexy %f ctshit %f cbase %f \n",cdexyc,cdexy,ctshit,cbase);
1210     } else {
1211     t->SetTextColor(32);
1212     t->DrawLatex(60.,95.," OK! ");
1213     };
1214     //
1215     const string fil = (const char*)filename;
1216     Int_t posiz = fil.find("dw_");
1217     if ( posiz == -1 ) posiz = fil.find("DW_");
1218     Int_t posiz2 = posiz+13;
1219     TString file2;
1220     stringcopy(file2,filename,posiz,posiz2);
1221     //
1222     const char *figrec = file2;
1223     const char *outdir = outDir;
1224     stringstream figsave;
1225     stringstream figsave1;
1226     stringstream figsave2;
1227     const char *format = saveas;
1228     if ( !strcmp(format,"ps") ) {
1229     figsave.str("");
1230     figsave << outdir << "/" ;
1231     figsave << figrec << "_qlook.";
1232     figsave << format << "(";
1233     rapporto->Print(figsave.str().c_str(),"Landscape");
1234     figsave1.str("");
1235     figsave1 << outdir << "/" ;
1236     figsave1 << figrec << "_qlook.";
1237     figsave1 << format;
1238     figura->Print(figsave1.str().c_str(),"Landscape");
1239     figsave2.str("");
1240     figsave2 << outdir << "/" ;
1241     figsave2 << figrec << "_qlook.";
1242     figsave2 << format << ")";
1243     figura2->Print(figsave2.str().c_str(),"Landscape");
1244     } else {
1245     figsave.str("");
1246     figsave << outdir << "/" ;
1247     figsave << figrec << "_qlook1.";
1248     figsave << format;
1249     figura->SaveAs(figsave.str().c_str());
1250     figsave.str("");
1251     figsave << outdir << "/" ;
1252     figsave << figrec << "_qlook2.";
1253     figsave << format;
1254     figura2->SaveAs(figsave.str().c_str());
1255     figsave.str("");
1256     figsave << outdir << "/" ;
1257     figsave << figrec << "_qlook3.";
1258     figsave << format;
1259     rapporto->SaveAs(figsave.str().c_str());
1260     };
1261     }
1262    

  ViewVC Help
Powered by ViewVC 1.1.23