25 |
printf("\n -v | --verbose be verbose [default: print nothing on STDOUT]\n"); |
printf("\n -v | --verbose be verbose [default: print nothing on STDOUT]\n"); |
26 |
printf("\n -idRun ID_RUN: ID number of the run to be processed \n"); |
printf("\n -idRun ID_RUN: ID number of the run to be processed \n"); |
27 |
printf("\n -processFile filename : output filename [default ID_RUN.Level2.root]\n"); |
printf("\n -processFile filename : output filename [default ID_RUN.Level2.root]\n"); |
28 |
printf("\n -processFolder not used [default \"\"]\n"); |
printf("\n -processFolder default \"mydetector2Folder\"\n"); |
29 |
printf("\n Notice that parameter order does not matter. \n"); |
printf("\n Notice that parameter order does not matter. \n"); |
30 |
printf("\nExample: \n\nMyDetector2Level2 -idRun 1085 -processFile nomefile.root\n\n"); |
printf("\nExample: \n\nMyDetector2Level2 -idRun 1085 -processFile nomefile.root\n\n"); |
31 |
}; |
}; |
43 |
TString filename; |
TString filename; |
44 |
TSQLServer *dbc = 0; |
TSQLServer *dbc = 0; |
45 |
Bool_t givenid = false; |
Bool_t givenid = false; |
46 |
|
TString processFolder = "mydetector2Folder"; |
47 |
// |
// |
48 |
// Checking input parameters |
// Checking input parameters |
49 |
// |
// |
58 |
exit(0); |
exit(0); |
59 |
}; |
}; |
60 |
if ( !strcmp(inps[i],"-idRun") ) { |
if ( !strcmp(inps[i],"-idRun") ) { |
61 |
if ( numinp-1 < i+1 ) exit(-3); |
if ( numinp-1 < i+1 ){ |
62 |
|
usage(); |
63 |
|
exit(-3); |
64 |
|
}; |
65 |
givenid = true; |
givenid = true; |
66 |
char *pEnd; |
char *pEnd; |
67 |
run = strtoull(inps[i+1],&pEnd,0); |
run = strtoull(inps[i+1],&pEnd,0); |
68 |
}; |
}; |
69 |
if ( !strcmp(inps[i],"-processFile") ) { |
if ( !strcmp(inps[i],"-processFile") ) { |
70 |
if ( numinp-1 < i+1 ) exit(-3); |
if ( numinp-1 < i+1 ){ |
71 |
|
usage(); |
72 |
|
exit(-3); |
73 |
|
}; |
74 |
filename = (TString)inps[i+1]; |
filename = (TString)inps[i+1]; |
75 |
}; |
}; |
76 |
|
if ( !strcmp(inps[i],"-processFolder") ) { |
77 |
|
if ( numinp-1 < i+1 ){ |
78 |
|
usage(); |
79 |
|
exit(-3); |
80 |
|
}; |
81 |
|
processFolder = (TString)inps[i+1]; |
82 |
|
}; |
83 |
if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true; |
if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true; |
84 |
}; |
}; |
85 |
} else { |
} else { |
130 |
// |
// |
131 |
// Run the core program, put any output error in the "error" variable |
// Run the core program, put any output error in the "error" variable |
132 |
// |
// |
133 |
error = MyDect2Core(run,filename,dbc); |
error = MyDect2Core(run,filename,processFolder,dbc); |
134 |
// |
// |
135 |
// Close the DB connection |
// Close the DB connection |
136 |
// |
// |