| 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: yes]\n"); |
printf(" -p | --pedantic be strict in checks, exit with error if any problem is found [default: yes]\n"); |
| 28 |
|
printf(" -r | --relaxed do not perfrom some important checks, use it only if you know what you are doing [default: NO]\n"); |
| 29 |
printf(" -np | --no-pedantic do NOT be strict in checks, try to continue if any problem is found [default: no]\n"); |
printf(" -np | --no-pedantic do NOT be strict in checks, try to continue if any problem is found [default: no]\n"); |
| 30 |
printf(" -tag char set the run tagging in _RUNID_GEN to \"char\" (four letters)[default = 'NONE']\n"); |
printf(" -tag char set the run tagging in _RUNID_GEN to \"char\" (four letters)[default = 'NONE']\n"); |
| 31 |
printf(" -boot number CPU boot number [default = taken from VarDump]\n"); |
printf(" -boot number CPU boot number [default = taken from VarDump]\n"); |
| 133 |
// |
// |
| 134 |
Bool_t pedantic = true; |
Bool_t pedantic = true; |
| 135 |
// |
// |
| 136 |
|
Bool_t relaxed = false; |
| 137 |
|
// |
| 138 |
Int_t i = 0; |
Int_t i = 0; |
| 139 |
// |
// |
| 140 |
if ( numinp > 1 ){ |
if ( numinp > 1 ){ |
| 308 |
// |
// |
| 309 |
if ( !strcmp(inps[i],"-p") || !strcmp(inps[i],"--pedantic") ) pedantic = true; |
if ( !strcmp(inps[i],"-p") || !strcmp(inps[i],"--pedantic") ) pedantic = true; |
| 310 |
// |
// |
| 311 |
|
if ( !strcmp(inps[i],"-r") || !strcmp(inps[i],"--relaxed") ) relaxed = true; |
| 312 |
|
// |
| 313 |
if ( !strcmp(inps[i],"-np") || !strcmp(inps[i],"--no-pedantic") ) pedantic = false; |
if ( !strcmp(inps[i],"-np") || !strcmp(inps[i],"--no-pedantic") ) pedantic = false; |
| 314 |
// |
// |
| 315 |
if ( !strcmp(inps[i],"-nofrag") ) nofrag = true; |
if ( !strcmp(inps[i],"-nofrag") ) nofrag = true; |
| 391 |
if ( !dwinput ) dwinput = 1; |
if ( !dwinput ) dwinput = 1; |
| 392 |
staticp = true; |
staticp = true; |
| 393 |
autoboot = false; |
autoboot = false; |
| 394 |
|
pedantic = false; |
| 395 |
}; |
}; |
| 396 |
// |
// |
| 397 |
if ( filerawname == "" && filerootname != "" ){ |
if ( filerawname == "" && filerootname != "" ){ |
| 418 |
pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug,tlefilename,dwinput,staticp,gpamela,keepenv); |
pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug,tlefilename,dwinput,staticp,gpamela,keepenv); |
| 419 |
pamDB->CheckConnection(); |
pamDB->CheckConnection(); |
| 420 |
pamDB->LockTables(); |
pamDB->LockTables(); |
| 421 |
pamDB->OpenL0File(filerootname); |
if ( filerootname != "" ) pamDB->OpenL0File(filerootname); |
| 422 |
pamDB->SetTag(tag); |
pamDB->SetTag(tag); |
| 423 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
| 424 |
// |
// |
| 426 |
pamDB->SetNoFrag(nofrag); |
pamDB->SetNoFrag(nofrag); |
| 427 |
pamDB->SetAutoBoot(autoboot); |
pamDB->SetAutoBoot(autoboot); |
| 428 |
pamDB->SetPedantic(pedantic); |
pamDB->SetPedantic(pedantic); |
| 429 |
|
pamDB->SetRelaxed(relaxed); |
| 430 |
// |
// |
| 431 |
if ( remove ){ |
if ( remove ){ |
| 432 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
| 545 |
//Validate runs |
//Validate runs |
| 546 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
| 547 |
if ( beverbose ) printf(" 11 => Validate runs (earlier than %s)\n",pamDB->GetCleanTime()); |
if ( beverbose ) printf(" 11 => Validate runs (earlier than %s)\n",pamDB->GetCleanTime()); |
| 548 |
WAR[9] = pamDB->ValidateRuns(); |
WAR[9] = pamDB->ValidateRuns(); |
| 549 |
//------------------------------------------------------------------------------------------- |
//------------------------------------------------------------------------------------------- |
| 550 |
}; |
}; |
| 551 |
|
|
| 571 |
}; |
}; |
| 572 |
|
|
| 573 |
} catch (Int_t exc) { |
} catch (Int_t exc) { |
| 574 |
signal = exc; |
// signal = exc; |
| 575 |
|
signal = 1; |
| 576 |
switch(exc){ |
switch(exc){ |
| 577 |
case -1: message += " DB connection failure"; break; |
case -1: message += " DB connection failure"; break; |
| 578 |
case -2: message += " Connection failure"; break; |
case -2: message += " Connection failure"; break; |
| 784 |
printf("\n"); |
printf("\n"); |
| 785 |
printf(" WARNING(s):\n%s\n",message.Data()); |
printf(" WARNING(s):\n%s\n",message.Data()); |
| 786 |
printf("\n"); |
printf("\n"); |
| 787 |
if ( !signal ) signal = 1; |
// if ( !signal ) signal = 1; |
| 788 |
|
if ( !signal ) signal = 255; |
| 789 |
}; |
}; |
| 790 |
// |
// |
| 791 |
//--------------------------------------------------------------------------------------- |
//--------------------------------------------------------------------------------------- |