1 |
// |
2 |
// FCaloFINDCALIBS.cc -- standalone program to call the FCaloFINDCALIBS macro. |
3 |
// by Emiliano Mocchiutti |
4 |
// |
5 |
// Version 1.00 (2005/11/07) |
6 |
// |
7 |
// Changelog: |
8 |
// |
9 |
// 0.00 - 1.00 : working. |
10 |
// |
11 |
#include <TString.h> |
12 |
#include <iostream> |
13 |
#include <FCaloFINDCALIBSfun.h> |
14 |
extern void info(); |
15 |
using namespace std; |
16 |
// |
17 |
int main(int numinp, char *inps[]){ |
18 |
TString program; |
19 |
TString name; |
20 |
if ( numinp != 3 ){ |
21 |
if ( numinp > 1 ){ |
22 |
if ( !strcmp(inps[1],"--version") ){ |
23 |
info(); |
24 |
return(0); |
25 |
}; |
26 |
}; |
27 |
printf("\nUsage:\n\n FCaloFINDCALIBS type file \n"); |
28 |
printf("\n - type can be HERE or BEST \n"); |
29 |
printf( " - file must be in the form: /path/to/filesfromyoda/dw_000000_00000.root \n"); |
30 |
printf("\nExample: \n\nFCaloFINDCALIBS HERE /home/pamela/filesfromyoda/dw_050301_00100.root \n\n"); |
31 |
return(0); |
32 |
// |
33 |
} else { |
34 |
printf("\n Welcome to FCaloFINDCALIBS! \n"); |
35 |
program = (TString)inps[1]; |
36 |
name = (TString)inps[2]; |
37 |
}; |
38 |
// |
39 |
if ( !strcmp(program.Data(),"HERE") ){ |
40 |
printf("\n Calling FCaloOLDFINDCALIBS\n"); |
41 |
FCaloOLDFINDCALIBS(name); |
42 |
}; |
43 |
if ( !strcmp(program.Data(),"BEST") ){ |
44 |
printf("\n Calling FCaloFINDCALIBS\n"); |
45 |
FCaloFINDCALIBS(name); |
46 |
}; |
47 |
// |
48 |
return(0); |
49 |
} |