/[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.11 by mocchiut, Thu Sep 7 11:02:13 2006 UTC revision 1.12 by mocchiut, Tue Sep 12 13:51:35 2006 UTC
# Line 77  int main(int numinp, char *inps[]){ Line 77  int main(int numinp, char *inps[]){
77    Int_t ACSGN = 0;    Int_t ACSGN = 0;
78    Int_t S4SGN = 0;    Int_t S4SGN = 0;
79    Int_t NDSGN = 0;    Int_t NDSGN = 0;
80      Int_t DVSGN = 0;
81    //    //
82    Bool_t debug = false;    Bool_t debug = false;
83    Bool_t beverbose = true;    Bool_t beverbose = true;
# Line 126  int main(int numinp, char *inps[]){ Line 127  int main(int numinp, char *inps[]){
127    const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");    const char *pamdbhost=gSystem->Getenv("PAM_DBHOST");
128    const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");    const char *pamdbuser=gSystem->Getenv("PAM_DBUSER");
129    const char *pamdbpsw=gSystem->Getenv("PAM_DBPSW");    const char *pamdbpsw=gSystem->Getenv("PAM_DBPSW");
130      if ( !pamdbhost ) pamdbhost = "";
131      if ( !pamdbuser ) pamdbuser = "";
132      if ( !pamdbpsw ) pamdbpsw = "";
133    if ( strcmp(pamdbhost,"") ) host = pamdbhost;    if ( strcmp(pamdbhost,"") ) host = pamdbhost;
134    if ( strcmp(pamdbuser,"") ) user = pamdbuser;    if ( strcmp(pamdbuser,"") ) user = pamdbuser;
135    if ( strcmp(pamdbpsw,"") ) psw = pamdbpsw;    if ( strcmp(pamdbpsw,"") ) psw = pamdbpsw;
# Line 518  int main(int numinp, char *inps[]){ Line 522  int main(int numinp, char *inps[]){
522      ItoRunInfo *runinfo = new ItoRunInfo(processFile);      ItoRunInfo *runinfo = new ItoRunInfo(processFile);
523      runinfo->Read(run);      runinfo->Read(run);
524      printf(" => ACQ_VAR_INFO = %i \n",runinfo->ACQ_VAR_INFO);      printf(" => ACQ_VAR_INFO = %i \n",runinfo->ACQ_VAR_INFO);
525      if ( TRK && !(runinfo->ACQ_VAR_INFO & (1 << 4)) ) throw -16;      if ( TRK && !(runinfo->ACQ_VAR_INFO & (1 << 4)) ) DVSGN = 16;
526      if ( TOF && !(runinfo->ACQ_VAR_INFO & (1 << 0)) ) throw -17;      if ( TOF && !(runinfo->ACQ_VAR_INFO & (1 << 0)) ) DVSGN = 17;
527      if ( CAL && !(runinfo->ACQ_VAR_INFO & (1 << 3)) ) throw -18;      if ( CAL && !(runinfo->ACQ_VAR_INFO & (1 << 3)) ) DVSGN = 18;
528      if ( AC  && !(runinfo->ACQ_VAR_INFO & (1 << 1)) && !(runinfo->ACQ_VAR_INFO & (1 << 2)) ) throw -19;      if ( AC  && !(runinfo->ACQ_VAR_INFO & (1 << 1)) && !(runinfo->ACQ_VAR_INFO & (1 << 2)) ) DVSGN = 19;
529      if ( S4  && !(runinfo->ACQ_VAR_INFO & (1 << 5)) ) throw -20;      if ( S4  && !(runinfo->ACQ_VAR_INFO & (1 << 5)) ) DVSGN = 20;
530      if ( ND  && !(runinfo->ACQ_VAR_INFO & (1 << 9)) ) throw -21;      if ( ND  && !(runinfo->ACQ_VAR_INFO & (1 << 9)) ) DVSGN = 21;
531      printf(" OK! start processing detector's data. \n");      printf(" OK! start processing detector's data. \n");
532      //      //
533      if ( TRK ) {      if ( TRK ) {
# Line 585  int main(int numinp, char *inps[]){ Line 589  int main(int numinp, char *inps[]){
589      case -13:  message += " Cannot create processFolder directory"; break;      case -13:  message += " Cannot create processFolder directory"; break;
590      case -14:  message += " Error querying the DB"; break;      case -14:  message += " Error querying the DB"; break;
591      case -15:  message += " Cannot open file for writing"; break;      case -15:  message += " Cannot open file for writing"; break;
     case -16:  message += " No tracker in the acquisition (use -TRK to process anyway)"; break;  
     case -17:  message += " No ToF in the acquisition (use -TOF to process anyway)"; break;  
     case -18:  message += " No calorimeter in the acquisition (use -CAL to process anyway)"; break;  
     case -19:  message += " No anticounters in the acquisition (use -AC to process anyway)"; break;  
     case -20:  message += " No S4 in the acquisition (use -S4 to process anyway)"; break;  
     case -21:  message += " No neutron detector in the acquisition (use -ND to process anyway)"; break;  
592      case -22:  message += " Unknown input or wrong syntax in input paramters!"; break;      case -22:  message += " Unknown input or wrong syntax in input paramters!"; break;
593        //        //
594      case -50:  message += " GLTABLES - No entries matching GL_RUN query"; break;      case -50:  message += " GLTABLES - No entries matching GL_RUN query"; break;
# Line 665  int main(int numinp, char *inps[]){ Line 663  int main(int numinp, char *inps[]){
663      printf("\n");      printf("\n");
664      if ( signal < 0 ) cout << " ERROR ("<< signal << ") "<< message <<endl;      if ( signal < 0 ) cout << " ERROR ("<< signal << ") "<< message <<endl;
665    }    }
666      //
667      switch(DVSGN){ // change message with printf!!
668      case 16:  message += " No tracker in the acquisition\n"; break;
669      case 17:  message += " No ToF in the acquisition\n"; break;
670      case 18:  message += " No calorimeter in the acquisition\n"; break;
671      case 19:  message += " No anticounters in the acquisition\n"; break;
672      case 20:  message += " No S4 in the acquisition\n"; break;
673      case 21:  message += " No neutron detector in the acquisition\n"; break;
674      };
675      //
676    //  switch(RUNSGN){    //  switch(RUNSGN){
677    //  };    //  };
678    switch(CALSGN){    switch(CALSGN){

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

  ViewVC Help
Powered by ViewVC 1.1.23