1 |
pam-fi |
1.1 |
#include "fillpedsig.cpp" |
2 |
|
|
#include <TString.h> |
3 |
|
|
|
4 |
|
|
/** |
5 |
|
|
* fillpedsig-main --> is the main program that call the filpedsig function |
6 |
|
|
* |
7 |
|
|
* autor: D.Fedele |
8 |
|
|
* version 1.0 |
9 |
|
|
* Parameters: |
10 |
|
|
* file - the path to the root file to analyse |
11 |
|
|
* outdir - total path of output file |
12 |
|
|
* |
13 |
|
|
*/ |
14 |
|
|
|
15 |
|
|
int main(int argc, char* argv[]){ |
16 |
|
|
|
17 |
|
|
TString FILE,OUTDIR=""; |
18 |
|
|
|
19 |
pam-fi |
1.2 |
if(argc>1){ |
20 |
|
|
if (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")){ |
21 |
|
|
printf("Usage: fillpedsig FILE OUTDIR \n"); |
22 |
|
|
printf("\t FILE: path of the root file to analize (give at least this parameter) \n"); |
23 |
|
|
printf("\t OUTDIR: output directory [default = same directory of the root file] \n"); |
24 |
|
|
exit(1); |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
if(argc>=2){ |
28 |
|
|
for(int i=1; i<argc;i++){ |
29 |
|
|
if(i==1) FILE = argv[i]; |
30 |
|
|
else if(i==2) OUTDIR = argv[i]; |
31 |
|
|
} |
32 |
|
|
} |
33 |
|
|
} |
34 |
|
|
else if(argc==1){ |
35 |
pam-fi |
1.1 |
printf("Usage: fillpedsig FILE OUTDIR \n"); |
36 |
|
|
printf("\t FILE: path of the root file to analize (give at least this parameter) \n"); |
37 |
|
|
printf("\t OUTDIR: output directory [default = same directory of the root file] \n"); |
38 |
|
|
exit(1); |
39 |
|
|
} |
40 |
|
|
|
41 |
|
|
fillpedsig(FILE,OUTDIR); |
42 |
|
|
} |