38 |
printf("\n [-host host] [-user username] [-psw password] [+-all] [+-detector [ detector options ] ]\n"); |
printf("\n [-host host] [-user username] [-psw password] [+-all] [+-detector [ detector options ] ]\n"); |
39 |
printf("\n --version print informations about compilation and exit\n"); |
printf("\n --version print informations about compilation and exit\n"); |
40 |
printf("\n -h | --help print this help and exit \n"); |
printf("\n -h | --help print this help and exit \n"); |
41 |
printf("\n -v | --verbose be verbose [default: print nothing on STDOUT]\n"); |
printf("\n -v | --verbose be verbose [default]\n"); |
42 |
|
printf("\n -s | --silent print nothing on STDOUT\n"); |
43 |
|
printf("\n -c | --clean remove file if exiting with errors\n"); |
44 |
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"); |
45 |
printf("\n -processFile output filename [default ID_RUN.Level2.root]\n"); |
printf("\n -processFile output filename [default ID_RUN.Level2.root]\n"); |
46 |
printf("\n -host name for the host [default = mysql://localhost/pamelaprod]\n"); |
printf("\n -auto | -AUTO exclude from processing detector which are NOT in the acquisition [default]\n"); |
47 |
printf("\n -user username for the DB [default = anonymous] \n"); |
printf("\n -zerofill if a detector is not in the acquisition the routine is called anyway \n"); |
48 |
printf("\n -psw password for the DB [default = \"\"]\n"); |
printf("\n but all detector's data will be marked as bad\n"); |
49 |
|
printf("\n -tedious exit with error if a detector is not in the acquisition and \n"); |
50 |
|
printf("\n it has not been excluded from processing\n"); |
51 |
|
printf("\n -host name for the host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n"); |
52 |
|
printf("\n -user username for the DB [default = $PAM_DBUSER or \"anonymous\"] \n"); |
53 |
|
printf("\n -psw password for the DB [default = $PAM_DBPSW or \"\"]\n"); |
54 |
printf("\n +all | +ALL call all detectors software [default]\n"); |
printf("\n +all | +ALL call all detectors software [default]\n"); |
55 |
printf("\n -all | -ALL call nothing\n"); |
printf("\n -all | -ALL call nothing\n"); |
56 |
printf("\n +detector process detector; detector can be: TOF,TRK,CAL,TRG,ORB,S4,ND,AC,RUN\n"); |
printf("\n +detector process detector; detector can be: TOF,TRK,CAL,TRG,ORB,S4,ND,AC,RUN\n"); |
57 |
printf("\n -detector do not process detector (as above)\n"); |
printf("\n -detector do not process detector (as above)\n"); |
58 |
printf("\n detector options must be included in square parenthesis with spaces, for example:\n"); |
printf("\n detector options must be included in square parenthesis with spaces, for example:\n"); |
59 |
printf("\n +CAL [ --verbose -g ] +TRK [ -v --level1 ] \n"); |
printf("\n +CAL [ --verbose -g ] +TRK [ -v --level1 ] \n"); |
|
|
|
60 |
printf("\nExamples: \n"); |
printf("\nExamples: \n"); |
61 |
printf("\nStandard call: DarthVader -idRun 1085 \n"); |
printf("\nStandard call: DarthVader -idRun 1085 \n"); |
62 |
printf("\nProcess only RunInfo and Tracker (be verbose for tracker): DarthVader -idRun 1085 -all +RUN +TRK [ --verbose ] \n"); |
printf("\nProcess only RunInfo and Tracker (be verbose for tracker): DarthVader -idRun 1085 -all +RUN +TRK [ --verbose ] \n"); |
82 |
Int_t ACSGN = 0; |
Int_t ACSGN = 0; |
83 |
Int_t S4SGN = 0; |
Int_t S4SGN = 0; |
84 |
Int_t NDSGN = 0; |
Int_t NDSGN = 0; |
85 |
|
Int_t DVSGN = 0; |
86 |
// |
// |
87 |
|
Bool_t autom = true; |
88 |
|
Bool_t zerofill = false; |
89 |
|
Bool_t tedious = false; |
90 |
|
Bool_t remfile = false; |
91 |
Bool_t debug = false; |
Bool_t debug = false; |
92 |
Bool_t beverbose = false; |
Bool_t beverbose = true; |
93 |
Bool_t givenid = false; |
Bool_t givenid = false; |
94 |
Bool_t CAL = true; |
Bool_t CAL = true; |
95 |
Bool_t TRK = true; |
Bool_t TRK = true; |
132 |
TString user = "anonymous"; |
TString user = "anonymous"; |
133 |
TString psw = ""; |
TString psw = ""; |
134 |
// |
// |
135 |
|
// |
136 |
|
const char *pamdbhost=gSystem->Getenv("PAM_DBHOST"); |
137 |
|
const char *pamdbuser=gSystem->Getenv("PAM_DBUSER"); |
138 |
|
const char *pamdbpsw=gSystem->Getenv("PAM_DBPSW"); |
139 |
|
if ( !pamdbhost ) pamdbhost = ""; |
140 |
|
if ( !pamdbuser ) pamdbuser = ""; |
141 |
|
if ( !pamdbpsw ) pamdbpsw = ""; |
142 |
|
if ( strcmp(pamdbhost,"") ) host = pamdbhost; |
143 |
|
if ( strcmp(pamdbuser,"") ) user = pamdbuser; |
144 |
|
if ( strcmp(pamdbpsw,"") ) psw = pamdbpsw; |
145 |
|
// |
146 |
|
// |
147 |
TFile *processFile = 0; |
TFile *processFile = 0; |
148 |
// |
// |
149 |
// Checking input parameters |
// Checking input parameters |
220 |
found = true; |
found = true; |
221 |
beverbose = true; |
beverbose = true; |
222 |
}; |
}; |
223 |
// |
if ( !strcmp(inps[i],"-c") || !strcmp(inps[i],"--clean")){ |
224 |
|
found = true; |
225 |
|
remfile = true; |
226 |
|
}; |
227 |
|
if ( !strcmp(inps[i],"-s") || !strcmp(inps[i],"--silent") ){ |
228 |
|
found = true; |
229 |
|
beverbose = false; |
230 |
|
}; |
231 |
if ( !strcmp(inps[i],"-g") || !strcmp(inps[i],"--debug") ){ |
if ( !strcmp(inps[i],"-g") || !strcmp(inps[i],"--debug") ){ |
232 |
debug = true; |
debug = true; |
233 |
found = true; |
found = true; |
234 |
}; |
}; |
235 |
|
if ( !strcmp(inps[i],"-auto") || !strcmp(inps[i],"-AUTO") ){ |
236 |
|
autom = true; |
237 |
|
tedious = false; |
238 |
|
zerofill = false; |
239 |
|
found = true; |
240 |
|
}; |
241 |
|
if ( !strcmp(inps[i],"-zerofill") ){ |
242 |
|
tedious = false; |
243 |
|
autom = false; |
244 |
|
zerofill = true; |
245 |
|
found = true; |
246 |
|
}; |
247 |
|
if ( !strcmp(inps[i],"-tedious") ){ |
248 |
|
tedious = true; |
249 |
|
zerofill = false; |
250 |
|
autom = false; |
251 |
|
found = true; |
252 |
|
}; |
253 |
// |
// |
254 |
if ( !strcmp(inps[i],"-CAL") ) { |
if ( !strcmp(inps[i],"-CAL") ) { |
255 |
found = true; |
found = true; |
504 |
// |
// |
505 |
if ( !givenid ) throw -1; |
if ( !givenid ) throw -1; |
506 |
// |
// |
507 |
char *version = DarthVaderInfo(false); |
TString version = DarthVaderInfo(false); |
508 |
// |
// |
509 |
// Start: |
// Start: |
510 |
// |
// |
511 |
printf("\n Welcome to the PAMELA LEVEL2 flight software, version %s \n\n",version); |
printf("\n Welcome to the PAMELA LEVEL2 flight software, version %s \n\n",version.Data()); |
512 |
// |
// |
513 |
// Connect to the DB |
// Connect to the DB |
514 |
// |
// |
523 |
// |
// |
524 |
if ( debug ) printf("...connected! \n\n"); |
if ( debug ) printf("...connected! \n\n"); |
525 |
// |
// |
526 |
|
// Use UTC in the DB |
527 |
|
// |
528 |
|
stringstream myquery; |
529 |
|
myquery.str(""); |
530 |
|
myquery << "SET time_zone='+0:00'"; |
531 |
|
dbc->Query(myquery.str().c_str()); |
532 |
|
// |
533 |
|
// |
534 |
// Create LEVEL2 filename and open it in update mode |
// Create LEVEL2 filename and open it in update mode |
535 |
// |
// |
536 |
if ( filename.IsNull() ){ |
if ( filename.IsNull() ){ |
542 |
filename += strun.str(); |
filename += strun.str(); |
543 |
filename += ".Level2.root"; |
filename += ".Level2.root"; |
544 |
}; |
}; |
|
// filename = outDir + "/" + filename; |
|
545 |
processFile = new TFile(filename.Data(),"UPDATE"); |
processFile = new TFile(filename.Data(),"UPDATE"); |
546 |
if ( !processFile->IsOpen() ) throw -15; |
if ( !processFile->IsOpen() ) throw -15; |
547 |
// |
// |
548 |
// Run the core program, put any output error in the "error" variable |
// Run the core program, put any output error in the "error" variable |
549 |
// |
// |
550 |
|
printf("\n\n Pre-processing:\n\n"); |
551 |
|
// |
552 |
if ( RUN ) { |
if ( RUN ) { |
553 |
printf(" Calling RunInfo... "); |
printf(" Retrieve, if the case, the RUN informations from the DB...\n"); |
554 |
RUNSGN = RunInfoCore(run,processFile,dbc,runargc,runargv); |
printf(" RunInfo called\n"); |
555 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start RunInfoCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
556 |
|
RUNSGN = RunInfoCore(run,processFile,dbc,version,runargc,runargv); |
557 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end RunInfoCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
558 |
|
printf(" ...done\n"); |
559 |
}; |
}; |
560 |
// |
// |
561 |
// From the Run Infos extract acq_var_info to determine if detectors are in the acquisition or not |
// From the Run Infos extract acq_var_info to determine if detectors are in the acquisition or not |
562 |
// |
// |
563 |
printf(" Checking if requested detectors are in the acquisition\n"); |
printf(" Checking if requested detectors are in the acquisition\n"); |
564 |
ItoRunInfo *runinfo = new ItoRunInfo(processFile); |
ItoRunInfo *runinfo = new ItoRunInfo(processFile); |
565 |
runinfo->Read(run); |
Int_t sgnl = runinfo->Read(run); |
566 |
|
if ( sgnl != 0 ) throw -17; |
567 |
printf(" => ACQ_VAR_INFO = %i \n",runinfo->ACQ_VAR_INFO); |
printf(" => ACQ_VAR_INFO = %i \n",runinfo->ACQ_VAR_INFO); |
568 |
if ( TRK && !(runinfo->ACQ_VAR_INFO & (1 << 4)) ) throw -16; |
if ( TRK && !(runinfo->ACQ_VAR_INFO & (1 << 4)) ){ |
569 |
if ( TOF && !(runinfo->ACQ_VAR_INFO & (1 << 0)) ) throw -17; |
DVSGN += 1; |
570 |
if ( CAL && !(runinfo->ACQ_VAR_INFO & (1 << 3)) ) throw -18; |
if ( tedious ) throw -30; |
571 |
if ( AC && !(runinfo->ACQ_VAR_INFO & (1 << 1)) && !(runinfo->ACQ_VAR_INFO & (1 << 2)) ) throw -19; |
if ( autom ){ |
572 |
if ( S4 && !(runinfo->ACQ_VAR_INFO & (1 << 5)) ) throw -20; |
TRK = 0; |
573 |
if ( ND && !(runinfo->ACQ_VAR_INFO & (1 << 9)) ) throw -21; |
printf(" TRK excluded from processing \n"); |
574 |
printf(" OK! start processing detector's data. \n"); |
}; |
575 |
|
if ( zerofill ) printf(" TRK is not in the acquisition! \n"); |
576 |
|
}; |
577 |
|
if ( TOF && !(runinfo->ACQ_VAR_INFO & (1 << 0)) ){ |
578 |
|
DVSGN += 2; |
579 |
|
if ( tedious ) throw -31; |
580 |
|
if ( autom ){ |
581 |
|
TOF = 0; |
582 |
|
printf(" TOF excluded from processing \n"); |
583 |
|
}; |
584 |
|
if ( zerofill ) printf(" TOF is not in the acquisition! \n"); |
585 |
|
}; |
586 |
|
if ( CAL && !(runinfo->ACQ_VAR_INFO & (1 << 3)) ){ |
587 |
|
DVSGN += 4; |
588 |
|
if ( tedious ) throw -32; |
589 |
|
if ( autom ){ |
590 |
|
CAL = 0; |
591 |
|
printf(" CAL excluded from processing \n"); |
592 |
|
}; |
593 |
|
if ( zerofill ) printf(" CAL is not in the acquisition! \n"); |
594 |
|
}; |
595 |
|
if ( AC && (!(runinfo->ACQ_VAR_INFO & (1 << 1)) || !(runinfo->ACQ_VAR_INFO & (1 << 2))) ){ |
596 |
|
DVSGN += 8; |
597 |
|
if ( tedious ) throw -33; |
598 |
|
if ( autom ){ |
599 |
|
AC = 0; |
600 |
|
printf(" AC excluded from processing \n"); |
601 |
|
}; |
602 |
|
if ( zerofill ) printf(" AC is not in the acquisition! \n"); |
603 |
|
}; |
604 |
|
if ( S4 && !(runinfo->ACQ_VAR_INFO & (1 << 5)) ){ |
605 |
|
DVSGN += 16; |
606 |
|
if ( tedious ) throw -34; |
607 |
|
if ( autom ){ |
608 |
|
S4 = 0; |
609 |
|
printf(" S4 excluded from processing \n"); |
610 |
|
}; |
611 |
|
if ( zerofill ) printf(" S4 is not in the acquisition! \n"); |
612 |
|
}; |
613 |
|
if ( ND && !(runinfo->ACQ_VAR_INFO & (1 << 9)) ){ |
614 |
|
DVSGN += 32; |
615 |
|
if ( tedious ) throw -35; |
616 |
|
if ( autom ){ |
617 |
|
ND = 0; |
618 |
|
printf(" ND excluded from processing \n"); |
619 |
|
}; |
620 |
|
if ( zerofill ) printf(" ND is not in the acquisition! \n"); |
621 |
|
}; |
622 |
|
// |
623 |
|
if ( !DVSGN ){ |
624 |
|
printf(" OK! Start processing detector's data. \n"); |
625 |
|
} else { |
626 |
|
printf(" WARNING! missing detector(s)! Start anyway processing detector's data. \n"); |
627 |
|
}; |
628 |
|
printf("\n End pre-processing \n\n"); |
629 |
// |
// |
630 |
if ( TRK ) { |
if ( TRK ) { |
631 |
printf(" Calling TrackerLevel2... "); |
printf(" TrackerLevel2 called\n"); |
632 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start TrkCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
633 |
TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv); |
TRKSGN = TrkCore(run,processFile,dbc,trkargc,trkargv); |
634 |
printf("done\n"); |
gSystem->Unlink("TrackerFolder"); //patch |
635 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end TrkCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
636 |
}; |
}; |
637 |
if ( TOF ) { |
if ( TOF ) { |
638 |
printf(" Calling ToFLevel2... "); |
printf(" ToFLevel2 called\n"); |
639 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start ToFCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
640 |
TOFSGN = ToFCore(run,processFile,dbc,tofargc,tofargv); |
TOFSGN = ToFCore(run,processFile,dbc,tofargc,tofargv); |
641 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end ToFCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
642 |
}; |
}; |
643 |
if ( CAL ) { |
if ( CAL ) { |
644 |
printf(" Calling CalorimeterLevel2... "); |
printf(" CalorimeterLevel2 called\n"); |
645 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start CaloCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
646 |
CALSGN = CaloCore(run,processFile,dbc,calargc,calargv); |
CALSGN = CaloCore(run,processFile,dbc,calargc,calargv); |
647 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end CaloCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
648 |
}; |
}; |
649 |
if ( TRG ) { |
if ( TRG ) { |
650 |
printf(" Calling TriggerLevel2... "); |
printf(" TriggerLevel2 called\n"); |
651 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start TrigCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
652 |
TRGSGN = TrigCore(run,processFile,dbc,trgargc,trgargv); |
TRGSGN = TrigCore(run,processFile,dbc,trgargc,trgargv); |
653 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end TrigCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
654 |
}; |
}; |
655 |
if ( AC ) { |
if ( AC ) { |
656 |
printf(" Calling AnticounterLevel2... "); |
printf(" AnticounterLevel2 called\n"); |
657 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start AcCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
658 |
ACSGN = AcCore(run,processFile,dbc,acargc,acargv); |
ACSGN = AcCore(run,processFile,dbc,acargc,acargv); |
659 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end AcCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
660 |
}; |
}; |
661 |
if ( S4 ) { |
if ( S4 ) { |
662 |
printf(" Calling S4Level2 ... "); |
printf(" S4Level2 called\n"); |
663 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start S4Core STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
664 |
S4SGN = S4Core(run,processFile,dbc,s4argc,s4argv); |
S4SGN = S4Core(run,processFile,dbc,s4argc,s4argv); |
665 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end S4Core STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
666 |
}; |
}; |
667 |
if ( ND ) { |
if ( ND ) { |
668 |
printf(" Calling NDLevel2... "); |
printf(" NDLevel2 called\n"); |
669 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start NDCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
670 |
NDSGN = NDCore(run,processFile,dbc,ndargc,ndargv); |
NDSGN = NDCore(run,processFile,dbc,ndargc,ndargv); |
671 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end NDCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
672 |
}; |
}; |
673 |
if ( ORB ) { |
if ( ORB ) { |
674 |
printf(" Calling OrbitalInfo... "); |
printf(" OrbitalInfo called\n"); |
675 |
|
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| start OrbitalInfoCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
676 |
ORBSGN = OrbitalInfoCore(run,processFile,dbc,orbargc,orbargv); |
ORBSGN = OrbitalInfoCore(run,processFile,dbc,orbargc,orbargv); |
677 |
printf("done\n"); |
if ( debug ) printf(" >>>>>>>>>>>>>>>>>>>| end OrbitalInfoCore STDOUT |<<<<<<<<<<<<<<<<<<<\n"); |
678 |
}; |
}; |
679 |
// |
// |
680 |
} catch(Int_t signal) { |
} catch(Int_t signal) { |
690 |
case -8: message += " No Header branch in LEVEL0 Physics tree"; break; |
case -8: message += " No Header branch in LEVEL0 Physics tree"; break; |
691 |
case -9: message += " No Registry branch in LEVEL0 Physics tree"; break; |
case -9: message += " No Registry branch in LEVEL0 Physics tree"; break; |
692 |
case -11: message += " LEVEL0 Physics tree is empty"; break; |
case -11: message += " LEVEL0 Physics tree is empty"; break; |
693 |
case -12: message += " Too few entries in the registry tree"; break; |
case -12: message += " Too few entries in the tree"; break; |
694 |
case -13: message += " Cannot create processFolder directory"; break; |
case -13: message += " Cannot create processFolder directory"; break; |
695 |
case -14: message += " Error querying the DB"; break; |
case -14: message += " Error querying the DB"; break; |
696 |
case -15: message += " Cannot open file for writing"; break; |
case -15: message += " Cannot open file for writing"; break; |
697 |
case -16: message += " No tracker in the acquisition (use -TRK to process anyway)"; break; |
case -17: message += " Error during pre-processing"; 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; |
|
698 |
case -22: message += " Unknown input or wrong syntax in input paramters!"; break; |
case -22: message += " Unknown input or wrong syntax in input paramters!"; break; |
699 |
|
case -30: message += " No TRK in the acquisition"; break; |
700 |
|
case -31: message += " No TOF in the acquisition"; break; |
701 |
|
case -32: message += " No CAL in the acquisition"; break; |
702 |
|
case -33: message += " No AC in the acquisition"; break; |
703 |
|
case -34: message += " No S4 in the acquisition"; break; |
704 |
|
case -35: message += " No ND in the acquisition"; break; |
705 |
// |
// |
706 |
case -50: message += " GLTABLES - No entries matching GL_RUN query"; break; |
case -50: message += " GLTABLES - No entries matching GL_RUN query"; break; |
707 |
case -51: message += " GLTABLES - No entries matching GL_ROOT query"; break; |
case -51: message += " GLTABLES - No entries matching GL_ROOT query"; break; |
724 |
case -111: message += " CALORIMETERLEVEL2 - Corrupted calibration"; break; |
case -111: message += " CALORIMETERLEVEL2 - Corrupted calibration"; break; |
725 |
case -112: message += " CALORIMETERLEVEL2 - No physics event related to registry entry in Level0 file"; break; |
case -112: message += " CALORIMETERLEVEL2 - No physics event related to registry entry in Level0 file"; break; |
726 |
case -113: message += " CALORIMETERLEVEL2 - No tracker event related to registry entry in Level2 file"; break; |
case -113: message += " CALORIMETERLEVEL2 - No tracker event related to registry entry in Level2 file"; break; |
727 |
|
case -114: message += " CALORIMETERLEVEL2 - Help called"; break; |
728 |
|
case -115: message += " CALORIMETERLEVEL2 - No Calorimeter bad strip offline mask file"; break; |
729 |
// |
// |
730 |
case -200: message += " TRACKERLEVEL2 - LEVEL1 framework unknown (HBOOK/ROOT)"; break; |
case -200: message += " TRACKERLEVEL2 - LEVEL1 framework unknown (HBOOK/ROOT)"; break; |
731 |
case -201: message += " TRACKERLEVEL2 - LEVEL2 framework unknown (HBOOK/ROOT)"; break; |
case -201: message += " TRACKERLEVEL2 - LEVEL2 framework unknown (HBOOK/ROOT)"; break; |
761 |
case -601: message += " NDLEVEL2 - Cannot open file for writing"; break; |
case -601: message += " NDLEVEL2 - Cannot open file for writing"; break; |
762 |
case -603: message += " NDLEVEL2 - No S4Level2 branch in Level0 tree"; break; |
case -603: message += " NDLEVEL2 - No S4Level2 branch in Level0 tree"; break; |
763 |
// |
// |
764 |
case -701: message += " NDLEVEL2 - Cannot open file for writing"; break; |
case -701: message += " ACLEVEL2 - Cannot open file for writing"; break; |
765 |
case -704: message += " NDLEVEL2 - No Anticounter branch in Level0 tree"; break; |
case -704: message += " ACLEVEL2 - No Anticounter branch in Level0 tree"; break; |
766 |
// |
// |
767 |
case -800: message += " RUNINFO - No such run in the RunInfo list"; break; |
case -800: message += " RUNINFO - No such run in the RunInfo list"; break; |
768 |
case -801: message += " RUNINFO - No RunInfo tree in Level2 file"; break; |
case -801: message += " RUNINFO - No RunInfo tree in Level2 file"; break; |
777 |
printf("\n"); |
printf("\n"); |
778 |
if ( signal < 0 ) cout << " ERROR ("<< signal << ") "<< message <<endl; |
if ( signal < 0 ) cout << " ERROR ("<< signal << ") "<< message <<endl; |
779 |
} |
} |
780 |
// switch(RUNSGN){ |
// |
781 |
// }; |
// Warnings from XCore routines and from DV: |
782 |
|
// |
783 |
|
if ( debug && DVSGN ) printf(" DVSGN = %i \n",DVSGN); |
784 |
|
if ( DVSGN ) printf("\n WARNING DarthVader: \n"); |
785 |
|
if ( DVSGN & (1 << 0) ) printf(" - No tracker in the acquisition\n"); |
786 |
|
if ( DVSGN & (1 << 1) ) printf(" - No ToF in the acquisition\n"); |
787 |
|
if ( DVSGN & (1 << 2) ) printf(" - No calorimeter in the acquisition\n"); |
788 |
|
if ( DVSGN & (1 << 3) ) printf(" - No anticounters in the acquisition\n"); |
789 |
|
if ( DVSGN & (1 << 4) ) printf(" - No S4 in the acquisition\n"); |
790 |
|
if ( DVSGN & (1 << 5) ) printf(" - No neutron detector in the acquisition\n"); |
791 |
|
// |
792 |
|
// CaloCore: |
793 |
|
// |
794 |
switch(CALSGN){ |
switch(CALSGN){ |
795 |
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"); |
796 |
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"); |
797 |
}; |
}; |
798 |
// |
// |
799 |
|
// no other at the moment |
800 |
|
// |
801 |
|
// |
802 |
// Close the DB connection |
// Close the DB connection |
803 |
// |
// |
804 |
if ( dbc ){ |
if ( dbc ){ |
812 |
}; |
}; |
813 |
// |
// |
814 |
if ( error != 0 ) printf("\n\n WARNING: exiting with signal %i \n\n",error); |
if ( error != 0 ) printf("\n\n WARNING: exiting with signal %i \n\n",error); |
815 |
printf("\n"); |
// |
816 |
printf("Finished, exiting...\n"); |
// |
817 |
printf("\n"); |
// |
818 |
|
if ( remfile && error < 0 ){ |
819 |
|
printf(" -c or --clean option used, deleting file %s \n\n",filename.Data()); |
820 |
|
gSystem->Unlink(filename.Data()); |
821 |
|
}; |
822 |
|
// |
823 |
|
printf("\n Finished, exiting...\n\n"); |
824 |
// |
// |
825 |
// Close redirection if the case. |
// Close redirection if the case. |
826 |
// |
// |