11 |
#include <TSystem.h> |
#include <TSystem.h> |
12 |
#include <iostream> |
#include <iostream> |
13 |
#include <sys/types.h> |
#include <sys/types.h> |
14 |
|
#include <cstdlib> |
15 |
#include <unistd.h> |
#include <unistd.h> |
16 |
#include <stdio.h> |
#include <stdio.h> |
17 |
// |
// |
18 |
extern void FCaloCHKCALIB(TString, Long64_t, TString, int, TString); |
extern void FCaloCHKCALIB(TString, Long64_t, TString, int, TString, Bool_t, Bool_t); |
19 |
extern void info(); |
extern void info(); |
20 |
using namespace std; |
using namespace std; |
21 |
// |
// |
26 |
printf("\n OPTIONS: \n"); |
printf("\n OPTIONS: \n"); |
27 |
printf("\n -v be verbose \n"); |
printf("\n -v be verbose \n"); |
28 |
printf( " -entry entry calibration entry to analyze [default = 0, all] \n"); |
printf( " -entry entry calibration entry to analyze [default = 0, all] \n"); |
29 |
|
printf( " -interactive shows figures on the screen [default = non-interactive] \n"); |
30 |
|
printf( " -wait wait for canvas to be closed before going on [default = don't wait] \n"); |
31 |
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"); |
32 |
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"); |
33 |
printf( " -format format format for output file (without . )[default = ps] \n"); |
printf( " -format format format for output file (without . )[default = png] \n"); |
34 |
printf("\nExamples: "); |
printf("\nExamples: "); |
35 |
printf("\n\nFCaloCHKCALIB /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
printf("\n\nFCaloCHKCALIB /home/pamela/filesfromyoda/dw_050301_00100.root \n"); |
36 |
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 |
// |
// |
40 |
int main(int numinp, char *inps[]){ |
int main(int numinp, char *inps[]){ |
41 |
TString name; |
TString name; |
42 |
TString outdir = ""; |
TString outdir = "./"; |
43 |
TString format = "ps"; |
TString format = "png"; |
44 |
int matra = 0; |
int matra = 0; |
45 |
Long64_t calibno = 0; |
Long64_t calibno = 0; |
46 |
char *pEnd; |
char *pEnd; |
47 |
int nul = 0; |
int nul = 0; |
48 |
bool beverbose = false; |
bool beverbose = false; |
49 |
|
Bool_t iactive = false; |
50 |
|
Bool_t w4i = false; |
51 |
|
|
52 |
if ( numinp > 1 ){ |
if ( numinp > 1 ){ |
53 |
name = (TString)inps[1]; |
name = (TString)inps[1]; |
93 |
if ( !strcmp(inps[i],"-matra") ) { |
if ( !strcmp(inps[i],"-matra") ) { |
94 |
matra = 1; |
matra = 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 FCaloCHKCALIB! \n"); |
printf("\n Welcome to FCaloCHKCALIB! \n"); |
121 |
// |
// |
122 |
FCaloCHKCALIB(name,calibno,outdir,matra,format); |
FCaloCHKCALIB(name,calibno,outdir,matra,format,iactive,w4i); |
123 |
// |
// |
124 |
if ( !beverbose ) close(nul); |
if ( !beverbose ) close(nul); |
125 |
return(0); |
return(0); |