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