14 |
#include <unistd.h> |
#include <unistd.h> |
15 |
#include <stdio.h> |
#include <stdio.h> |
16 |
// |
// |
17 |
extern void FCaloCHKCALIB(TString, Long64_t, TString, int, TString); |
extern void FCaloCHKCALIB(TString, Long64_t, TString, int, TString, Bool_t, Bool_t); |
18 |
extern void info(); |
extern void info(); |
19 |
using namespace std; |
using namespace std; |
20 |
// |
// |
25 |
printf("\n OPTIONS: \n"); |
printf("\n OPTIONS: \n"); |
26 |
printf("\n -v be verbose \n"); |
printf("\n -v be verbose \n"); |
27 |
printf( " -entry entry calibration entry to analyze [default = 0, all] \n"); |
printf( " -entry entry calibration entry to analyze [default = 0, all] \n"); |
28 |
|
printf( " -interactive shows figures on the screen [default = non-interactive] \n"); |
29 |
|
printf( " -wait wait for canvas to be closed before going on [default = don't wait] \n"); |
30 |
printf( " -matra draw the strip rms in a box plot [default: do not draw] \n"); |
printf( " -matra draw the strip rms in a box plot [default: do not draw] \n"); |
31 |
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"); |
32 |
printf( " -format format format for output file (without . )[default = ps] \n"); |
printf( " -format format format for output file (without . )[default = png] \n"); |
33 |
printf("\nExamples: "); |
printf("\nExamples: "); |
34 |
printf("\n\nFCaloCHKCALIB /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
printf("\n\nFCaloCHKCALIB /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
35 |
printf("\nFCaloCHKCALIB -v -name /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
printf("\nFCaloCHKCALIB -v -name /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
39 |
int main(int numinp, char *inps[]){ |
int main(int numinp, char *inps[]){ |
40 |
TString name; |
TString name; |
41 |
TString outdir = ""; |
TString outdir = ""; |
42 |
TString format = "ps"; |
TString format = "png"; |
43 |
int matra = 0; |
int matra = 0; |
44 |
Long64_t calibno = 0; |
Long64_t calibno = 0; |
45 |
char *pEnd; |
char *pEnd; |
46 |
int nul = 0; |
int nul = 0; |
47 |
bool beverbose = false; |
bool beverbose = false; |
48 |
|
Bool_t iactive = false; |
49 |
|
Bool_t w4i = false; |
50 |
|
|
51 |
if ( numinp > 1 ){ |
if ( numinp > 1 ){ |
52 |
name = (TString)inps[1]; |
name = (TString)inps[1]; |
92 |
if ( !strcmp(inps[i],"-matra") ) { |
if ( !strcmp(inps[i],"-matra") ) { |
93 |
matra = 1; |
matra = 1; |
94 |
}; |
}; |
95 |
|
if ( !strcmp(inps[i],"-interactive") ) { |
96 |
|
iactive = true; |
97 |
|
}; |
98 |
|
if ( !strcmp(inps[i],"-wait") ) { |
99 |
|
w4i = true; |
100 |
|
}; |
101 |
if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true; |
if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true; |
102 |
}; |
}; |
103 |
} else { |
} else { |
118 |
}; |
}; |
119 |
printf("\n Welcome to FCaloCHKCALIB! \n"); |
printf("\n Welcome to FCaloCHKCALIB! \n"); |
120 |
// |
// |
121 |
FCaloCHKCALIB(name,calibno,outdir,matra,format); |
FCaloCHKCALIB(name,calibno,outdir,matra,format,iactive,w4i); |
122 |
// |
// |
123 |
if ( !beverbose ) close(nul); |
if ( !beverbose ) close(nul); |
124 |
return(0); |
return(0); |