/[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.2 by mocchiut, Tue May 30 15:00:01 2006 UTC revision 1.4 by mocchiut, Fri Jun 30 10:44:59 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 434  int main(int numinp, char *inps[]){ Line 435  int main(int numinp, char *inps[]){
435        stringstream strun;        stringstream strun;
436        strun.str("");        strun.str("");
437        strun << run;        strun << run;
438          filename += outDir;
439          filename += "/";
440        filename += strun.str();        filename += strun.str();
441        filename += ".Level2.root";        filename += ".Level2.root";
442      };      };
443      filename = outDir + "/" + filename;      //    filename = outDir + "/" + filename;
444      processFile = new TFile(filename.Data(),"UPDATE");      processFile = new TFile(filename.Data(),"UPDATE");
445      if ( !processFile->IsOpen() ) throw -15;          if ( !processFile->IsOpen() ) throw -15;    
446      //      //
# Line 448  int main(int numinp, char *inps[]){ Line 451  int main(int numinp, char *inps[]){
451        RUNSGN = RunInfoCore(run,processFile,dbc,runargc,runargv);        RUNSGN = RunInfoCore(run,processFile,dbc,runargc,runargv);
452        printf("done\n");        printf("done\n");
453      };      };
454        //
455        // From the Run Infos extract acq_var_info to determine if detectors are in the acquisition or not
456        //
457        printf(" Checking if requested detectors are in the acquisition\n");
458        ItoRunInfo *runinfo = new ItoRunInfo(processFile);
459        runinfo->Read(run);
460        printf(" => ACQ_VAR_INFO = %i \n",runinfo->ACQ_VAR_INFO);
461        if ( TRK && !(runinfo->ACQ_VAR_INFO & (1 << 4)) ) throw -16;
462        if ( TOF && !(runinfo->ACQ_VAR_INFO & (1 << 0)) ) throw -17;
463        if ( CAL && !(runinfo->ACQ_VAR_INFO & (1 << 3)) ) throw -18;
464        if ( AC  && !(runinfo->ACQ_VAR_INFO & (1 << 1)) && !(runinfo->ACQ_VAR_INFO & (1 << 2)) ) throw -19;
465        if ( S4  && !(runinfo->ACQ_VAR_INFO & (1 << 5)) ) throw -20;
466        if ( ND  && !(runinfo->ACQ_VAR_INFO & (1 << 9)) ) throw -21;
467        printf(" OK! start processing detector's data. \n");
468        //
469      if ( TRK ) {      if ( TRK ) {
470        printf(" Calling TrackerLevel2... ");        printf(" Calling TrackerLevel2... ");
471        TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv);        TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv);
# Line 506  int main(int numinp, char *inps[]){ Line 524  int main(int numinp, char *inps[]){
524      case -13:  message += " Cannot create processFolder directory"; break;      case -13:  message += " Cannot create processFolder directory"; break;
525      case -14:  message += " Error querying the DB"; break;      case -14:  message += " Error querying the DB"; break;
526      case -15:  message += " Cannot open file for writing"; break;      case -15:  message += " Cannot open file for writing"; break;
527        case -16:  message += " No tracker in the acquisition (use -TRK to process anyway)"; break;
528        case -17:  message += " No ToF in the acquisition (use -TOF to process anyway)"; break;
529        case -18:  message += " No calorimeter in the acquisition (use -CAL to process anyway)"; break;
530        case -19:  message += " No anticounters in the acquisition (use -AC to process anyway)"; break;
531        case -20:  message += " No S4 in the acquisition (use -S4 to process anyway)"; break;
532        case -21:  message += " No neutron detector in the acquisition (use -ND to process anyway)"; break;
533        //        //
534      case -50:  message += " GLTABLES - No entries matching GL_RUN query"; break;      case -50:  message += " GLTABLES - No entries matching GL_RUN query"; break;
535      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.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23