2 |
* FTrkCalibQLook_EXPERT.cc |
* FTrkCalibQLook_EXPERT.cc |
3 |
* |
* |
4 |
* autor: D.Fedele |
* autor: D.Fedele |
5 |
* version 3.0 |
* version v1r04 |
6 |
* Parameters: |
* Parameters: |
7 |
* file - path of the root file to analyze (give at least this parameter) |
* file - path of the root file to analyze (give at least this parameter) |
8 |
* step - select =1 in order to analyze one event at time |
* step - select =1 in order to analyze one event at time |
9 |
* fromevent - first event to analyze |
* fromevent - first event to analyze |
10 |
* toevent - last event to analyze |
* toevent - last event to analyze |
11 |
* outdir - total path of output file |
* outDir - total path of output file |
12 |
* format - extension of output file (pdf,ps,gif,jpg) |
* format - extension of output file (pdf,ps,gif,jpg) |
13 |
* |
* |
14 |
*/ |
*/ |
28 |
printf("\t -step: select =1 in order to analyze one event at time [default = 0] \n"); |
printf("\t -step: select =1 in order to analyze one event at time [default = 0] \n"); |
29 |
printf("\t -fromev: first event to analyze [default = 0] \n"); |
printf("\t -fromev: first event to analyze [default = 0] \n"); |
30 |
printf("\t -toev: last event to analyze [default = 0] \n"); |
printf("\t -toev: last event to analyze [default = 0] \n"); |
31 |
printf("\t -outdir: output directory [default = ./] \n"); |
printf("\t -outDir: path of the output directory [default = ./] (with or without final '/')\n"); |
32 |
printf("\t -format: format for output file (without . )[default = pdf] \n"); |
printf("\t -format: format for output file (without . )[default = pdf] (accepted formats: pdf, ps, png, jpg, gif)\n"); |
33 |
printf("\nExamples:\n\tFTrkCalibQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v \n\n"); |
printf("\nExamples:\n\tFTrkCalibQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v \n\n"); |
34 |
printf("\tFTrkCalibQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg\n\n"); |
printf("\tFTrkCalibQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg\n\n"); |
35 |
printf("\tFTrkCalibQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg -outdir ~/tmp/ \n\n"); |
printf("\tFTrkCalibQLook_EXPERT /home/pamela/filesfromyoda/DW_050523_01600.root -v -format jpg -outDir ~/tmp/ \n\n"); |
36 |
} |
} |
37 |
|
|
38 |
|
|
65 |
if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") ) |
if ( !strcmp(argv[i],"-v") || !strcmp(argv[i],"--verbose") ) |
66 |
beverbose = true; |
beverbose = true; |
67 |
|
|
68 |
if (!strcmp(argv[i], "-outdir")){ |
if (!strcmp(argv[i], "-outDir")){ |
69 |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-step")){ |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-step")){ |
70 |
printf( "\n-outdir needs arguments. \n"); |
printf( "\n-outDir needs arguments. \n"); |
71 |
usage(); |
usage(); |
72 |
return(0); |
return(0); |
73 |
} |
} |
78 |
} |
} |
79 |
|
|
80 |
if (!strcmp(argv[i], "-step")){ |
if (!strcmp(argv[i], "-step")){ |
81 |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-outdir")){ |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-outDir")){ |
82 |
printf( "\n-step needs arguments. \n"); |
printf( "\n-step needs arguments. \n"); |
83 |
usage(); |
usage(); |
84 |
return(0); |
return(0); |
90 |
} |
} |
91 |
|
|
92 |
if (!strcmp(argv[i], "-fromev")){ |
if (!strcmp(argv[i], "-fromev")){ |
93 |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-outdir") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-step")){ |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-outDir") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-step")){ |
94 |
printf( "\n-fromev needs arguments. \n"); |
printf( "\n-fromev needs arguments. \n"); |
95 |
usage(); |
usage(); |
96 |
return(0); |
return(0); |
102 |
} |
} |
103 |
|
|
104 |
if (!strcmp(argv[i], "-toev")){ |
if (!strcmp(argv[i], "-toev")){ |
105 |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-outdir") || !strcmp(argv[i], "-step")){ |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-format") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-outDir") || !strcmp(argv[i], "-step")){ |
106 |
printf( "\n-toev needs arguments. \n"); |
printf( "\n-toev needs arguments. \n"); |
107 |
usage(); |
usage(); |
108 |
return(0); |
return(0); |
114 |
} |
} |
115 |
|
|
116 |
if (!strcmp(argv[i], "-format")){ |
if (!strcmp(argv[i], "-format")){ |
117 |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-outdir") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-step")){ |
if (++i >= argc || !strcmp(argv[i],"-v") || !strcmp(argv[i], "-outDir") || !strcmp(argv[i], "-fromev") || !strcmp(argv[i], "-toev") || !strcmp(argv[i], "-step")){ |
118 |
printf( "\n-format needs arguments. \n"); |
printf( "\n-format needs arguments. \n"); |
119 |
usage(); |
usage(); |
120 |
return(0); |
return(0); |
124 |
continue; |
continue; |
125 |
} |
} |
126 |
} |
} |
127 |
|
|
128 |
|
if(strcmp(argv[i], "-format") && strcmp(argv[i], "-outDir") && strcmp(argv[i],"-v") && strcmp(argv[i],"--verbose") && strcmp(argv[i], "-fromev") && strcmp(argv[i], "-toev") && strcmp(argv[i], "-step")){ |
129 |
|
printf( "\n------>Warning: WRONG OPTIONS!\n"); |
130 |
|
usage(); |
131 |
|
return(0); |
132 |
|
} |
133 |
} |
} |
134 |
} |
} |
135 |
} |
} |