| 25 |
printf(" -s | --silent print nothing on STDOUT\n"); |
printf(" -s | --silent print nothing on STDOUT\n"); |
| 26 |
printf(" -g | --debug be very verbose [default: no]\n"); |
printf(" -g | --debug be very verbose [default: no]\n"); |
| 27 |
printf(" -p | --pedantic be strict in checks, exit with error if any problem is found [default: no]\n"); |
printf(" -p | --pedantic be strict in checks, exit with error if any problem is found [default: no]\n"); |
| 28 |
|
printf(" -tag char set the run tagging in _RUNID_GEN to \"char\" (four letters)[default = 'NONE']\n"); |
| 29 |
printf(" -boot number CPU boot number [default = taken from VarDump]\n"); |
printf(" -boot number CPU boot number [default = taken from VarDump]\n"); |
| 30 |
printf(" -autoboot if no VarDump found try to determine the BOOT number\n"); |
printf(" -autoboot if no VarDump found try to determine the BOOT number\n"); |
| 31 |
printf(" looking at timesync [default]\n"); |
printf(" looking at timesync [default]\n"); |
| 34 |
printf(" -obt0 number obt at timesync (ms) [default = taken from data]\n"); |
printf(" -obt0 number obt at timesync (ms) [default = taken from data]\n"); |
| 35 |
printf(" -dworbit number number is the downlink orbit number (to be used with non-standard names)\n"); |
printf(" -dworbit number number is the downlink orbit number (to be used with non-standard names)\n"); |
| 36 |
printf(" -static use static path inside the DB instead of symbolic names\n"); |
printf(" -static use static path inside the DB instead of symbolic names\n"); |
| 37 |
|
// printf(" -keepenv use environmental variables in the filenames\n"); |
| 38 |
|
printf(" -k | --keepenv use environmental variables in the filenames\n"); |
| 39 |
// printf(" -gpamela shortcut to \"-clean 0 -obt0 1 -tsync 1 -no-autoboot -boot 1 -dworbit 1 -static\"\n"); |
// printf(" -gpamela shortcut to \"-clean 0 -obt0 1 -tsync 1 -no-autoboot -boot 1 -dworbit 1 -static\"\n"); |
| 40 |
printf(" -gpamela shortcut to \"-clean 0 -obt0 1 -no-autoboot -dworbit 1 -static\"\n"); |
printf(" -gpamela shortcut to \"-clean 0 -obt0 1 -no-autoboot -dworbit 1 -static\"\n"); |
| 41 |
printf(" -clean number number in seconds after which the fragment table\n"); |
printf(" -clean number number in seconds after which the fragment table\n"); |
| 84 |
Bool_t runpieces = false; |
Bool_t runpieces = false; |
| 85 |
// |
// |
| 86 |
// |
// |
| 87 |
|
TString tag = "NONE"; |
| 88 |
TString filerawname = ""; |
TString filerawname = ""; |
| 89 |
TString filerootname = ""; |
TString filerootname = ""; |
| 90 |
// |
// |
| 107 |
// |
// |
| 108 |
Bool_t chewbacca = false; |
Bool_t chewbacca = false; |
| 109 |
Bool_t staticp = false; |
Bool_t staticp = false; |
| 110 |
|
Bool_t keepenv = false; |
| 111 |
Bool_t beverbose = true; |
Bool_t beverbose = true; |
| 112 |
Bool_t debug = false; |
Bool_t debug = false; |
| 113 |
Bool_t autoboot = true; |
Bool_t autoboot = true; |
| 150 |
}; |
}; |
| 151 |
filerawname = (TString)inps[i+1]; |
filerawname = (TString)inps[i+1]; |
| 152 |
}; |
}; |
| 153 |
if ( !strcmp(inps[i],"-yodaFile") ) { |
if ( !strcmp(inps[i],"-yodaFile") || !strcmp(inps[i],"-L0File") ) { |
| 154 |
if ( numinp-1 < i+1 ){ |
if ( numinp-1 < i+1 ){ |
| 155 |
usage(); |
usage(); |
| 156 |
exit(1); |
exit(1); |
| 177 |
fcleanfile = (TString)inps[i+1]; |
fcleanfile = (TString)inps[i+1]; |
| 178 |
forceclean = true; |
forceclean = true; |
| 179 |
}; |
}; |
| 180 |
|
if ( !strcmp(inps[i],"-tag") ) { |
| 181 |
|
if ( numinp-1 < i+1 ){ |
| 182 |
|
usage(); |
| 183 |
|
exit(1); |
| 184 |
|
}; |
| 185 |
|
tag = (TString)inps[i+1]; |
| 186 |
|
}; |
| 187 |
if ( !strcmp(inps[i],"-validate") ) { |
if ( !strcmp(inps[i],"-validate") ) { |
| 188 |
if ( numinp-1 < i+1 ){ |
if ( numinp-1 < i+1 ){ |
| 189 |
usage(); |
usage(); |
| 201 |
if ( !strcmp(inps[i],"-static") ) { |
if ( !strcmp(inps[i],"-static") ) { |
| 202 |
staticp = true; |
staticp = true; |
| 203 |
}; |
}; |
| 204 |
|
if ( !strcmp(inps[i],"-k") || !strcmp(inps[i],"--keepenv") ) { |
| 205 |
|
keepenv = true; |
| 206 |
|
}; |
| 207 |
if ( !strcmp(inps[i],"-autoboot") ) { |
if ( !strcmp(inps[i],"-autoboot") ) { |
| 208 |
autoboot = true; |
autoboot = true; |
| 209 |
}; |
}; |
| 402 |
// Create pamDB object and open SQL connection |
// Create pamDB object and open SQL connection |
| 403 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
| 404 |
if ( beverbose ) printf(" 1 => Initialize and open SQL connection \n"); |
if ( beverbose ) printf(" 1 => Initialize and open SQL connection \n"); |
| 405 |
pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug,tlefilename,dwinput,staticp,gpamela); |
pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug,tlefilename,dwinput,staticp,gpamela,keepenv); |
| 406 |
pamDB->CheckConnection(); |
pamDB->CheckConnection(); |
| 407 |
pamDB->LockTables(); |
pamDB->LockTables(); |
| 408 |
pamDB->OpenL0File(filerootname); |
pamDB->OpenL0File(filerootname); |
| 409 |
|
pamDB->SetTag(tag); |
| 410 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
| 411 |
// |
// |
| 412 |
// |
// |
| 617 |
case -89: message += " PEDANTIC: CANNOT FIND PKT/OBT SEQUENCE IN THE POINTED FILE"; break; |
case -89: message += " PEDANTIC: CANNOT FIND PKT/OBT SEQUENCE IN THE POINTED FILE"; break; |
| 618 |
case -90: message += " No PhysEndRun tree in the file"; break; |
case -90: message += " No PhysEndRun tree in the file"; break; |
| 619 |
case -91: message += " PEDANTIC: Repetition of PhysEndRun data"; break; |
case -91: message += " PEDANTIC: Repetition of PhysEndRun data"; break; |
| 620 |
|
case -100: message += " Cannot open calibration files to check repeated calibration"; break; |
| 621 |
default: message += " Unidentified error"; break; |
default: message += " Unidentified error"; break; |
| 622 |
}; |
}; |
| 623 |
printf("\n"); |
printf("\n"); |