1 |
mocchiut |
1.1 |
// |
2 |
|
|
// CaloLEVEL1.cc -- standalone program to call the CaloLEVEL1 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 <caloclasses.h> |
13 |
|
|
#include <iostream> |
14 |
|
|
// |
15 |
|
|
extern short int CaloLEVEL1(TString , TString , int ); |
16 |
|
|
extern void info(); |
17 |
|
|
using namespace std; |
18 |
|
|
// |
19 |
|
|
int main(int numinp, char *inps[]){ |
20 |
|
|
TString name; |
21 |
|
|
TString calibname; |
22 |
|
|
int force; |
23 |
|
|
if ( numinp != 4 ){ |
24 |
|
|
if ( numinp > 1 ){ |
25 |
|
|
if ( !strcmp(inps[1],"--version") ){ |
26 |
|
|
info(); |
27 |
|
|
return(0); |
28 |
|
|
}; |
29 |
|
|
}; |
30 |
|
|
printf("\nUsage:\n\n CaloLEVEL1 file calib_file force \n"); |
31 |
|
|
printf("\n - file must be in the form: /path/to/filesfromyoda/dw_000000_00000/ \n"); |
32 |
|
|
printf( " - calib_file calibration file (if any) in the same form \n"); |
33 |
|
|
printf( " - force force flag (0 not force/1 force) \n"); |
34 |
|
|
printf("\nExample: \n\nCaloLEVEL1 /home/pamela/filesfromyoda/dw_050301_00100/ \"\" 0 \n\n"); |
35 |
|
|
return(0); |
36 |
|
|
// |
37 |
|
|
} else { |
38 |
|
|
printf("\n Welcome to CaloLEVEL1! \n"); |
39 |
|
|
name = (TString)inps[1]; |
40 |
|
|
calibname = (TString)inps[2]; |
41 |
|
|
force = atoi(inps[3]); |
42 |
|
|
}; |
43 |
|
|
// |
44 |
|
|
int ERR = CaloLEVEL1(name,calibname,force); |
45 |
|
|
// |
46 |
|
|
return(ERR); |
47 |
|
|
} |