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