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

Diff of /DarthVader/src/DarthVader.cpp

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

revision 1.3 by mocchiut, Tue Jun 27 13:57:43 2006 UTC revision 1.5 by mocchiut, Fri Jun 30 13:03:32 2006 UTC
# Line 22  Line 22 
22  #include <S4Core.h>  #include <S4Core.h>
23  #include <NDCore.h>  #include <NDCore.h>
24  #include <OrbitalInfoCore.h>  #include <OrbitalInfoCore.h>
25    #include <RunInfo.h>
26  //  //
27  using namespace std;  using namespace std;
28  //  //
# Line 40  void usage(){ Line 41  void usage(){
41    printf("\n -v | --verbose  be verbose [default: print nothing on STDOUT]\n");    printf("\n -v | --verbose  be verbose [default: print nothing on STDOUT]\n");
42    printf("\n -idRun          ID_RUN: ID number of the run to be processed \n");    printf("\n -idRun          ID_RUN: ID number of the run to be processed \n");
43    printf("\n -processFile    output filename [default ID_RUN.Level2.root]\n");    printf("\n -processFile    output filename [default ID_RUN.Level2.root]\n");
   printf("\n -processFolder  folder for output data but the processFile [default \"calorimeterFolder\"]\n");  
44    printf("\n -host           name for the host [default = mysql://localhost/pamelaprod]\n");    printf("\n -host           name for the host [default = mysql://localhost/pamelaprod]\n");
45    printf("\n -user           username for the DB [default = anonymous] \n");    printf("\n -user           username for the DB [default = anonymous] \n");
46    printf("\n -psw            password for the DB [default = \"\"]\n");    printf("\n -psw            password for the DB [default = \"\"]\n");
# Line 450  int main(int numinp, char *inps[]){ Line 450  int main(int numinp, char *inps[]){
450        RUNSGN = RunInfoCore(run,processFile,dbc,runargc,runargv);        RUNSGN = RunInfoCore(run,processFile,dbc,runargc,runargv);
451        printf("done\n");        printf("done\n");
452      };      };
453        //
454        // From the Run Infos extract acq_var_info to determine if detectors are in the acquisition or not
455        //
456        printf(" Checking if requested detectors are in the acquisition\n");
457        ItoRunInfo *runinfo = new ItoRunInfo(processFile);
458        runinfo->Read(run);
459        printf(" => ACQ_VAR_INFO = %i \n",runinfo->ACQ_VAR_INFO);
460        if ( TRK && !(runinfo->ACQ_VAR_INFO & (1 << 4)) ) throw -16;
461        if ( TOF && !(runinfo->ACQ_VAR_INFO & (1 << 0)) ) throw -17;
462        if ( CAL && !(runinfo->ACQ_VAR_INFO & (1 << 3)) ) throw -18;
463        if ( AC  && !(runinfo->ACQ_VAR_INFO & (1 << 1)) && !(runinfo->ACQ_VAR_INFO & (1 << 2)) ) throw -19;
464        if ( S4  && !(runinfo->ACQ_VAR_INFO & (1 << 5)) ) throw -20;
465        if ( ND  && !(runinfo->ACQ_VAR_INFO & (1 << 9)) ) throw -21;
466        printf(" OK! start processing detector's data. \n");
467        //
468      if ( TRK ) {      if ( TRK ) {
469        printf(" Calling TrackerLevel2... ");        printf(" Calling TrackerLevel2... ");
470        TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv);        TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv);
# Line 508  int main(int numinp, char *inps[]){ Line 523  int main(int numinp, char *inps[]){
523      case -13:  message += " Cannot create processFolder directory"; break;      case -13:  message += " Cannot create processFolder directory"; break;
524      case -14:  message += " Error querying the DB"; break;      case -14:  message += " Error querying the DB"; break;
525      case -15:  message += " Cannot open file for writing"; break;      case -15:  message += " Cannot open file for writing"; break;
526        case -16:  message += " No tracker in the acquisition (use -TRK to process anyway)"; break;
527        case -17:  message += " No ToF in the acquisition (use -TOF to process anyway)"; break;
528        case -18:  message += " No calorimeter in the acquisition (use -CAL to process anyway)"; break;
529        case -19:  message += " No anticounters in the acquisition (use -AC to process anyway)"; break;
530        case -20:  message += " No S4 in the acquisition (use -S4 to process anyway)"; break;
531        case -21:  message += " No neutron detector in the acquisition (use -ND to process anyway)"; break;
532        //        //
533      case -50:  message += " GLTABLES - No entries matching GL_RUN query"; break;      case -50:  message += " GLTABLES - No entries matching GL_RUN query"; break;
534      case -51:  message += " GLTABLES - No entries matching GL_ROOT query"; break;      case -51:  message += " GLTABLES - No entries matching GL_ROOT query"; break;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.23