--- chewbacca/YodaProfiler/src/YodaProfiler.cpp 2008/12/03 19:57:53 1.4 +++ chewbacca/YodaProfiler/src/YodaProfiler.cpp 2009/12/28 08:39:25 1.11 @@ -24,7 +24,9 @@ printf(" -v | --verbose be verbose [default]\n"); printf(" -s | --silent print nothing on STDOUT\n"); printf(" -g | --debug be very verbose [default: no]\n"); - 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: yes]\n"); + printf(" -r | --relaxed do not perfrom some important checks, use it only if you know what you are doing [default: NO]\n"); + printf(" -np | --no-pedantic do NOT be strict in checks, try to continue if any problem is found [default: no]\n"); printf(" -tag char set the run tagging in _RUNID_GEN to \"char\" (four letters)[default = 'NONE']\n"); printf(" -boot number CPU boot number [default = taken from VarDump]\n"); printf(" -autoboot if no VarDump found try to determine the BOOT number\n"); @@ -35,7 +37,8 @@ printf(" -dworbit number number is the downlink orbit number (to be used with non-standard names)\n"); printf(" -static use static path inside the DB instead of symbolic names\n"); // printf(" -keepenv use environmental variables in the filenames\n"); - printf(" -k | --keepenv use environmental variables in the filenames\n"); + printf(" -k | --keepenv use environmental variables in the filenames [default]\n"); + printf(" -nk | --no-keepenv use PAM_L0 or standard filenames\n"); // 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 -no-autoboot -dworbit 1 -static\"\n"); printf(" -clean number number in seconds after which the fragment table\n"); @@ -107,7 +110,7 @@ // Bool_t chewbacca = false; Bool_t staticp = false; - Bool_t keepenv = false; + Bool_t keepenv = true; Bool_t beverbose = true; Bool_t debug = false; Bool_t autoboot = true; @@ -128,7 +131,9 @@ // Bool_t check = false; // - Bool_t pedantic = false; + Bool_t pedantic = true; + // + Bool_t relaxed = false; // Int_t i = 0; // @@ -204,6 +209,9 @@ if ( !strcmp(inps[i],"-k") || !strcmp(inps[i],"--keepenv") ) { keepenv = true; }; + if ( !strcmp(inps[i],"-nk") || !strcmp(inps[i],"--no-keepenv") ) { + keepenv = false; + }; if ( !strcmp(inps[i],"-autoboot") ) { autoboot = true; }; @@ -300,6 +308,10 @@ // if ( !strcmp(inps[i],"-p") || !strcmp(inps[i],"--pedantic") ) pedantic = true; // + if ( !strcmp(inps[i],"-r") || !strcmp(inps[i],"--relaxed") ) relaxed = true; + // + if ( !strcmp(inps[i],"-np") || !strcmp(inps[i],"--no-pedantic") ) pedantic = false; + // if ( !strcmp(inps[i],"-nofrag") ) nofrag = true; // if ( !strcmp(inps[i],"-check") ) check = true; @@ -379,6 +391,7 @@ if ( !dwinput ) dwinput = 1; staticp = true; autoboot = false; + pedantic = false; }; // if ( filerawname == "" && filerootname != "" ){ @@ -405,7 +418,8 @@ pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug,tlefilename,dwinput,staticp,gpamela,keepenv); pamDB->CheckConnection(); pamDB->LockTables(); - pamDB->OpenL0File(filerootname); + if ( !pamDB->IsChewbacca() ) pamDB->NotChewbacca(boot,tsync,obt0,gpamela); + if ( filerootname != "" ) pamDB->OpenL0File(filerootname); pamDB->SetTag(tag); //------------------------------------------------------------------------------------------- // @@ -413,6 +427,7 @@ pamDB->SetNoFrag(nofrag); pamDB->SetAutoBoot(autoboot); pamDB->SetPedantic(pedantic); + pamDB->SetRelaxed(relaxed); // if ( remove ){ //------------------------------------------------------------------------------------------- @@ -531,7 +546,7 @@ //Validate runs //------------------------------------------------------------------------------------------- if ( beverbose ) printf(" 11 => Validate runs (earlier than %s)\n",pamDB->GetCleanTime()); - WAR[9] = pamDB->ValidateRuns(); + WAR[9] = pamDB->ValidateRuns(); //------------------------------------------------------------------------------------------- }; @@ -557,7 +572,8 @@ }; } catch (Int_t exc) { - signal = exc; + // signal = exc; + signal = 1; switch(exc){ case -1: message += " DB connection failure"; break; case -2: message += " Connection failure"; break; @@ -769,7 +785,8 @@ printf("\n"); printf(" WARNING(s):\n%s\n",message.Data()); printf("\n"); - if ( !signal ) signal = 1; + // if ( !signal ) signal = 1; + if ( !signal ) signal = 255; }; // //---------------------------------------------------------------------------------------