| 1 |
#include "TrkCalibQLook_EXPERT.cpp" |
| 2 |
#include <TString.h> |
| 3 |
|
| 4 |
/** |
| 5 |
* TrkCalibQLookExpert.cpp |
| 6 |
* |
| 7 |
* autor: D.Fedele |
| 8 |
* version 1.0 |
| 9 |
* Parameters: |
| 10 |
* base - the path to the root directory for the specific |
| 11 |
* Pamela unpack session |
| 12 |
* step - select =1 in order to analyse one event at time |
| 13 |
* fromevent - first event to analyse |
| 14 |
* toevent - last event to analyse |
| 15 |
* outdir - total path of output file |
| 16 |
* outfile - extension of output file (pdf,ps,gif,jpg) |
| 17 |
* |
| 18 |
*/ |
| 19 |
|
| 20 |
int main(int argc,char* argv[]){ |
| 21 |
|
| 22 |
TString FILE,OUTDIR="",OUTFILE="gif"; |
| 23 |
Int_t FROMEVENT=0,TOEVENT=0,STEP=0; |
| 24 |
|
| 25 |
if(argc>1){ |
| 26 |
if (!strcmp(argv[1], "-h")||!strcmp(argv[1], "--help")){ |
| 27 |
printf("Usage: TrkCalibQlookExpert FILE STEP FROMEVENT TOEVENT OUTDIR OUTFILE \n"); |
| 28 |
printf("\t FILE: path of the root file to analize (give at least this parameter) \n"); |
| 29 |
printf("\t STEP: select =1 in order to analyze one event at time [default = 0] \n"); |
| 30 |
printf("\t FROMEVENT: first event to analize [default = 0] \n"); |
| 31 |
printf("\t TOEVENT: last event to analize [default = 0] \n"); |
| 32 |
printf("\t OUTDIR: output directory [default = same directory of the root file] \n"); |
| 33 |
printf("\t OUTFILE: type of output file (without . )[default = gif] \n"); |
| 34 |
return(0); |
| 35 |
} |
| 36 |
|
| 37 |
if(argc>=2){ |
| 38 |
for(int i=1; i<argc;i++){ |
| 39 |
if(i==1) FILE = argv[i]; |
| 40 |
else if(i==2) STEP = atoi(argv[i]); |
| 41 |
else if(i==3) FROMEVENT = atoi(argv[i]); |
| 42 |
else if(i==4) TOEVENT = atoi(argv[i]); |
| 43 |
else if(i==5) OUTDIR = argv[i]; |
| 44 |
else if(i==6) OUTFILE = argv[i]; |
| 45 |
} |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
else if(argc==1){ |
| 50 |
printf("Usage: TrkCalibQlookExpert FILE STEP FROMEVENT TOEVENT OUTDIR OUTFILE \n"); |
| 51 |
printf("\t FILE: path of the root file to analize (give at least this parameter) \n"); |
| 52 |
printf("\t STEP: select =1 in order to analyze one event at time [default = 0] \n"); |
| 53 |
printf("\t FROMEVENT: first event to analize [default = 0] \n"); |
| 54 |
printf("\t TOEVENT: last event to analize [default = 0] \n"); |
| 55 |
printf("\t OUTDIR: output directory [default = same directory of the root file] \n"); |
| 56 |
printf("\t OUTFILE: type of output file (without . )[default = gif] \n"); |
| 57 |
return(0); |
| 58 |
} |
| 59 |
|
| 60 |
TrkCalibQLook_EXPERT(FILE,STEP,FROMEVENT,TOEVENT,OUTDIR,OUTFILE); |
| 61 |
} |