/[PAMELA software]/quicklook/trigger/src/TriggerScanBasic.cpp
ViewVC logotype

Annotation of /quicklook/trigger/src/TriggerScanBasic.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Feb 2 17:07:34 2007 UTC (17 years, 10 months ago) by campana
Branch: MAIN
CVS Tags: v1r09
Changes since 1.4: +1 -1 lines
Trigger QLook new release 2007

1 campana 1.1 /*
2     * TriggerScanBasic
3     * Author Nagni
4     * Modified by G. De Rosa
5     * Version 1.2
6     * Date 27 Apr 2006
7     * Version 1.4
8 campana 1.3 * Date 26 Jun 2006: Inserted dependences on OnBoardTime and modified histogram ranges.
9 campana 1.1 *
10     * Description:
11     * Describe the performance of the Trigger.
12     *
13     * Parameters:
14     * TString base - the path to the root directory for the specific Pamela unpack session
15     * TString outDirectory - the path where to save the output image (Default = base)
16     * TString format - the format which will be used for save the produced images (Default = "ps")
17     */
18    
19 campana 1.2 #include <TROOT.h>
20     #include <TFile.h>
21 campana 1.1 #include <TString.h>
22     #include <TObjString.h>
23     #include <TTree.h>
24     #include <TBranch.h>
25     #include <TGraph.h>
26     #include <TStyle.h>
27 campana 1.2 #include <TH1.h>
28 pam-rm2 1.4 #include <TH1F.h>
29 campana 1.3 #include <TH2S.h>
30 campana 1.1 #include <TPaveText.h>
31     #include <TCanvas.h>
32     #include <TLatex.h>
33     #include <TGraph.h>
34     #include <physics/trigger/TriggerEvent.h>
35     #include <EventHeader.h>
36     #include <PscuHeader.h>
37     #include <iostream>
38    
39     using namespace std;
40    
41     char bit(int decimal, char pos)
42     {
43     return( (decimal>>pos)%2 );
44     }
45    
46     void TriggerScanBasic(TString base, TString outDirectory = "", TString format = ""){
47 pam-rm2 1.4
48     Long_t lastime, firstime;
49     double obmin=0.;
50     double obmax=0.;
51     stringstream oss, oss1, oss2, oss3, noentries, stringa;
52 campana 1.1 std::stringstream sst;
53     if (outDirectory == "") outDirectory = base.Data();
54     TString filename = ((TObjString*)base.Tokenize('/')->Last())->GetString();
55    
56     TFile *file =new TFile(base.Data()) ;
57     if (!file){
58     printf("file not Found \n");
59     return;
60     }
61    
62     TTree *PhysicsTr = (TTree*)file->Get("Physics");
63     TBranch *TrigBr = PhysicsTr->GetBranch("Trigger");
64     TBranch *HeadBr = PhysicsTr->GetBranch("Header");
65    
66     pamela::EventHeader *eh = 0;
67     pamela::PscuHeader *ph = 0;
68    
69     pamela::trigger::TriggerEvent *triggerEvent = 0;
70    
71     PhysicsTr->SetBranchAddress("Trigger", &triggerEvent);
72     PhysicsTr->SetBranchAddress("Header", &eh);
73    
74     Long64_t nevents = TrigBr->GetEntries();
75     if (nevents <= 0) {
76     printf("nevents = %llu \n", nevents);
77     file->Close();
78     return;
79     }
80 pam-rm2 1.4
81     //-------------- to know the max and min OBT ----------------------------//
82     HeadBr->GetEntry(0);
83     ph = eh->GetPscuHeader();
84     firstime = ph->GetOrbitalTime();
85     HeadBr->GetEntry(nevents);
86     ph = eh->GetPscuHeader();
87     lastime = ph->GetOrbitalTime();
88     int i =0;
89     while(i < nevents){
90     HeadBr->GetEntry(i);
91     ph = eh->GetPscuHeader();
92     if((ph->GetOrbitalTime()) <= firstime) firstime=ph->GetOrbitalTime();
93     if((ph->GetOrbitalTime()) >= lastime) lastime=ph->GetOrbitalTime();
94     i++;
95     }
96    
97     //------------------------ First histogram -----------------------------------//
98     obmin=firstime;
99     obmax=lastime;
100 campana 1.5 Int_t nbin = (lastime-firstime)/60000; // on 1 min
101 pam-rm2 1.4 gStyle->SetOptStat(0);
102     TH1F *h1 = new TH1F ("histo1", "" , nbin, obmin, obmax);
103     TH1F *h2 = new TH1F ("histo2", "" , nbin, obmin, obmax);
104     TH1F *h5 = new TH1F ("histo5", "" , nbin, obmin, obmax);
105     TH1F *LiveTimeMean = new TH1F("LiveTimeMean", sst.str().c_str(),nbin, obmin, obmax);
106     TH1F *DeadTimeMean = new TH1F("DeadTimeMean", sst.str().c_str(),nbin, obmin, obmax);
107     //==============================================================
108 campana 1.1
109     /* Histo DEF */
110    
111     /*
112     * S4 and Calorimeter Counters histograms
113     */
114     TCanvas *S4CalCanvas = new TCanvas("S4CalCanvas","S4CalCanvas", 1280, 1024);
115     S4CalCanvas->Divide(1,2);
116     //----------
117     sst.str("");
118     sst << "S4 Counters based on " << base.Data();
119     //----------
120     sst.str("");
121 campana 1.2 sst << "Calorimeter Rate Counters based on " << base.Data();
122     TH1F *S4Cal2Histo = new TH1F("S4Cal2Histo", sst.str().c_str(), 20, 0, 20);
123 campana 1.1
124 pam-rm2 1.4 // int i = 0;
125     i = 0;
126 campana 1.1 Int_t size = nevents;
127    
128     Double_t *time = new Double_t[size];
129     Double_t *evCounter = new Double_t[size];
130     Double_t *deadTime = new Double_t[size];
131     Double_t *liveTime = new Double_t[size];
132     //
133     Double_t *trigrate0 = new Double_t[size];
134     Double_t *trigrate1 = new Double_t[size];
135     Double_t *trigrate2 = new Double_t[size];
136     Double_t *trigrate3 = new Double_t[size];
137     Double_t *trigrate4 = new Double_t[size];
138     Double_t *trigrate5 = new Double_t[size];
139     //
140     Double_t *pmt1 = new Double_t[size];
141     Double_t *pmt2 = new Double_t[size];
142     Double_t *pmt3 = new Double_t[size];
143     //
144     Double_t *s4rate = new Double_t[size];
145     //
146 campana 1.3 Double_t *pmt1_0 = new Double_t[size];
147     Double_t *pmt1_1 = new Double_t[size];
148     Double_t *pmt1_2 = new Double_t[size];
149     Double_t *pmt1_3 = new Double_t[size];
150     Double_t *pmt1_4 = new Double_t[size];
151     Double_t *pmt1_5 = new Double_t[size];
152     Double_t *pmt1_6 = new Double_t[size];
153     Double_t *pmt1_7 = new Double_t[size];
154     Double_t *pmt1_8 = new Double_t[size];
155     Double_t *pmt1_9 = new Double_t[size];
156     Double_t *pmt1_10 = new Double_t[size];
157     Double_t *pmt1_11 = new Double_t[size];
158     Double_t *pmt1_12 = new Double_t[size];
159     Double_t *pmt1_13 = new Double_t[size];
160     Double_t *pmt1_14 = new Double_t[size];
161     Double_t *pmt1_15 = new Double_t[size];
162     Double_t *pmt1_16 = new Double_t[size];
163     Double_t *pmt1_17 = new Double_t[size];
164     Double_t *pmt1_18 = new Double_t[size];
165     Double_t *pmt1_19 = new Double_t[size];
166     Double_t *pmt1_20 = new Double_t[size];
167     Double_t *pmt1_21 = new Double_t[size];
168     Double_t *pmt1_22 = new Double_t[size];
169     Double_t *pmt1_23 = new Double_t[size];
170     //
171     Double_t *pmt2_0 = new Double_t[size];
172     Double_t *pmt2_1 = new Double_t[size];
173     Double_t *pmt2_2 = new Double_t[size];
174     Double_t *pmt2_3 = new Double_t[size];
175     Double_t *pmt2_4 = new Double_t[size];
176     Double_t *pmt2_5 = new Double_t[size];
177     Double_t *pmt2_6 = new Double_t[size];
178     Double_t *pmt2_7 = new Double_t[size];
179     Double_t *pmt2_8 = new Double_t[size];
180     Double_t *pmt2_9 = new Double_t[size];
181     Double_t *pmt2_10 = new Double_t[size];
182     Double_t *pmt2_11 = new Double_t[size];
183     Double_t *pmt2_12 = new Double_t[size];
184     Double_t *pmt2_13 = new Double_t[size];
185     Double_t *pmt2_14 = new Double_t[size];
186     Double_t *pmt2_15 = new Double_t[size];
187     Double_t *pmt2_16 = new Double_t[size];
188     Double_t *pmt2_17 = new Double_t[size];
189     Double_t *pmt2_18 = new Double_t[size];
190     Double_t *pmt2_19 = new Double_t[size];
191     Double_t *pmt2_20 = new Double_t[size];
192     Double_t *pmt2_21 = new Double_t[size];
193     Double_t *pmt2_22 = new Double_t[size];
194     Double_t *pmt2_23 = new Double_t[size];
195     //
196 campana 1.1 while(i < nevents){
197     HeadBr->GetEntry(i);
198     TrigBr->GetEntry(i);
199    
200     /* time vector fill*/
201     ph = eh->GetPscuHeader();
202     time[i] = ph->GetOrbitalTime();
203    
204     /* eventCounter vector fill*/
205     evCounter[i] = triggerEvent->evcount;
206    
207     if( evCounter[i] > 1 ){
208    
209     /* live time vector fill*/
210     liveTime[i] = 0.16 * triggerEvent->dltime[0];
211    
212 pam-rm2 1.4
213     if (liveTime[i]<600) h1->Fill(ph->GetOrbitalTime(),liveTime[i]);
214     if (liveTime[i]<600) h2->Fill(ph->GetOrbitalTime());
215    
216 campana 1.1 /* dead time vector fill*/
217     deadTime[i] = 0.01 * triggerEvent->dltime[1];
218    
219 pam-rm2 1.4 if (deadTime[i]<600) h5->Fill(ph->GetOrbitalTime(),deadTime[i]);
220 campana 1.1 }
221    
222     gStyle->SetStatY(0.85);
223 pam-rm2 1.4
224 campana 1.1 /* PMT Plane Counters */
225    
226     pmt1[i] = 1.*triggerEvent->pmtpl[0];
227     pmt2[i] = 1.*triggerEvent->pmtpl[1];
228     pmt3[i] = 1.*triggerEvent->pmtpl[2];
229    
230     /* Trigger Rate Counters*/
231    
232     trigrate0[i] = (1/4.)*triggerEvent->trigrate[0];
233     trigrate1[i] = (1/4.)*triggerEvent->trigrate[1];
234     trigrate2[i] = (1/4.)*triggerEvent->trigrate[2];
235     trigrate3[i] = (1/4.)*triggerEvent->trigrate[3];
236     trigrate4[i] = (1/4.)*triggerEvent->trigrate[4];
237     trigrate5[i] = (1/4.)*triggerEvent->trigrate[5];
238    
239     /* S4 and Calorimeter Counters fill*/
240    
241     s4rate[i] = triggerEvent->s4calcount[0];
242     S4Cal2Histo->Fill(triggerEvent->s4calcount[1]);
243 campana 1.3 //
244    
245     /* pmtcount1 */
246     pmt1_0[i] = triggerEvent->pmtcount1[0];
247     pmt1_1[i] = triggerEvent->pmtcount1[1];
248     pmt1_2[i] = triggerEvent->pmtcount1[2];
249     pmt1_3[i] = triggerEvent->pmtcount1[3];
250     pmt1_4[i] = triggerEvent->pmtcount1[4];
251     pmt1_5[i] = triggerEvent->pmtcount1[5];
252     pmt1_6[i] = triggerEvent->pmtcount1[6];
253     pmt1_7[i] = triggerEvent->pmtcount1[7];
254     pmt1_8[i] = triggerEvent->pmtcount1[8];
255     pmt1_9[i] = triggerEvent->pmtcount1[9];
256     pmt1_10[i] = triggerEvent->pmtcount1[10];
257     pmt1_11[i] = triggerEvent->pmtcount1[11];
258     pmt1_12[i] = triggerEvent->pmtcount1[12];
259     pmt1_13[i] = triggerEvent->pmtcount1[13];
260     pmt1_14[i] = triggerEvent->pmtcount1[14];
261     pmt1_15[i] = triggerEvent->pmtcount1[15];
262     pmt1_16[i] = triggerEvent->pmtcount1[16];
263     pmt1_17[i] = triggerEvent->pmtcount1[17];
264     pmt1_18[i] = triggerEvent->pmtcount1[18];
265     pmt1_19[i] = triggerEvent->pmtcount1[19];
266     pmt1_20[i] = triggerEvent->pmtcount1[20];
267     pmt1_21[i] = triggerEvent->pmtcount1[21];
268     pmt1_22[i] = triggerEvent->pmtcount1[22];
269     pmt1_23[i] = triggerEvent->pmtcount1[23];
270    
271    
272     /* pmtcount2 */
273    
274     pmt2_0[i] = triggerEvent->pmtcount2[0];
275     pmt2_1[i] = triggerEvent->pmtcount2[1];
276     pmt2_2[i] = triggerEvent->pmtcount2[2];
277     pmt2_3[i] = triggerEvent->pmtcount2[3];
278     pmt2_4[i] = triggerEvent->pmtcount2[4];
279     pmt2_5[i] = triggerEvent->pmtcount2[5];
280     pmt2_6[i] = triggerEvent->pmtcount2[6];
281     pmt2_7[i] = triggerEvent->pmtcount2[7];
282     pmt2_8[i] = triggerEvent->pmtcount2[8];
283     pmt2_9[i] = triggerEvent->pmtcount2[9];
284     pmt2_10[i] = triggerEvent->pmtcount2[10];
285     pmt2_11[i] = triggerEvent->pmtcount2[11];
286     pmt2_12[i] = triggerEvent->pmtcount2[12];
287     pmt2_13[i] = triggerEvent->pmtcount2[13];
288     pmt2_14[i] = triggerEvent->pmtcount2[14];
289     pmt2_15[i] = triggerEvent->pmtcount2[15];
290     pmt2_16[i] = triggerEvent->pmtcount2[16];
291     pmt2_17[i] = triggerEvent->pmtcount2[17];
292     pmt2_18[i] = triggerEvent->pmtcount2[18];
293     pmt2_19[i] = triggerEvent->pmtcount2[19];
294     pmt2_20[i] = triggerEvent->pmtcount2[20];
295     pmt2_21[i] = triggerEvent->pmtcount2[21];
296     pmt2_22[i] = triggerEvent->pmtcount2[22];
297     pmt2_23[i] = triggerEvent->pmtcount2[23];
298     //
299 campana 1.1 i++;
300     }
301    
302     gStyle->SetOptStat(111111);
303     gStyle->SetStatH(0.15);
304     gStyle->SetStatW(0.15);
305    
306     /*
307     * Event Counter graph
308     */
309     TCanvas *EvCounterCanvas = new TCanvas("EvCounterCanvas","EvCounterCanvas", 1280, 1024);
310     //----------
311     sst.str("");
312     sst << "Event Counter";
313     TGraph *evCounterGraph = new TGraph(nevents, time, evCounter);
314     evCounterGraph->SetTitle(sst.str().c_str());
315 campana 1.3 evCounterGraph->GetXaxis()->SetTitle("OnBoardTime");
316 campana 1.1 evCounterGraph->GetXaxis()->CenterTitle();
317     evCounterGraph->Draw("APL");
318    
319     /*
320     * Dead and Live time graphs
321     */
322     TCanvas *DeadLiveCanvas = new TCanvas("DeadLiveCanvas","DeadLiveCanvas", 1280, 1024);
323     DeadLiveCanvas->Divide(1,2);
324     //----------
325     sst.str("");
326     sst << "Graph of Dead Time vs OBT based on " << base.Data();
327     TGraph *DeadTimeGraph = new TGraph(nevents, time, deadTime);
328     DeadLiveCanvas->cd(1);
329     sst.str("");
330     sst << "Dead Time";
331     DeadTimeGraph->SetTitle(sst.str().c_str());
332     DeadTimeGraph->SetFillColor(2);
333 campana 1.3 DeadTimeGraph->GetXaxis()->SetTitle("OnBoardTime");
334 campana 1.1 DeadTimeGraph->GetXaxis()->CenterTitle();
335     DeadTimeGraph->GetYaxis()->SetTitle("DeadTime(ms)");
336     DeadTimeGraph->GetYaxis()->CenterTitle();
337 campana 1.3 // DeadTimeGraph->SetMaximum(100);
338 campana 1.1 DeadTimeGraph->Draw("AP");
339     //----------
340     sst.str("");
341     sst << "Graph of Live Time vs OBT based on " << base.Data();
342     TGraph *LiveTimeGraph = new TGraph(nevents, (const Double_t*)time, (const Double_t*)liveTime);
343     DeadLiveCanvas->cd(2);
344     sst.str("");
345     sst << "Live Time";
346     LiveTimeGraph->SetTitle(sst.str().c_str());
347     LiveTimeGraph->SetFillColor(2);
348 campana 1.3 LiveTimeGraph->GetXaxis()->SetTitle("OnBoardTime");
349 campana 1.1 LiveTimeGraph->GetXaxis()->CenterTitle();
350     LiveTimeGraph->GetYaxis()->SetTitle("LiveTime(ms)");
351     LiveTimeGraph->GetYaxis()->CenterTitle();
352     LiveTimeGraph->Draw("AP");
353    
354 pam-rm2 1.4 /*
355     * Average Dead and Live time graphs
356     */
357     TCanvas *MeanLiveDeadCanvas = new TCanvas("MeanLiveDeadCanvas","MeanLiveDeadCanvas", 1280, 1024);
358     MeanLiveDeadCanvas->Divide(1,2);
359    
360     MeanLiveDeadCanvas->cd(1);
361     DeadTimeMean->Divide(h5,h2);
362     sst.str("");
363     sst << "Average Dead Time";
364     DeadTimeMean->GetXaxis()->SetTitle("OnBoardTime");
365     DeadTimeMean->GetXaxis()->CenterTitle();
366     DeadTimeMean->GetYaxis()->SetTitle("Average Dead Time (over 1min)");
367     DeadTimeMean->GetYaxis()->CenterTitle();
368     DeadTimeMean->Draw();
369     MeanLiveDeadCanvas->cd(2);
370     LiveTimeMean->Divide(h1,h2);
371     sst.str("");
372     sst << "Average Live Time";
373     LiveTimeMean->GetXaxis()->SetTitle("OnBoardTime");
374     LiveTimeMean->GetXaxis()->CenterTitle();
375     LiveTimeMean->GetYaxis()->SetTitle("Average Live Time (over 1min)");
376     LiveTimeMean->GetYaxis()->CenterTitle();
377     LiveTimeMean->Draw();
378    
379 campana 1.1 /*
380     * PMT Plane Counters Graph
381     */
382    
383     TCanvas *PMTCanvas = new TCanvas("PMTCanvas","PMTCanvas", 1280, 1024);
384     PMTCanvas->Divide(1,3);
385     //----------
386     sst.str("");
387     sst << "Graph of PMT Plane Counters (S11 AND S12) vs OBT based on " << base.Data();
388     TGraph *PMT1Graph = new TGraph(nevents, time, pmt1);
389     PMTCanvas->cd(1);
390     sst.str("");
391     sst << "PMT Plane Counters (S11 AND S12)";
392     PMT1Graph->SetTitle(sst.str().c_str());
393     PMT1Graph->SetFillColor(2);
394 campana 1.3 PMT1Graph->GetXaxis()->SetTitle("OnBoardTime");
395 campana 1.1 PMT1Graph->GetXaxis()->CenterTitle();
396 pam-rm2 1.4 PMT1Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)");
397 campana 1.1 PMT1Graph->GetYaxis()->CenterTitle();
398     PMT1Graph->Draw("AP");
399     //----------
400     sst.str("");
401     sst << "Graph PMT Plane Counters (S21 AND S22) vs OBT based on " << base.Data();
402     TGraph *PMT2Graph = new TGraph(nevents, time, pmt2);
403     PMTCanvas->cd(2);
404     sst.str("");
405     sst << "PMT Plane Counters (S21 AND S22)";
406     PMT2Graph->SetTitle(sst.str().c_str());
407     PMT2Graph->SetFillColor(2);
408 campana 1.3 PMT2Graph->GetXaxis()->SetTitle("OnBoardTime");
409 campana 1.1 PMT2Graph->GetXaxis()->CenterTitle();
410 pam-rm2 1.4 PMT2Graph->GetYaxis()->SetTitle("PMT Plane Counters (over 60 ms)");
411 campana 1.1 PMT2Graph->GetYaxis()->CenterTitle();
412     PMT2Graph->Draw("AP");
413     //----------
414     sst.str("");
415     sst << "Graph PMT Plane Counters (S31 AND S32) vs OBT based on " << base.Data();
416     TGraph *PMT3Graph = new TGraph(nevents, time, pmt3);
417     PMTCanvas->cd(3);
418     sst.str("");
419     sst << "PMT Plane Counters (S31 AND S32)";
420     PMT3Graph->SetTitle(sst.str().c_str());
421     PMT3Graph->SetFillColor(2);
422 campana 1.3 PMT3Graph->GetXaxis()->SetTitle("OnBoardTime");
423 campana 1.1 PMT3Graph->GetXaxis()->CenterTitle();
424 pam-rm2 1.4 PMT3Graph->GetYaxis()->SetTitle("PMT Plane Rate Counters (over 60 ms)");
425 campana 1.1 PMT3Graph->GetYaxis()->CenterTitle();
426     PMT3Graph->Draw("AP");
427     //
428     //----------
429    
430     /*
431     * Trigger Rate Counters draw
432     */
433    
434     TCanvas *TrigRate1Canvas = new TCanvas("TrigRate1Canvas","TrigRate1Canvas", 1280, 1024);
435     TrigRate1Canvas->Divide(1,3);
436     //----------
437     sst.str("");
438     sst << "Graph of Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data();
439    
440     TGraph *TrigRate0Graph = new TGraph(nevents, time, trigrate0);
441     TrigRate1Canvas->cd(1);
442     sst.str("");
443     sst << "Trigger Rate Counters (S11 OR S12) AND (S21 OR S22) AND (S31 OR S32)";
444     TrigRate0Graph->SetTitle(sst.str().c_str());
445     TrigRate0Graph->SetFillColor(2);
446 campana 1.3 TrigRate0Graph->GetXaxis()->SetTitle("OnBoardTime");
447 campana 1.1 TrigRate0Graph->GetXaxis()->CenterTitle();
448 campana 1.2 TrigRate0Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
449 campana 1.1 TrigRate0Graph->GetYaxis()->CenterTitle();
450     TrigRate0Graph->Draw("AP");
451     //----------
452     sst.str("");
453     sst << "Graph Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data();
454     TGraph *TrigRate1Graph = new TGraph(nevents, time, trigrate1);
455     TrigRate1Canvas->cd(2);
456     sst.str("");
457     sst << "Trigger Rate Counters (S11 AND S12) AND (S21 AND S22) AND (S31 AND S32)";
458     TrigRate1Graph->SetTitle(sst.str().c_str());
459     TrigRate1Graph->SetFillColor(2);
460 campana 1.3 TrigRate1Graph->GetXaxis()->SetTitle("OnBoardTime");
461 campana 1.1 TrigRate1Graph->GetXaxis()->CenterTitle();
462 campana 1.2 TrigRate1Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
463 campana 1.1 TrigRate1Graph->GetYaxis()->CenterTitle();
464     TrigRate1Graph->Draw("AP");
465     //----------
466     sst.str("");
467     sst << "Graph Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) vs OBT based on " << base.Data();
468     TGraph *TrigRate2Graph = new TGraph(nevents, time, trigrate2);
469     TrigRate1Canvas->cd(3);
470     sst.str("");
471     sst << "Trigger Rate Counters (S21 OR S22) AND (S31 OR S32) ";
472     TrigRate2Graph->SetTitle(sst.str().c_str());
473     TrigRate2Graph->SetFillColor(2);
474 campana 1.3 TrigRate2Graph->GetXaxis()->SetTitle("OnBoardTime");
475 campana 1.1 TrigRate2Graph->GetXaxis()->CenterTitle();
476 campana 1.2 TrigRate2Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
477 campana 1.1 TrigRate2Graph->GetYaxis()->CenterTitle();
478     TrigRate2Graph->Draw("AP");
479     //
480     //----------
481     //
482     TCanvas *TrigRate2Canvas = new TCanvas("TrigRate2Canvas","TrigRate2Canvas", 1280, 1024);
483     TrigRate2Canvas->Divide(1,3);
484     //----------
485     sst.str("");
486     sst << "Graph of Trigger Rate Counters (S21 AND S22) AND (S31 AND S32) vs OBT based on " << base.Data();
487    
488     TGraph *TrigRate3Graph = new TGraph(nevents, time, trigrate3);
489     TrigRate2Canvas->cd(1);
490     sst.str("");
491     sst << "Trigger Rate Counters (S21 AND S22) AND (S31 AND S32)";
492     TrigRate3Graph->SetTitle(sst.str().c_str());
493     TrigRate3Graph->SetFillColor(2);
494 campana 1.3 TrigRate3Graph->GetXaxis()->SetTitle("OnBoardTime");
495 campana 1.1 TrigRate3Graph->GetXaxis()->CenterTitle();
496 campana 1.2 TrigRate3Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
497 campana 1.1 TrigRate3Graph->GetYaxis()->CenterTitle();
498     TrigRate3Graph->Draw("AP");
499     //----------
500     sst.str("");
501     sst << "Graph Trigger Rate Counters S12 AND (S21 AND S22) vs OBT based on " << base.Data();
502     TGraph *TrigRate4Graph = new TGraph(nevents, time, trigrate4);
503     TrigRate2Canvas->cd(2);
504     sst.str("");
505     sst << "Trigger Rate Counters S12 AND (S21 AND S22)";
506     TrigRate4Graph->SetTitle(sst.str().c_str());
507     TrigRate4Graph->SetFillColor(2);
508 campana 1.3 TrigRate4Graph->GetXaxis()->SetTitle("OnBoardTime");
509 campana 1.1 TrigRate4Graph->GetXaxis()->CenterTitle();
510 campana 1.2 TrigRate4Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
511 campana 1.1 TrigRate4Graph->GetYaxis()->CenterTitle();
512     TrigRate4Graph->Draw("AP");
513     //----------
514     sst.str("");
515     sst << "Graph Trigger Rate Counters (S11 OR S12) AND (S31 OR S32) vs OBT based on " << base.Data();
516     TGraph *TrigRate5Graph = new TGraph(nevents, time, trigrate5);
517     TrigRate2Canvas->cd(3);
518     sst.str("");
519     sst << "Trigger Rate Counters (S11 OR S12) AND (S31 OR S32)";
520     TrigRate5Graph->SetTitle(sst.str().c_str());
521     TrigRate5Graph->SetFillColor(2);
522 campana 1.3 TrigRate5Graph->GetXaxis()->SetTitle("OnBoardTime");
523 campana 1.1 TrigRate5Graph->GetXaxis()->CenterTitle();
524 campana 1.2 TrigRate5Graph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
525 campana 1.1 TrigRate5Graph->GetYaxis()->CenterTitle();
526     TrigRate5Graph->Draw("AP");
527     //----------
528    
529     gStyle->SetOptStat("mr");
530    
531     /* S4 and Calorimeter Counters draw*/
532     TGraph *s4RateGraph = new TGraph(nevents, time, s4rate);
533     S4CalCanvas->cd(1);
534     sst.str("");
535     sst << "S4 Trigger Rate Counters";
536     s4RateGraph->SetTitle(sst.str().c_str());
537     s4RateGraph->SetFillColor(2);
538 campana 1.3 s4RateGraph->GetXaxis()->SetTitle("OnBoardTime");
539 campana 1.1 s4RateGraph->GetXaxis()->CenterTitle();
540 campana 1.2 s4RateGraph->GetYaxis()->SetTitle("Trigger Rate Counters (Hz)");
541 campana 1.1 s4RateGraph->GetYaxis()->CenterTitle();
542     s4RateGraph->Draw("AP");
543     //----------
544     S4CalCanvas->cd(2);
545 campana 1.2 gPad->SetLogy(1);
546 campana 1.1 S4Cal2Histo->GetXaxis()->SetTitle("Hz");
547     S4Cal2Histo->Draw();
548     //
549     //
550     //
551     gStyle->SetOptStat("mr");
552     gStyle->SetStatH(0.3);
553     gStyle->SetStatW(0.3);
554    
555    
556 campana 1.3 //----------
557 campana 1.1 TCanvas *RatePMT1 = new TCanvas("RatePMT1", "Rate PMT S11A", 1);
558     RatePMT1->Divide (3,3);
559 campana 1.3 //----------
560     sst.str("");
561     sst << "pmtcount1[0] vs OBT based on " << base.Data();
562     TGraph *PMT1_0Graph = new TGraph(nevents, time, pmt1_0);
563 campana 1.1 RatePMT1->cd(1);
564 campana 1.3 sst.str("");
565     sst << "PMT S111A";
566     PMT1_0Graph->SetTitle(sst.str().c_str());
567     PMT1_0Graph->SetFillColor(2);
568     PMT1_0Graph->GetXaxis()->SetTitle("OnBoardTime");
569     PMT1_0Graph->GetXaxis()->CenterTitle();
570     PMT1_0Graph->GetYaxis()->SetTitle("PMT Counters");
571     PMT1_0Graph->GetYaxis()->CenterTitle();
572     PMT1_0Graph->Draw("AP");
573     //delete PMT1_0Graph;
574     //----------
575     sst.str("");
576     sst << "pmtcount1[0] vs OBT based on " << base.Data();
577     TGraph *PMT1_1Graph = new TGraph(nevents, time, pmt1_1);
578     RatePMT1->cd(2);
579     sst.str("");
580     sst << "PMT S112A";
581     PMT1_1Graph->SetTitle(sst.str().c_str());
582     PMT1_1Graph->SetFillColor(2);
583     PMT1_1Graph->GetXaxis()->SetTitle("OnBoardTime");
584     PMT1_1Graph->GetXaxis()->CenterTitle();
585     PMT1_1Graph->GetYaxis()->SetTitle("PMT Counters");
586     PMT1_1Graph->GetYaxis()->CenterTitle();
587     PMT1_1Graph->Draw("AP");
588     //----------
589     sst.str("");
590     sst << "pmtcount1[0] vs OBT based on " << base.Data();
591     TGraph *PMT1_2Graph = new TGraph(nevents, time, pmt1_2);
592     RatePMT1->cd(3);
593     sst.str("");
594     sst << "PMT S113A";
595     PMT1_2Graph->SetTitle(sst.str().c_str());
596     PMT1_2Graph->SetFillColor(2);
597     PMT1_2Graph->GetXaxis()->SetTitle("OnBoardTime");
598     PMT1_2Graph->GetXaxis()->CenterTitle();
599     PMT1_2Graph->GetYaxis()->SetTitle("PMT Counters");
600     PMT1_2Graph->GetYaxis()->CenterTitle();
601     PMT1_2Graph->Draw("AP");
602 campana 1.1 //----------
603 campana 1.3 sst.str("");
604     sst << "pmtcount1[0] vs OBT based on " << base.Data();
605     TGraph *PMT1_3Graph = new TGraph(nevents, time, pmt1_3);
606 campana 1.1 RatePMT1->cd(4);
607 campana 1.3 sst.str("");
608     sst << "PMT S114A";
609     PMT1_3Graph->SetTitle(sst.str().c_str());
610     PMT1_3Graph->SetFillColor(2);
611     PMT1_3Graph->GetXaxis()->SetTitle("OnBoardTime");
612     PMT1_3Graph->GetXaxis()->CenterTitle();
613     PMT1_3Graph->GetYaxis()->SetTitle("PMT Counters");
614     PMT1_3Graph->GetYaxis()->CenterTitle();
615     PMT1_3Graph->Draw("AP");
616     //----------
617     sst.str("");
618     sst << "pmtcount1[0] vs OBT based on " << base.Data();
619     TGraph *PMT1_4Graph = new TGraph(nevents, time, pmt1_4);
620     RatePMT1->cd(5);
621     sst.str("");
622     sst << "PMT S115A";
623     PMT1_4Graph->SetTitle(sst.str().c_str());
624     PMT1_4Graph->SetFillColor(2);
625     PMT1_4Graph->GetXaxis()->SetTitle("OnBoardTime");
626     PMT1_4Graph->GetXaxis()->CenterTitle();
627     PMT1_4Graph->GetYaxis()->SetTitle("PMT Counters");
628     PMT1_4Graph->GetYaxis()->CenterTitle();
629     PMT1_4Graph->Draw("AP");
630 campana 1.1 //----------
631 campana 1.3 sst.str("");
632     sst << "pmtcount1[0] vs OBT based on " << base.Data();
633     TGraph *PMT1_5Graph = new TGraph(nevents, time, pmt1_5);
634 campana 1.1 RatePMT1->cd(6);
635 campana 1.3 sst.str("");
636     sst << "PMT S116A";
637     PMT1_5Graph->SetTitle(sst.str().c_str());
638     PMT1_5Graph->SetFillColor(2);
639     PMT1_5Graph->GetXaxis()->SetTitle("OnBoardTime");
640     PMT1_5Graph->GetXaxis()->CenterTitle();
641     PMT1_5Graph->GetYaxis()->SetTitle("PMT Counters");
642     PMT1_5Graph->GetYaxis()->CenterTitle();
643     PMT1_5Graph->Draw("AP");
644 campana 1.1 //----------
645 campana 1.3 sst.str("");
646     sst << "pmtcount1[0] vs OBT based on " << base.Data();
647     TGraph *PMT1_6Graph = new TGraph(nevents, time, pmt1_6);
648 campana 1.1 RatePMT1->cd(7);
649 campana 1.3 sst.str("");
650     sst << "PMT S117A";
651     PMT1_6Graph->SetTitle(sst.str().c_str());
652     PMT1_6Graph->SetFillColor(2);
653     PMT1_6Graph->GetXaxis()->SetTitle("OnBoardTime");
654     PMT1_6Graph->GetXaxis()->CenterTitle();
655     PMT1_6Graph->GetYaxis()->SetTitle("PMT Counters");
656     PMT1_6Graph->GetYaxis()->CenterTitle();
657     PMT1_6Graph->Draw("AP");
658 campana 1.1 //----------
659 campana 1.3 sst.str("");
660     sst << "pmtcount1[0] vs OBT based on " << base.Data();
661     TGraph *PMT1_7Graph = new TGraph(nevents, time, pmt1_7);
662 campana 1.1 RatePMT1->cd(8);
663 campana 1.3 sst.str("");
664     sst << "PMT S118A";
665     PMT1_7Graph->SetTitle(sst.str().c_str());
666     PMT1_7Graph->SetFillColor(2);
667     PMT1_7Graph->GetXaxis()->SetTitle("OnBoardTime");
668     PMT1_7Graph->GetXaxis()->CenterTitle();
669     PMT1_7Graph->GetYaxis()->SetTitle("PMT Counters");
670     PMT1_7Graph->GetYaxis()->CenterTitle();
671     PMT1_7Graph->Draw("AP");
672    
673     ////////////////
674 campana 1.1
675     TCanvas *RatePMT2 = new TCanvas("RatePMT2", "Rate PMT S11B", 1);
676     RatePMT2->Divide (3,3);
677 campana 1.3 //----------
678     sst.str("");
679     sst << "pmtcount1[0] vs OBT based on " << base.Data();
680     TGraph *PMT1_8Graph = new TGraph(nevents, time, pmt1_8);
681 campana 1.1 RatePMT2->cd(1);
682 campana 1.3 sst.str("");
683     sst << "PMT S111B";
684     PMT1_8Graph->SetTitle(sst.str().c_str());
685     PMT1_8Graph->SetFillColor(2);
686     PMT1_8Graph->GetXaxis()->SetTitle("OnBoardTime");
687     PMT1_8Graph->GetXaxis()->CenterTitle();
688     PMT1_8Graph->GetYaxis()->SetTitle("PMT Counters");
689     PMT1_8Graph->GetYaxis()->CenterTitle();
690     PMT1_8Graph->Draw("AP");
691 campana 1.1 //----------
692 campana 1.3 sst.str("");
693     sst << "pmtcount1[0] vs OBT based on " << base.Data();
694     TGraph *PMT1_9Graph = new TGraph(nevents, time, pmt1_9);
695 campana 1.1 RatePMT2->cd(2);
696 campana 1.3 sst.str("");
697     sst << "PMT S112B";
698     PMT1_9Graph->SetTitle(sst.str().c_str());
699     PMT1_9Graph->SetFillColor(2);
700     PMT1_9Graph->GetXaxis()->SetTitle("OnBoardTime");
701     PMT1_9Graph->GetXaxis()->CenterTitle();
702     PMT1_9Graph->GetYaxis()->SetTitle("PMT Counters");
703     PMT1_9Graph->GetYaxis()->CenterTitle();
704     PMT1_9Graph->Draw("AP");
705 campana 1.1 //----------
706 campana 1.3 sst.str("");
707     sst << "pmtcount1[0] vs OBT based on " << base.Data();
708     TGraph *PMT1_10Graph = new TGraph(nevents, time, pmt1_10);
709 campana 1.1 RatePMT2->cd(3);
710 campana 1.3 sst.str("");
711     sst << "PMT S113B";
712     PMT1_10Graph->SetTitle(sst.str().c_str());
713     PMT1_10Graph->SetFillColor(2);
714     PMT1_10Graph->GetXaxis()->SetTitle("OnBoardTime");
715     PMT1_10Graph->GetXaxis()->CenterTitle();
716     PMT1_10Graph->GetYaxis()->SetTitle("PMT Counters");
717     PMT1_10Graph->GetYaxis()->CenterTitle();
718     PMT1_10Graph->Draw("AP");
719 campana 1.1 //----------
720 campana 1.3 sst.str("");
721     sst << "pmtcount1[0] vs OBT based on " << base.Data();
722     TGraph *PMT1_11Graph = new TGraph(nevents, time, pmt1_11);
723 campana 1.1 RatePMT2->cd(4);
724 campana 1.3 sst.str("");
725     sst << "PMT S114B";
726     PMT1_11Graph->SetTitle(sst.str().c_str());
727     PMT1_11Graph->SetFillColor(2);
728     PMT1_11Graph->GetXaxis()->SetTitle("OnBoardTime");
729     PMT1_11Graph->GetXaxis()->CenterTitle();
730     PMT1_11Graph->GetYaxis()->SetTitle("PMT Counters");
731     PMT1_11Graph->GetYaxis()->CenterTitle();
732     PMT1_11Graph->Draw("AP");
733 campana 1.1 //----------
734 campana 1.3 sst.str("");
735     sst << "pmtcount1[0] vs OBT based on " << base.Data();
736     TGraph *PMT1_12Graph = new TGraph(nevents, time, pmt1_12);
737 campana 1.1 RatePMT2->cd(5);
738 campana 1.3 sst.str("");
739     sst << "PMT S115B";
740     PMT1_12Graph->SetTitle(sst.str().c_str());
741     PMT1_12Graph->SetFillColor(2);
742     PMT1_12Graph->GetXaxis()->SetTitle("OnBoardTime");
743     PMT1_12Graph->GetXaxis()->CenterTitle();
744     PMT1_12Graph->GetYaxis()->SetTitle("PMT Counters");
745     PMT1_12Graph->GetYaxis()->CenterTitle();
746     PMT1_12Graph->Draw("AP");
747 campana 1.1 //----------
748 campana 1.3 sst.str("");
749     sst << "pmtcount1[0] vs OBT based on " << base.Data();
750     TGraph *PMT1_13Graph = new TGraph(nevents, time, pmt1_13);
751 campana 1.1 RatePMT2->cd(6);
752 campana 1.3 sst.str("");
753     sst << "PMT S116B";
754     PMT1_13Graph->SetTitle(sst.str().c_str());
755     PMT1_13Graph->SetFillColor(2);
756     PMT1_13Graph->GetXaxis()->SetTitle("OnBoardTime");
757     PMT1_13Graph->GetXaxis()->CenterTitle();
758     PMT1_13Graph->GetYaxis()->SetTitle("PMT Counters");
759     PMT1_13Graph->GetYaxis()->CenterTitle();
760     PMT1_13Graph->Draw("AP");
761 campana 1.1 //----------
762 campana 1.3 sst.str("");
763     sst << "pmtcount1[0] vs OBT based on " << base.Data();
764     TGraph *PMT1_14Graph = new TGraph(nevents, time, pmt1_14);
765 campana 1.1 RatePMT2->cd(7);
766 campana 1.3 sst.str("");
767     sst << "PMT S117B";
768     PMT1_14Graph->SetTitle(sst.str().c_str());
769     PMT1_14Graph->SetFillColor(2);
770     PMT1_14Graph->GetXaxis()->SetTitle("OnBoardTime");
771     PMT1_14Graph->GetXaxis()->CenterTitle();
772     PMT1_14Graph->GetYaxis()->SetTitle("PMT Counters");
773     PMT1_14Graph->GetYaxis()->CenterTitle();
774     PMT1_14Graph->Draw("AP");
775 campana 1.1 //----------
776 campana 1.3 sst.str("");
777     sst << "pmtcount1[0] vs OBT based on " << base.Data();
778     TGraph *PMT1_15Graph = new TGraph(nevents, time, pmt1_15);
779 campana 1.1 RatePMT2->cd(8);
780 campana 1.3 sst.str("");
781     sst << "PMT S118B";
782     PMT1_15Graph->SetTitle(sst.str().c_str());
783     PMT1_15Graph->SetFillColor(2);
784     PMT1_15Graph->GetXaxis()->SetTitle("OnBoardTime");
785     PMT1_15Graph->GetXaxis()->CenterTitle();
786     PMT1_15Graph->GetYaxis()->SetTitle("PMT Counters");
787     PMT1_15Graph->GetYaxis()->CenterTitle();
788     PMT1_15Graph->Draw("AP");
789    
790     ///////////////
791    
792    
793     TCanvas *RatePMT3 = new TCanvas("RatePMT3", "Rate PMT S11B", 1);
794 campana 1.1 RatePMT3->Divide (3,4);
795 campana 1.3 //----------
796     sst.str("");
797     sst << "pmtcount1[0] vs OBT based on " << base.Data();
798     TGraph *PMT1_16Graph = new TGraph(nevents, time, pmt1_16);
799 campana 1.1 RatePMT3->cd(1);
800 campana 1.3 sst.str("");
801     sst << "PMT S121A";
802     PMT1_16Graph->SetTitle(sst.str().c_str());
803     PMT1_16Graph->SetFillColor(2);
804     PMT1_16Graph->GetXaxis()->SetTitle("OnBoardTime");
805     PMT1_16Graph->GetXaxis()->CenterTitle();
806     PMT1_16Graph->GetYaxis()->SetTitle("PMT Counters");
807     PMT1_16Graph->GetYaxis()->CenterTitle();
808     PMT1_16Graph->Draw("AP");
809 campana 1.1 //----------
810 campana 1.3 sst.str("");
811     sst << "pmtcount1[0] vs OBT based on " << base.Data();
812     TGraph *PMT1_17Graph = new TGraph(nevents, time, pmt1_17);
813 campana 1.1 RatePMT3->cd(2);
814 campana 1.3 sst.str("");
815     sst << "PMT S122A";
816     PMT1_17Graph->SetTitle(sst.str().c_str());
817     PMT1_17Graph->SetFillColor(2);
818     PMT1_17Graph->GetXaxis()->SetTitle("OnBoardTime");
819     PMT1_17Graph->GetXaxis()->CenterTitle();
820     PMT1_17Graph->GetYaxis()->SetTitle("PMT Counters");
821     PMT1_17Graph->GetYaxis()->CenterTitle();
822     PMT1_17Graph->Draw("AP");
823     //----------
824     sst.str("");
825     sst << "pmtcount1[0] vs OBT based on " << base.Data();
826     TGraph *PMT1_18Graph = new TGraph(nevents, time, pmt1_18);
827     RatePMT3->cd(3);
828     sst.str("");
829     sst << "PMT S123A";
830     PMT1_18Graph->SetTitle(sst.str().c_str());
831     PMT1_18Graph->SetFillColor(2);
832     PMT1_18Graph->GetXaxis()->SetTitle("OnBoardTime");
833     PMT1_18Graph->GetXaxis()->CenterTitle();
834     PMT1_18Graph->GetYaxis()->SetTitle("PMT Counters");
835     PMT1_18Graph->GetYaxis()->CenterTitle();
836     PMT1_18Graph->Draw("AP");
837 campana 1.1 //----------
838 campana 1.3 sst.str("");
839     sst << "pmtcount1[0] vs OBT based on " << base.Data();
840     TGraph *PMT1_19Graph = new TGraph(nevents, time, pmt1_19);
841 campana 1.1 RatePMT3->cd(4);
842 campana 1.3 sst.str("");
843     sst << "PMT S124A";
844     PMT1_19Graph->SetTitle(sst.str().c_str());
845     PMT1_19Graph->SetFillColor(2);
846     PMT1_19Graph->GetXaxis()->SetTitle("OnBoardTime");
847     PMT1_19Graph->GetXaxis()->CenterTitle();
848     PMT1_19Graph->GetYaxis()->SetTitle("PMT Counters");
849     PMT1_19Graph->GetYaxis()->CenterTitle();
850     PMT1_19Graph->Draw("AP");
851 campana 1.1 //----------
852 campana 1.3 sst.str("");
853     sst << "pmtcount1[0] vs OBT based on " << base.Data();
854     TGraph *PMT1_20Graph = new TGraph(nevents, time, pmt1_20);
855 campana 1.1 RatePMT3->cd(5);
856 campana 1.3 sst.str("");
857     sst << "PMT S125A";
858     PMT1_20Graph->SetTitle(sst.str().c_str());
859     PMT1_20Graph->SetFillColor(2);
860     PMT1_20Graph->GetXaxis()->SetTitle("OnBoardTime");
861     PMT1_20Graph->GetXaxis()->CenterTitle();
862     PMT1_20Graph->GetYaxis()->SetTitle("PMT Counters");
863     PMT1_20Graph->GetYaxis()->CenterTitle();
864     PMT1_20Graph->Draw("AP");
865 campana 1.1 //----------
866 campana 1.3 sst.str("");
867     sst << "pmtcount1[0] vs OBT based on " << base.Data();
868     TGraph *PMT1_21Graph = new TGraph(nevents, time, pmt1_21);
869 campana 1.1 RatePMT3->cd(6);
870 campana 1.3 sst.str("");
871     sst << "PMT S126A";
872     PMT1_21Graph->SetTitle(sst.str().c_str());
873     PMT1_21Graph->SetFillColor(2);
874     PMT1_21Graph->GetXaxis()->SetTitle("OnBoardTime");
875     PMT1_21Graph->GetXaxis()->CenterTitle();
876     PMT1_21Graph->GetYaxis()->SetTitle("PMT Counters");
877     PMT1_21Graph->GetYaxis()->CenterTitle();
878     PMT1_21Graph->Draw("AP");
879 campana 1.1 //----------
880 campana 1.3 sst.str("");
881     sst << "pmtcount1[0] vs OBT based on " << base.Data();
882     TGraph *PMT1_22Graph = new TGraph(nevents, time, pmt1_22);
883 campana 1.1 RatePMT3->cd(7);
884 campana 1.3 sst.str("");
885     sst << "PMT S121B";
886     PMT1_22Graph->SetTitle(sst.str().c_str());
887     PMT1_22Graph->SetFillColor(2);
888     PMT1_22Graph->GetXaxis()->SetTitle("OnBoardTime");
889     PMT1_22Graph->GetXaxis()->CenterTitle();
890     PMT1_22Graph->GetYaxis()->SetTitle("PMT Counters");
891     PMT1_22Graph->GetYaxis()->CenterTitle();
892     PMT1_22Graph->Draw("AP");
893 campana 1.1 //----------
894 campana 1.3 sst.str("");
895     sst << "pmtcount1[0] vs OBT based on " << base.Data();
896     TGraph *PMT1_23Graph = new TGraph(nevents, time, pmt1_23);
897 campana 1.1 RatePMT3->cd(8);
898 campana 1.3 sst.str("");
899     sst << "PMT S122B";
900     PMT1_23Graph->SetTitle(sst.str().c_str());
901     PMT1_23Graph->SetFillColor(2);
902     PMT1_23Graph->GetXaxis()->SetTitle("OnBoardTime");
903     PMT1_23Graph->GetXaxis()->CenterTitle();
904     PMT1_23Graph->GetYaxis()->SetTitle("PMT Counters");
905     PMT1_23Graph->GetYaxis()->CenterTitle();
906     PMT1_23Graph->Draw("AP");
907    
908     /////////////////////////
909    
910     //----------
911     sst.str("");
912     sst << "pmtcount1[0] vs OBT based on " << base.Data();
913     TGraph *PMT2_0Graph = new TGraph(nevents, time, pmt2_0);
914     RatePMT3->cd(9);
915     sst.str("");
916     sst << "PMT S123B";
917     PMT2_0Graph->SetTitle(sst.str().c_str());
918     PMT2_0Graph->SetFillColor(2);
919     PMT2_0Graph->GetXaxis()->SetTitle("OnBoardTime");
920     PMT2_0Graph->GetXaxis()->CenterTitle();
921     PMT2_0Graph->GetYaxis()->SetTitle("PMT Counters");
922     PMT2_0Graph->GetYaxis()->CenterTitle();
923     PMT2_0Graph->Draw("AP");
924    
925 campana 1.1 //----------
926 campana 1.3 sst.str("");
927     sst << "pmtcount1[0] vs OBT based on " << base.Data();
928     TGraph *PMT2_1Graph = new TGraph(nevents, time, pmt2_1);
929     RatePMT3->cd(10);
930     sst.str("");
931     sst << "PMT S124B";
932     PMT2_1Graph->SetTitle(sst.str().c_str());
933     PMT2_1Graph->SetFillColor(2);
934     PMT2_1Graph->GetXaxis()->SetTitle("OnBoardTime");
935     PMT2_1Graph->GetXaxis()->CenterTitle();
936     PMT2_1Graph->GetYaxis()->SetTitle("PMT Counters");
937     PMT2_1Graph->GetYaxis()->CenterTitle();
938     PMT2_1Graph->Draw("AP");
939    
940 campana 1.1 //----------
941 campana 1.3 sst.str("");
942     sst << "pmtcount1[0] vs OBT based on " << base.Data();
943     TGraph *PMT2_2Graph = new TGraph(nevents, time, pmt2_2);
944     RatePMT3->cd(11);
945     sst.str("");
946     sst << "PMT S125B";
947     PMT2_2Graph->SetTitle(sst.str().c_str());
948     PMT2_2Graph->SetFillColor(2);
949     PMT2_2Graph->GetXaxis()->SetTitle("OnBoardTime");
950     PMT2_2Graph->GetXaxis()->CenterTitle();
951     PMT2_2Graph->GetYaxis()->SetTitle("PMT Counters");
952     PMT2_2Graph->GetYaxis()->CenterTitle();
953     PMT2_2Graph->Draw("AP");
954    
955 campana 1.1 //----------
956 campana 1.3 sst.str("");
957     sst << "pmtcount1[0] vs OBT based on " << base.Data();
958     TGraph *PMT2_3Graph = new TGraph(nevents, time, pmt2_3);
959     RatePMT3->cd(12);
960     sst.str("");
961     sst << "PMT S126B";
962     PMT2_3Graph->SetTitle(sst.str().c_str());
963     PMT2_3Graph->SetFillColor(2);
964     PMT2_3Graph->GetXaxis()->SetTitle("OnBoardTime");
965     PMT2_3Graph->GetXaxis()->CenterTitle();
966     PMT2_3Graph->GetYaxis()->SetTitle("PMT Counters");
967     PMT2_3Graph->GetYaxis()->CenterTitle();
968     PMT2_3Graph->Draw("AP");
969    
970     ////////////////////
971    
972    
973     TCanvas *RatePMT4 = new TCanvas("RatePMT4", "Rate PMT S11B", 1);
974     RatePMT4->Divide (3,3);
975     //----------
976     sst.str("");
977     sst << "pmtcount1[0] vs OBT based on " << base.Data();
978     TGraph *PMT2_4Graph = new TGraph(nevents, time, pmt2_4);
979     RatePMT4->cd(1);
980     sst.str("");
981     sst << "PMT S211A";
982     PMT2_4Graph->SetTitle(sst.str().c_str());
983     PMT2_4Graph->SetFillColor(2);
984     PMT2_4Graph->GetXaxis()->SetTitle("OnBoardTime");
985     PMT2_4Graph->GetXaxis()->CenterTitle();
986     PMT2_4Graph->GetYaxis()->SetTitle("PMT Counters");
987     PMT2_4Graph->GetYaxis()->CenterTitle();
988     PMT2_4Graph->Draw("AP");
989     //----------
990     sst.str("");
991     sst << "pmtcount1[0] vs OBT based on " << base.Data();
992     TGraph *PMT2_5Graph = new TGraph(nevents, time, pmt2_5);
993     RatePMT4->cd(2);
994     sst.str("");
995     sst << "PMT S212A";
996     PMT2_5Graph->SetTitle(sst.str().c_str());
997     PMT2_5Graph->SetFillColor(2);
998     PMT2_5Graph->GetXaxis()->SetTitle("OnBoardTime");
999     PMT2_5Graph->GetXaxis()->CenterTitle();
1000     PMT2_5Graph->GetYaxis()->SetTitle("PMT Counters");
1001     PMT2_5Graph->GetYaxis()->CenterTitle();
1002     PMT2_5Graph->Draw("AP");
1003     //----------
1004     sst.str("");
1005     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1006     TGraph *PMT2_6Graph = new TGraph(nevents, time, pmt2_6);
1007     RatePMT4->cd(3);
1008     sst.str("");
1009     sst << "PMT S211B";
1010     PMT2_6Graph->SetTitle(sst.str().c_str());
1011     PMT2_6Graph->SetFillColor(2);
1012     PMT2_6Graph->GetXaxis()->SetTitle("OnBoardTime");
1013     PMT2_6Graph->GetXaxis()->CenterTitle();
1014     PMT2_6Graph->GetYaxis()->SetTitle("PMT Counters");
1015     PMT2_6Graph->GetYaxis()->CenterTitle();
1016     PMT2_6Graph->Draw("AP");
1017     //----------
1018     sst.str("");
1019     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1020     TGraph *PMT2_7Graph = new TGraph(nevents, time, pmt2_7);
1021     RatePMT4->cd(4);
1022     sst.str("");
1023     sst << "PMT S212B";
1024     PMT2_7Graph->SetTitle(sst.str().c_str());
1025     PMT2_7Graph->SetFillColor(2);
1026     PMT2_7Graph->GetXaxis()->SetTitle("OnBoardTime");
1027     PMT2_7Graph->GetXaxis()->CenterTitle();
1028     PMT2_7Graph->GetYaxis()->SetTitle("PMT Counters");
1029     PMT2_7Graph->GetYaxis()->CenterTitle();
1030     PMT2_7Graph->Draw("AP");
1031     //----------
1032     sst.str("");
1033     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1034     TGraph *PMT2_8Graph = new TGraph(nevents, time, pmt2_8);
1035     RatePMT4->cd(5);
1036     sst.str("");
1037     sst << "PMT S221A";
1038     PMT2_8Graph->SetTitle(sst.str().c_str());
1039     PMT2_8Graph->SetFillColor(2);
1040     PMT2_8Graph->GetXaxis()->SetTitle("OnBoardTime");
1041     PMT2_8Graph->GetXaxis()->CenterTitle();
1042     PMT2_8Graph->GetYaxis()->SetTitle("PMT Counters");
1043     PMT2_8Graph->GetYaxis()->CenterTitle();
1044     PMT2_8Graph->Draw("AP");
1045     //----------
1046     sst.str("");
1047     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1048     TGraph *PMT2_9Graph = new TGraph(nevents, time, pmt2_9);
1049     RatePMT4->cd(6);
1050     sst.str("");
1051     sst << "PMT S222A";
1052     PMT2_9Graph->SetTitle(sst.str().c_str());
1053     PMT2_9Graph->SetFillColor(2);
1054     PMT2_9Graph->GetXaxis()->SetTitle("OnBoardTime");
1055     PMT2_9Graph->GetXaxis()->CenterTitle();
1056     PMT2_9Graph->GetYaxis()->SetTitle("PMT Counters");
1057     PMT2_9Graph->GetYaxis()->CenterTitle();
1058     PMT2_9Graph->Draw("AP");
1059     //----------
1060     sst.str("");
1061     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1062     TGraph *PMT2_10Graph = new TGraph(nevents, time, pmt2_10);
1063     RatePMT4->cd(7);
1064     sst.str("");
1065     sst << "PMT S221B";
1066     PMT2_10Graph->SetTitle(sst.str().c_str());
1067     PMT2_10Graph->SetFillColor(2);
1068     PMT2_10Graph->GetXaxis()->SetTitle("OnBoardTime");
1069     PMT2_10Graph->GetXaxis()->CenterTitle();
1070     PMT2_10Graph->GetYaxis()->SetTitle("PMT Counters");
1071     PMT2_10Graph->GetYaxis()->CenterTitle();
1072     PMT2_10Graph->Draw("AP");
1073     //----------
1074     sst.str("");
1075     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1076     TGraph *PMT2_11Graph = new TGraph(nevents, time, pmt2_11);
1077     RatePMT4->cd(8);
1078     sst.str("");
1079     sst << "PMT S222B ";
1080     PMT2_11Graph->SetTitle(sst.str().c_str());
1081     PMT2_11Graph->SetFillColor(2);
1082     PMT2_11Graph->GetXaxis()->SetTitle("OnBoardTime");
1083     PMT2_11Graph->GetXaxis()->CenterTitle();
1084     PMT2_11Graph->GetYaxis()->SetTitle("PMT Counters");
1085     PMT2_11Graph->GetYaxis()->CenterTitle();
1086     PMT2_11Graph->Draw("AP");
1087    
1088     /////////////////////////
1089    
1090    
1091     TCanvas *RatePMT5 = new TCanvas("RatePMT5", "Rate PMT S311A", 1);
1092     RatePMT5->Divide (3,4);
1093     //----------
1094     sst.str("");
1095     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1096     TGraph *PMT2_12Graph = new TGraph(nevents, time, pmt2_12);
1097     RatePMT5->cd(1);
1098     sst.str("");
1099     sst << "PMT S311A ";
1100     PMT2_12Graph->SetTitle(sst.str().c_str());
1101     PMT2_12Graph->SetFillColor(2);
1102     PMT2_12Graph->GetXaxis()->SetTitle("OnBoardTime");
1103     PMT2_12Graph->GetXaxis()->CenterTitle();
1104     PMT2_12Graph->GetYaxis()->SetTitle("PMT Counters");
1105     PMT2_12Graph->GetYaxis()->CenterTitle();
1106     PMT2_12Graph->Draw("AP");
1107     //----------
1108     sst.str("");
1109     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1110     TGraph *PMT2_13Graph = new TGraph(nevents, time, pmt2_13);
1111     RatePMT5->cd(2);
1112     sst.str("");
1113     sst << "PMT S312A";
1114     PMT2_13Graph->SetTitle(sst.str().c_str());
1115     PMT2_13Graph->SetFillColor(2);
1116     PMT2_13Graph->GetXaxis()->SetTitle("OnBoardTime");
1117     PMT2_13Graph->GetXaxis()->CenterTitle();
1118     PMT2_13Graph->GetYaxis()->SetTitle("PMT Counters");
1119     PMT2_13Graph->GetYaxis()->CenterTitle();
1120     PMT2_13Graph->Draw("AP");
1121     //----------
1122     sst.str("");
1123     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1124     TGraph *PMT2_14Graph = new TGraph(nevents, time, pmt2_14);
1125     RatePMT5->cd(3);
1126     sst.str("");
1127     sst << "PMT S313A";
1128     PMT2_14Graph->SetTitle(sst.str().c_str());
1129     PMT2_14Graph->SetFillColor(2);
1130     PMT2_14Graph->GetXaxis()->SetTitle("OnBoardTime");
1131     PMT2_14Graph->GetXaxis()->CenterTitle();
1132     PMT2_14Graph->GetYaxis()->SetTitle("PMT Counters");
1133     PMT2_14Graph->GetYaxis()->CenterTitle();
1134     PMT2_14Graph->Draw("AP");
1135     //----------
1136     sst.str("");
1137     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1138     TGraph *PMT2_15Graph = new TGraph(nevents, time, pmt2_15);
1139     RatePMT5->cd(4);
1140     sst.str("");
1141     sst << "PMT S311B";
1142     PMT2_15Graph->SetTitle(sst.str().c_str());
1143     PMT2_15Graph->SetFillColor(2);
1144     PMT2_15Graph->GetXaxis()->SetTitle("OnBoardTime");
1145     PMT2_15Graph->GetXaxis()->CenterTitle();
1146     PMT2_15Graph->GetYaxis()->SetTitle("PMT Counters");
1147     PMT2_15Graph->GetYaxis()->CenterTitle();
1148     PMT2_15Graph->Draw("AP");
1149     //----------
1150     sst.str("");
1151     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1152     TGraph *PMT2_16Graph = new TGraph(nevents, time, pmt2_16);
1153     RatePMT5->cd(5);
1154     sst.str("");
1155     sst << "PMT S312B";
1156     PMT2_16Graph->SetTitle(sst.str().c_str());
1157     PMT2_16Graph->SetFillColor(2);
1158     PMT2_16Graph->GetXaxis()->SetTitle("OnBoardTime");
1159     PMT2_16Graph->GetXaxis()->CenterTitle();
1160     PMT2_16Graph->GetYaxis()->SetTitle("PMT Counters");
1161     PMT2_16Graph->GetYaxis()->CenterTitle();
1162     PMT2_16Graph->Draw("AP");
1163     //----------
1164     sst.str("");
1165     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1166     TGraph *PMT2_17Graph = new TGraph(nevents, time, pmt2_17);
1167     RatePMT5->cd(6);
1168     sst.str("");
1169     sst << "PMT S313B";
1170     PMT2_17Graph->SetTitle(sst.str().c_str());
1171     PMT2_17Graph->SetFillColor(2);
1172     PMT2_17Graph->GetXaxis()->SetTitle("OnBoardTime");
1173     PMT2_17Graph->GetXaxis()->CenterTitle();
1174     PMT2_17Graph->GetYaxis()->SetTitle("PMT Counters");
1175     PMT2_17Graph->GetYaxis()->CenterTitle();
1176     PMT2_17Graph->Draw("AP");
1177     //----------
1178     sst.str("");
1179     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1180     TGraph *PMT2_18Graph = new TGraph(nevents, time, pmt2_18);
1181     RatePMT5->cd(7);
1182     sst.str("");
1183     sst << "PMT S321A";
1184     PMT2_18Graph->SetTitle(sst.str().c_str());
1185     PMT2_18Graph->SetFillColor(2);
1186     PMT2_18Graph->GetXaxis()->SetTitle("OnBoardTime");
1187     PMT2_18Graph->GetXaxis()->CenterTitle();
1188     PMT2_18Graph->GetYaxis()->SetTitle("PMT Counters");
1189     PMT2_18Graph->GetYaxis()->CenterTitle();
1190     PMT2_18Graph->Draw("AP");
1191     //----------
1192     sst.str("");
1193     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1194     TGraph *PMT2_19Graph = new TGraph(nevents, time, pmt2_19);
1195     RatePMT5->cd(8);
1196     sst.str("");
1197     sst << "PMT S322A";
1198     PMT2_19Graph->SetTitle(sst.str().c_str());
1199     PMT2_19Graph->SetFillColor(2);
1200     PMT2_19Graph->GetXaxis()->SetTitle("OnBoardTime");
1201     PMT2_19Graph->GetXaxis()->CenterTitle();
1202     PMT2_19Graph->GetYaxis()->SetTitle("PMT Counters");
1203     PMT2_19Graph->GetYaxis()->CenterTitle();
1204     PMT2_19Graph->Draw("AP");
1205    
1206     /////////////////////////
1207    
1208     //----------
1209     sst.str("");
1210     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1211     TGraph *PMT2_20Graph = new TGraph(nevents, time, pmt2_20);
1212     RatePMT5->cd(9);
1213     sst.str("");
1214     sst << "PMT S323A";
1215     PMT2_20Graph->SetTitle(sst.str().c_str());
1216     PMT2_20Graph->SetFillColor(2);
1217     PMT2_20Graph->GetXaxis()->SetTitle("OnBoardTime");
1218     PMT2_20Graph->GetXaxis()->CenterTitle();
1219     PMT2_20Graph->GetYaxis()->SetTitle("PMT Counters");
1220     PMT2_20Graph->GetYaxis()->CenterTitle();
1221     PMT2_20Graph->Draw("AP");
1222    
1223     //----------
1224     sst.str("");
1225     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1226     TGraph *PMT2_21Graph = new TGraph(nevents, time, pmt2_21);
1227     RatePMT5->cd(10);
1228     sst.str("");
1229     sst << "PMT S321B";
1230     PMT2_21Graph->SetTitle(sst.str().c_str());
1231     PMT2_21Graph->SetFillColor(2);
1232     PMT2_21Graph->GetXaxis()->SetTitle("OnBoardTime");
1233     PMT2_21Graph->GetXaxis()->CenterTitle();
1234     PMT2_21Graph->GetYaxis()->SetTitle("PMT Counters");
1235     PMT2_21Graph->GetYaxis()->CenterTitle();
1236     PMT2_21Graph->Draw("AP");
1237    
1238     //----------
1239     sst.str("");
1240     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1241     TGraph *PMT2_22Graph = new TGraph(nevents, time, pmt2_22);
1242     RatePMT5->cd(11);
1243     sst.str("");
1244     sst << "PMT S322B";
1245     PMT2_22Graph->SetTitle(sst.str().c_str());
1246     PMT2_22Graph->SetFillColor(2);
1247     PMT2_22Graph->GetXaxis()->SetTitle("OnBoardTime");
1248     PMT2_22Graph->GetXaxis()->CenterTitle();
1249     PMT2_22Graph->GetYaxis()->SetTitle("PMT Counters");
1250     PMT2_22Graph->GetYaxis()->CenterTitle();
1251     PMT2_22Graph->Draw("AP");
1252    
1253     //----------
1254     sst.str("");
1255     sst << "pmtcount1[0] vs OBT based on " << base.Data();
1256     TGraph *PMT2_23Graph = new TGraph(nevents, time, pmt2_23);
1257     RatePMT5->cd(12);
1258     sst.str("");
1259     sst << "PMT S323B";
1260     PMT2_23Graph->SetTitle(sst.str().c_str());
1261     PMT2_23Graph->SetFillColor(2);
1262     PMT2_23Graph->GetXaxis()->SetTitle("OnBoardTime");
1263     PMT2_23Graph->GetXaxis()->CenterTitle();
1264     PMT2_23Graph->GetYaxis()->SetTitle("PMT Counters");
1265     PMT2_23Graph->GetYaxis()->CenterTitle();
1266     PMT2_23Graph->Draw("AP");
1267    
1268 campana 1.1
1269     // print the output
1270     const char *saveas = format;
1271     if ( !strcmp(saveas,"ps") ) {
1272     // ------print the ps
1273    
1274     gStyle->SetOptStat(111111);
1275    
1276     sst.str("");
1277     sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic." << saveas << "(";
1278     EvCounterCanvas->Print(sst.str().c_str());
1279     DeadLiveCanvas->Print(sst.str().c_str());
1280 pam-rm2 1.4 MeanLiveDeadCanvas->Print(sst.str().c_str());
1281 campana 1.1 PMTCanvas->Print(sst.str().c_str());
1282     TrigRate1Canvas->Print(sst.str().c_str());
1283     TrigRate2Canvas->Print(sst.str().c_str());
1284    
1285     gStyle->SetOptStat("mr");
1286     S4CalCanvas->Print(sst.str().c_str());
1287    
1288     gStyle->SetOptStat("mr");
1289     RatePMT1->Print(sst.str().c_str());
1290     RatePMT2->Print(sst.str().c_str());
1291     RatePMT3->Print(sst.str().c_str());
1292     RatePMT4->Print(sst.str().c_str());
1293     //
1294     sst.str("");
1295     sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic." << saveas << ")";
1296     RatePMT5->Print(sst.str().c_str());
1297    
1298     } else {
1299    
1300     gStyle->SetOptStat(111111);
1301    
1302     sst.str("");
1303     sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic1." << saveas;
1304     EvCounterCanvas->SaveAs(sst.str().c_str());
1305    
1306     sst.str("");
1307     sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic2." << saveas;
1308     DeadLiveCanvas->SaveAs(sst.str().c_str());
1309    
1310     sst.str("");
1311     sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic3." << saveas;
1312 pam-rm2 1.4 MeanLiveDeadCanvas->SaveAs(sst.str().c_str());
1313     sst.str("");
1314     sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic4." << saveas;
1315 campana 1.1 PMTCanvas->SaveAs(sst.str().c_str());
1316    
1317     sst.str("");
1318 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic5." << saveas;
1319 campana 1.1 TrigRate1Canvas->SaveAs(sst.str().c_str());
1320    
1321     sst.str("");
1322 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic6." << saveas;
1323 campana 1.1 TrigRate2Canvas->SaveAs(sst.str().c_str());
1324    
1325     sst.str("");
1326 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic7." << saveas;
1327 campana 1.1 S4CalCanvas->SaveAs(sst.str().c_str());
1328    
1329     gStyle->SetOptStat("mr");
1330    
1331     sst.str("");
1332 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic8." << saveas;
1333 campana 1.1 RatePMT1->SaveAs(sst.str().c_str());
1334    
1335     sst.str("");
1336 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic9." << saveas;
1337 campana 1.1 RatePMT2->SaveAs(sst.str().c_str());
1338    
1339     sst.str("");
1340 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic10." << saveas;
1341 campana 1.1 RatePMT3->SaveAs(sst.str().c_str());
1342    
1343     sst.str("");
1344 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic11." << saveas;
1345 campana 1.1 RatePMT4->SaveAs(sst.str().c_str());
1346    
1347     gStyle->SetOptStat("mr");
1348    
1349     sst.str("");
1350 pam-rm2 1.4 sst << outDirectory.Data() << filename.Data() << "TriggerScanBasic12." << saveas;
1351 campana 1.1 RatePMT5->SaveAs(sst.str().c_str());
1352    
1353     }
1354    
1355     }
1356    
1357    
1358     int main(int argc, char* argv[]){
1359     TString path;
1360     TString outDir ="./";
1361     TString format ="ps";
1362    
1363     if (argc < 2){
1364     printf("You have to insert at least the file to analyze \n");
1365     printf("Try '--help' for more information. \n");
1366     exit(1);
1367     }
1368    
1369     if (!strcmp(argv[1], "--help")){
1370     printf( "Usage: TriggerScanBasic FILE [OPTION] \n");
1371     printf( "\t --help Print this help and exit \n");
1372     printf( "\t -outDir[path] Path where to put the output [default ./] \n");
1373     printf( "\t -format[ps] Format for output files [default 'ps'] \n");
1374     exit(1);
1375     }
1376    
1377    
1378     path=argv[1];
1379    
1380     for (int i = 2; i < argc; i++){
1381    
1382     if (!strcmp(argv[i], "-outDir")){
1383     if (++i >= argc){
1384     printf( "-outDir needs arguments. \n");
1385     printf( "Try '--help' for more information. \n");
1386     exit(1);
1387     }
1388     else{
1389     outDir = argv[i];
1390     continue;
1391     }
1392     }
1393    
1394    
1395    
1396     if (!strcmp(argv[i], "-format")){
1397     if (++i >= argc){
1398     printf( "-format needs arguments. \n");
1399     printf( "Try '--help' for more information. \n");
1400     exit(1);
1401     }
1402     else{
1403     format = argv[i];
1404     continue;
1405     }
1406     }
1407     }
1408    
1409     TriggerScanBasic(argv[1], outDir, format);
1410    
1411     }

  ViewVC Help
Powered by ViewVC 1.1.23