/[PAMELA software]/YodaProfiler/src/YodaProfiler.cpp
ViewVC logotype

Diff of /YodaProfiler/src/YodaProfiler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by mocchiut, Tue Oct 31 15:36:05 2006 UTC revision 1.13 by mocchiut, Mon Nov 27 14:25:36 2006 UTC
# Line 24  void usage(){ Line 24  void usage(){
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");
# Line 88  int main(int numinp, char *inps[]){ Line 91  int main(int numinp, char *inps[]){
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 = "";
# Line 153  int main(int numinp, char *inps[]){ Line 157  int main(int numinp, char *inps[]){
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();
# Line 285  int main(int numinp, char *inps[]){ Line 295  int main(int numinp, char *inps[]){
295      //-------------------------------------------------------------------------------------------      //-------------------------------------------------------------------------------------------
296      //      //
297      pamDB->SetNoFrag(nofrag);      pamDB->SetNoFrag(nofrag);
298        pamDB->SetAutoBoot(autoboot);
299      //      //
300      if ( remove ){      if ( remove ){
301        //-------------------------------------------------------------------------------------------        //-------------------------------------------------------------------------------------------
# Line 308  int main(int numinp, char *inps[]){ Line 319  int main(int numinp, char *inps[]){
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        //-------------------------------------------------------------------------------------------        //-------------------------------------------------------------------------------------------
# Line 434  int main(int numinp, char *inps[]){ Line 445  int main(int numinp, char *inps[]){
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");
# Line 486  int main(int numinp, char *inps[]){ Line 498  int main(int numinp, char *inps[]){
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            };            };

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.23