24 |
printf("\n -s | --silent print nothing on STDOUT\n"); |
printf("\n -s | --silent print nothing on STDOUT\n"); |
25 |
printf("\n -g | --debug be very verbose [default: no]\n"); |
printf("\n -g | --debug be very verbose [default: no]\n"); |
26 |
printf("\n -boot number CPU boot number [default = taken from VarDump]\n"); |
printf("\n -boot number CPU boot number [default = taken from VarDump]\n"); |
27 |
|
printf("\n -autoboot if no VarDump found try to determine the BOOT number\n"); |
28 |
|
printf("\n looking at timesync [default]\n"); |
29 |
|
printf("\n -no-autoboot disable previous check\n"); |
30 |
printf("\n -tsync number timesync (s) [default = taken from data]\n"); |
printf("\n -tsync number timesync (s) [default = taken from data]\n"); |
31 |
printf("\n -obt0 number obt at timesync (ms) [default = taken from data]\n"); |
printf("\n -obt0 number obt at timesync (ms) [default = taken from data]\n"); |
32 |
printf("\n -clean number number in seconds after which the fragment table\n"); |
printf("\n -clean number number in seconds after which the fragment table\n"); |
91 |
// |
// |
92 |
Bool_t beverbose = true; |
Bool_t beverbose = true; |
93 |
Bool_t debug = false; |
Bool_t debug = false; |
94 |
|
Bool_t autoboot = true; |
95 |
// |
// |
96 |
Bool_t remove = false; |
Bool_t remove = false; |
97 |
TString remfile = ""; |
TString remfile = ""; |
157 |
validfile = (TString)inps[i+1]; |
validfile = (TString)inps[i+1]; |
158 |
validate = true; |
validate = true; |
159 |
}; |
}; |
160 |
|
if ( !strcmp(inps[i],"-autoboot") ) { |
161 |
|
autoboot = true; |
162 |
|
}; |
163 |
|
if ( !strcmp(inps[i],"-no-autoboot") ) { |
164 |
|
autoboot = false; |
165 |
|
}; |
166 |
if ( !strcmp(inps[i],"-boot") ) { |
if ( !strcmp(inps[i],"-boot") ) { |
167 |
if ( numinp-1 < i+1 ){ |
if ( numinp-1 < i+1 ){ |
168 |
usage(); |
usage(); |
295 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
296 |
// |
// |
297 |
pamDB->SetNoFrag(nofrag); |
pamDB->SetNoFrag(nofrag); |
298 |
|
pamDB->SetAutoBoot(autoboot); |
299 |
// |
// |
300 |
if ( remove ){ |
if ( remove ){ |
301 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
319 |
// |
// |
320 |
if( !pamDB->InsertRaw() )printf("=> RAW file not inserted --- the DB might not ( yet ) be filled correctly \n"); |
if( !pamDB->InsertRaw() )printf("=> RAW file not inserted --- the DB might not ( yet ) be filled correctly \n"); |
321 |
pamDB->CheckFile(); |
pamDB->CheckFile(); |
|
//------------------------------------------------------------------------------------------- |
|
|
//Update a single GL_RAW record with its BOOT_NUMBER |
|
|
//------------------------------------------------------------------------------------------- |
|
|
if ( beverbose ) printf(" 3 => Update a single GL_RAW record with its BOOT_NUMBER \n"); |
|
|
WAR[3] = pamDB->assignBOOT_NUMBER(); |
|
|
// if ( WAR[3] ) pamDB->SetNOBOOT(true); |
|
|
if ( WAR[3] && WAR[3] != 1 ) throw -9; |
|
|
//------------------------------------------------------------------------------------------- |
|
322 |
// |
// |
323 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
324 |
//Insert an entry in GL_TIMESYNC |
//Insert an entry in GL_TIMESYNC |
325 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
326 |
if ( beverbose ) printf(" 4 => Insert an entry in GL_TIMESYNC \n"); |
if ( beverbose ) printf(" 3 => Insert an entry in GL_TIMESYNC \n"); |
327 |
WAR[1] = pamDB->insertPamelaGL_TIMESYNC(); |
WAR[1] = pamDB->insertPamelaGL_TIMESYNC(); |
328 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
329 |
// |
// |
330 |
|
//------------------------------------------------------------------------------------------- |
331 |
|
//Update a single GL_RAW record with its BOOT_NUMBER |
332 |
|
//------------------------------------------------------------------------------------------- |
333 |
|
if ( beverbose ) printf(" 4 => Update a single GL_RAW record with its BOOT_NUMBER \n"); |
334 |
|
WAR[3] = pamDB->assignBOOT_NUMBER(); |
335 |
|
if ( WAR[3] && WAR[3] != 1 && WAR[3] != 8 ) throw -9; |
336 |
|
//------------------------------------------------------------------------------------------- |
337 |
|
// |
338 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
339 |
//Insert unpack ROOT file in GL_ROOT |
//Insert unpack ROOT file in GL_ROOT |
340 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
445 |
case -26: message += " Raw file not found looking for VarDump"; break; |
case -26: message += " Raw file not found looking for VarDump"; break; |
446 |
case -27: message += " Cannot determine downlink orbit, wrong filename format?"; break; |
case -27: message += " Cannot determine downlink orbit, wrong filename format?"; break; |
447 |
case -28: message += " Cannot assign a RUN ID unique number!"; break; |
case -28: message += " Cannot assign a RUN ID unique number!"; break; |
448 |
|
case -29: message += " No VarDump and impossible to find a consistent BOOT number, use the -boot option to override"; break; |
449 |
default: message += " Unidentified error"; break; |
default: message += " Unidentified error"; break; |
450 |
}; |
}; |
451 |
printf("\n"); |
printf("\n"); |
498 |
if ( bit == 0 ) message += "=> BOOT number already inserted\n";// |
if ( bit == 0 ) message += "=> BOOT number already inserted\n";// |
499 |
else if ( bit == 1 ) message += "=> VarDump event tree is empty, use the -boot option to override\n";// |
else if ( bit == 1 ) message += "=> VarDump event tree is empty, use the -boot option to override\n";// |
500 |
else if ( bit == 2 ) message += "=> No BOOT number in VarDump(!), use the -boot option to override\n";// |
else if ( bit == 2 ) message += "=> No BOOT number in VarDump(!), use the -boot option to override\n";// |
501 |
|
else if ( bit == 3 ) message += "=> No VarDump! autoboot option used\n";// |
502 |
else if ( bit == 4 ) message += "=> The file is not in the database looking for VarDump, use the -boot option to override\n";// |
else if ( bit == 4 ) message += "=> The file is not in the database looking for VarDump, use the -boot option to override\n";// |
503 |
else message += "=> Unidentified assignBOOTnumber warning\n"; |
else message += "=> Unidentified assignBOOTnumber warning\n"; |
504 |
}; |
}; |