14 |
#include <unistd.h> |
#include <unistd.h> |
15 |
#include <stdio.h> |
#include <stdio.h> |
16 |
// |
// |
17 |
extern void FCaloQLOOK(TString, int, int, TString, TString); |
extern void FCaloQLOOK(TString, int, int, TString, TString, Bool_t, Bool_t); |
18 |
extern void info(); |
extern void info(); |
19 |
using namespace std; |
using namespace std; |
20 |
// |
// |
27 |
printf( " -fromev from_event first event to analyze [default = 0] \n"); |
printf( " -fromev from_event first event to analyze [default = 0] \n"); |
28 |
printf( " -toev to_event last event to analyze [default = 0] \n"); |
printf( " -toev to_event last event to analyze [default = 0] \n"); |
29 |
printf( " -oudDir output_dir path of the output directory [default = ./] (with or without final '/') \n"); |
printf( " -oudDir output_dir path of the output directory [default = ./] (with or without final '/') \n"); |
30 |
printf( " -format format format for output file (without . )[default = ps] \n"); |
printf( " -format format format for output file (without . )[default = png] \n"); |
31 |
printf("\nExamples: "); |
printf("\nExamples: "); |
32 |
printf("\n\nFCaloQLOOK /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
printf("\n\nFCaloQLOOK /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
33 |
printf("\nFCaloQLOOK -v -name /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
printf("\nFCaloQLOOK -v -name /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
37 |
int main(int numinp, char *inps[]){ |
int main(int numinp, char *inps[]){ |
38 |
TString name; |
TString name; |
39 |
TString outdir = ""; |
TString outdir = ""; |
40 |
TString format = "ps"; |
TString format = "png"; |
41 |
int fromev = 0; |
int fromev = 0; |
42 |
int toev = 0; |
int toev = 0; |
43 |
int nul = 0; |
int nul = 0; |
44 |
bool beverbose = false; |
bool beverbose = false; |
45 |
|
Bool_t iactive = false; |
46 |
|
Bool_t w4i = false; |
47 |
// |
// |
48 |
if ( numinp > 1 ){ |
if ( numinp > 1 ){ |
49 |
name = (TString)inps[1]; |
name = (TString)inps[1]; |
93 |
}; |
}; |
94 |
toev = atoi(inps[i+1]); |
toev = atoi(inps[i+1]); |
95 |
}; |
}; |
96 |
|
if ( !strcmp(inps[i],"-interactive") ) { |
97 |
|
iactive = true; |
98 |
|
}; |
99 |
|
if ( !strcmp(inps[i],"-wait") ) { |
100 |
|
w4i = true; |
101 |
|
}; |
102 |
if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true; |
if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true; |
103 |
}; |
}; |
104 |
} else { |
} else { |
119 |
}; |
}; |
120 |
printf("\n Welcome to FCaloQLOOK! \n"); |
printf("\n Welcome to FCaloQLOOK! \n"); |
121 |
// |
// |
122 |
FCaloQLOOK(name,fromev,toev,outdir,format); |
FCaloQLOOK(name,fromev,toev,outdir,format,iactive,w4i); |
123 |
// |
// |
124 |
if ( !beverbose ) close(nul); |
if ( !beverbose ) close(nul); |
125 |
// |
// |