36 |
|
|
37 |
ostatus = 0; |
ostatus = 0; |
38 |
|
|
39 |
npar=0; |
npar = 0; |
40 |
|
|
41 |
|
nskip = 0; |
42 |
|
|
43 |
TrkParams::SetTrackingMode(); |
// TrkParams::SetTrackingMode(); |
44 |
TrkParams::SetPrecisionFactor(); |
// TrkParams::SetPrecisionFactor(); |
45 |
TrkParams::SetStepMin(); |
// TrkParams::SetStepMin(); |
46 |
|
TrkParams::SetMiniDefault(); |
47 |
TrkParams::SetPFA(); |
TrkParams::SetPFA(); |
48 |
}; |
}; |
49 |
|
|
92 |
|
|
93 |
npar=0; |
npar=0; |
94 |
|
|
95 |
TrkParams::SetTrackingMode(); |
nskip = 0; |
96 |
TrkParams::SetPrecisionFactor(); |
|
97 |
TrkParams::SetStepMin(); |
// TrkParams::SetTrackingMode(); |
98 |
|
// TrkParams::SetPrecisionFactor(); |
99 |
|
// TrkParams::SetStepMin(); |
100 |
|
TrkParams::SetMiniDefault(); |
101 |
TrkParams::SetPFA(); |
TrkParams::SetPFA(); |
102 |
|
|
103 |
}; |
}; |
104 |
/** |
/** |
105 |
* Set processing variables according to input custom parameters |
* Set processing variables according to input custom parameters |
106 |
*/ |
*/ |
107 |
void TrkProcess::HandleCustomPar(int ncustom, char *vcustom[]){ |
int TrkProcess::HandleCustomPar(int ncustom, char *vcustom[]){ |
108 |
|
|
109 |
for (int i=0; i< ncustom; i++){ |
for (int i=0; i< ncustom; i++){ |
110 |
|
|
111 |
|
cout << "Handling Parameter " << i+1 << " of " << ncustom << ": " << vcustom[i] << endl; |
112 |
|
|
113 |
|
// -----------------------------------------------------// |
114 |
|
if (!strcmp(vcustom[i], "--simu")){ |
115 |
|
cout << "Setting DarthVader to use Simulated Data\n"; |
116 |
|
TrkParams::SetSimuFlag(kTRUE); |
117 |
|
continue; |
118 |
|
} |
119 |
// -----------------------------------------------------// |
// -----------------------------------------------------// |
120 |
if (!strcmp(vcustom[i], "-processFolder")){ |
if (!strcmp(vcustom[i], "-processFolder")){ |
121 |
if (++i >= ncustom) throw -3; |
if (++i >= ncustom) throw -3; |
171 |
continue; |
continue; |
172 |
} |
} |
173 |
// -----------------------------------------------------// |
// -----------------------------------------------------// |
174 |
|
if (!strcmp(vcustom[i], "-pfa")){ |
175 |
|
if (++i >= ncustom)throw -3; |
176 |
|
TrkParams::SetPFA(atoi(vcustom[i])); |
177 |
|
continue; |
178 |
|
} |
179 |
|
// -----------------------------------------------------// |
180 |
|
if (!strcmp(vcustom[i], "-skip")){ |
181 |
|
if (++i >= ncustom)throw -3; |
182 |
|
nskip = atoi(vcustom[i]); |
183 |
|
continue; |
184 |
|
} |
185 |
|
// -----------------------------------------------------// |
186 |
if ( atoi(vcustom[i]) < 0){ |
if ( atoi(vcustom[i]) < 0){ |
187 |
if (++i >= ncustom)throw -3; |
if (++i >= ncustom)throw -3; |
188 |
partype[npar]=-1*atoi(vcustom[i-1]); |
partype[npar]=-1*atoi(vcustom[i-1]); |
196 |
continue; |
continue; |
197 |
} |
} |
198 |
// -----------------------------------------------------// |
// -----------------------------------------------------// |
199 |
|
if (!strcmp(vcustom[i], "--warning") || !strcmp(vcustom[i], "-w")){ |
200 |
|
TrkParams::SetWarningMode(); |
201 |
|
continue; |
202 |
|
} |
203 |
|
// -----------------------------------------------------// |
204 |
|
if (!strcmp(vcustom[i], "--help") || !strcmp(vcustom[i], "-h")){ |
205 |
|
PrintHelp(); |
206 |
|
return 1; |
207 |
|
} |
208 |
|
// -----------------------------------------------------// |
209 |
else if (!strcmp(vcustom[i], "--debug") || !strcmp(vcustom[i], "-d")){ |
else if (!strcmp(vcustom[i], "--debug") || !strcmp(vcustom[i], "-d")){ |
210 |
TrkParams::SetDebugMode(); |
TrkParams::SetDebugMode(); |
211 |
continue; |
continue; |
228 |
|
|
229 |
ostatus = 0; |
ostatus = 0; |
230 |
|
|
231 |
|
return 0; |
232 |
|
|
233 |
}; |
}; |
234 |
/** |
/** |
235 |
* \brief Process Level0 event |
* \brief Process Level0 event |
259 |
cout << " tracker-processing input-parameters "<< endl; |
cout << " tracker-processing input-parameters "<< endl; |
260 |
cout << " |-------------------------------------| "<<endl; |
cout << " |-------------------------------------| "<<endl; |
261 |
cout << " idRun " << idrun << endl; |
cout << " idRun " << idrun << endl; |
262 |
|
cout << " (skip " << nskip <<" events)"<< endl; |
263 |
cout << " get level1 " << get1 << endl; |
cout << " get level1 " << get1 << endl; |
264 |
cout << " full level1 " << full1 << endl; |
cout << " full level1 " << full1 << endl; |
265 |
cout << " get level2 " << get2 << endl; |
cout << " get level2 " << get2 << endl; |
281 |
// cout << " debug mode debug " << dbg_mode.debug << endl << endl; |
// cout << " debug mode debug " << dbg_mode.debug << endl << endl; |
282 |
|
|
283 |
} |
} |
284 |
|
|
285 |
|
void TrkProcess::PrintHelp(){ |
286 |
|
|
287 |
|
printf( "\n\n +TRK [ options ] \n \n"); |
288 |
|
// printf( "\n --version : Print tracker software version and exit "); |
289 |
|
printf( "Options:"); |
290 |
|
printf( "\n --help, -h : Print this help and exit "); |
291 |
|
// printf( "\n -idRun RUN : ID number of the run to be processed (for reprocessing RUN=0) \n"); |
292 |
|
// printf( "\n -outDir OUTDIR : Path where to put the LEVEL2 output [default ./ ] "); |
293 |
|
// printf( "\n -processFolder DIR : Directory (relative to OUTDIR) for other output files [default TrackerFolder/ ] "); |
294 |
|
// printf( "\n -processFile FILE : Name of the LEVEL2 output file [default RUN.Level2.root]"); |
295 |
|
// printf( "\n -processFile1 FILE : Name of the LEVEL1 output file [default RUN.Level1.rz]"); |
296 |
|
// printf( "\n -frame1 FRAME : type of output for LEVEL1, root/hbook [default hbook ] "); |
297 |
|
// printf( "\n -frame2 FRAME : type of output for LEVEL2, root/hbook [default root ] "); |
298 |
|
printf( "\n --get1, --get-level1 : get LEVEL1 output (store only cluster associated to tracks) [default (no LEVEL1 output) ] "); |
299 |
|
printf( "\n --get1-full, --get-level1-full : get LEVEL1 output (store all clusters) [default (no LEVEL1 output) ] "); |
300 |
|
printf( "\n --dontget2, --dontget-level2 : do not get LEVEL2 output [default (get LEVEL2 output)]"); |
301 |
|
printf( "\n --geth,, --get-hough : get Hough-transform output [default (no Hough-t. output) ] "); |
302 |
|
printf( "\n -pfa PFAID : type of output for LEVEL2, root/hbook [default 14 (COG4) ] "); |
303 |
|
printf( "\n -N PATH : load parameter of type N=1,2... from PATH [default (from DB) ] "); |
304 |
|
printf( "\n --verbose, -v : verbose mode "); |
305 |
|
printf( "\n --debug, -d : debug mode "); |
306 |
|
printf( "\n --warning, -w : warning mode "); |
307 |
|
printf( "\n -skip NEV : skip first NEV events from each run "); |
308 |
|
// printf( "\n --standalone, -s : standalone mode (without RunInfo) ... but it might not work \n"); |
309 |
|
// printf( "\n -host HOST : Name for the host [default mysql://localhost/pamelaprod ]"); |
310 |
|
// printf( "\n -user USER : Username for the DB [default anonymous] "); |
311 |
|
// printf( "\n -psw PSW : Password for the DB [default (none)]\n \n \n"); |
312 |
|
|
313 |
|
|
314 |
|
} |