1 |
// |
2 |
// CaloCHKCALIB.cc -- standalone program to call the CaloCHKCALIB macro. |
3 |
// by Emiliano Mocchiutti |
4 |
// |
5 |
// Version 1.00 (2005/08/16) |
6 |
// |
7 |
// Changelog: |
8 |
// |
9 |
// 0.00 - 1.00 : working. |
10 |
// |
11 |
#include <TString.h> |
12 |
#include <iostream> |
13 |
// |
14 |
extern void CaloCHKCALIB(TString, Long64_t, TString, int, TString); |
15 |
extern void info(); |
16 |
using namespace std; |
17 |
// |
18 |
int main(int numinp, char *inps[]){ |
19 |
TString name; |
20 |
TString outdir; |
21 |
TString format; |
22 |
int matra; |
23 |
Long64_t calibno; |
24 |
if ( numinp != 6 ){ |
25 |
if ( numinp > 1 ){ |
26 |
if ( !strcmp(inps[1],"--version") ){ |
27 |
info(); |
28 |
return(0); |
29 |
}; |
30 |
}; |
31 |
printf("\nUsage:\n\n CaloCHKCALIB file calib_number output_directory matra figure_format \n"); |
32 |
printf("\n - file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n"); |
33 |
printf( " - calib_number is an integer (progressive calibration number), 0 = all \n"); |
34 |
printf( " - output_dir directory where to store figures \n"); |
35 |
printf( " - matra integer, 1 to print the strip rms in a box plot 0 to skip it\n"); |
36 |
printf( " - figure format any format recognized by ROOT (eps,gif,...)\n"); |
37 |
printf("\nExample: \n\nCaloCHKCALIB /home/pamela/filesfromyoda/dw_050301_00100/ 0 /tmp/ 0 eps \n\n"); |
38 |
return(0); |
39 |
// |
40 |
} else { |
41 |
printf("\n Welcome to CaloCHKCALIB! \n"); |
42 |
name = (TString)inps[1]; |
43 |
char *pEnd; |
44 |
calibno = strtoull(inps[2],&pEnd,0); |
45 |
// calibno = atoi(inps[2]); |
46 |
outdir = (TString)inps[3]; |
47 |
matra = atoi(inps[4]); |
48 |
format = (TString)inps[5]; |
49 |
}; |
50 |
// |
51 |
CaloCHKCALIB(name,calibno,outdir,matra,format); |
52 |
// |
53 |
return(0); |
54 |
} |