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; |
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; |
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 ) { |
534 |
printf(" Calling TrackerLevel2... "); |
printf(" Calling TrackerLevel2... "); |
535 |
TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv); |
TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv); |
536 |
|
gSystem->Unlink("TrackerFolder"); //patch |
537 |
printf("done\n"); |
printf("done\n"); |
538 |
}; |
}; |
539 |
if ( TOF ) { |
if ( TOF ) { |
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; |
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: printf(" No tracker in the acquisition\n"); |
669 |
|
case 17: printf(" No ToF in the acquisition\n"); |
670 |
|
case 18: printf(" No calorimeter in the acquisition\n"); |
671 |
|
case 19: printf(" No anticounters in the acquisition\n"); |
672 |
|
case 20: printf(" No S4 in the acquisition\n"); |
673 |
|
case 21: printf(" No neutron detector in the acquisition\n"); |
674 |
|
}; |
675 |
|
// |
676 |
// switch(RUNSGN){ |
// switch(RUNSGN){ |
677 |
// }; |
// }; |
678 |
switch(CALSGN){ |
switch(CALSGN){ |
679 |
case 100: printf("\n WARNING CALORIMETER - Data with no associated calibration\n"); break; |
case 100: printf("\n WARNING CALORIMETER - Data with no associated calibration\n"); |
680 |
case 101: printf("\n WARNING CALORIMETER - No tracks or good events in this run\n"); break; |
case 101: printf("\n WARNING CALORIMETER - No tracks or good events in this run\n"); |
681 |
}; |
}; |
682 |
// |
// |
683 |
// Close the DB connection |
// Close the DB connection |