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

Diff of /YodaProfiler/src/YodaProfiler.cpp

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

revision 1.1.1.1 by mocchiut, Wed Aug 30 11:18:13 2006 UTC revision 1.11 by mocchiut, Fri Oct 20 11:11:12 2006 UTC
# Line 14  using namespace std; Line 14  using namespace std;
14  //  //
15  void usage(){  void usage(){
16    printf("\nUsage:\n");    printf("\nUsage:\n");
17    printf("\n YodaProfiler [-v | --verbose] [-h | --help] [--version] -rawFile raw_filename -yodaFile yoda_filename \n");    printf("\n YodaProfiler [options] -rawFile raw_filename -yodaFile yoda_filename \n");
18    printf("\n            [-host host] [-user username] [-psw password] \n");    printf("\n -rawFile        full path to the raw file\n");
19      printf("\n -yodaFile       full path to the YODA file\n");
20      printf("\n Options can be: \n");
21    printf("\n --version       print informations about compilation and exit\n");    printf("\n --version       print informations about compilation and exit\n");
22    printf("\n -h | --help     print this help and exit \n");    printf("\n -h | --help     print this help and exit \n");
23    printf("\n -v | --verbose  be verbose [default: print nothing on STDOUT]\n");    printf("\n -v | --verbose  be verbose [default]\n");
24      printf("\n -s | --silent   print nothing on STDOUT\n");
25    printf("\n -g | --debug    be very verbose [default: no]\n");    printf("\n -g | --debug    be very verbose [default: no]\n");
   printf("\n -rawFile        full path to the raw file\n");  
   printf("\n -yodaFile       full path to the YODA file\n");  
26    printf("\n -boot number    CPU boot number [default = taken from VarDump]\n");    printf("\n -boot number    CPU boot number [default = taken from VarDump]\n");
27    printf("\n -tsync number   timesync (s) [default = taken from data]\n");    printf("\n -tsync number   timesync (s) [default = taken from data]\n");
28    printf("\n -obt0 number    obt at timesync (ms) [default = taken from data]\n");    printf("\n -obt0 number    obt at timesync (ms) [default = taken from data]\n");
29    printf("\n -host           name for the host [default = mysql://localhost/pamelaprod]\n");    printf("\n -clean number   number in seconds after which the fragment table\n");
30    printf("\n -user           username for the DB [default = anonymous] \n");    printf("\n                 can be cleaned and runs validated [default = -1 do not clean],\n");
31    printf("\n -psw            password for the DB [default = \"\"]\n");    printf("\n                 if 0 force cleaning immediatly, if negative do not clean\n");
32    printf("\nExamples: \n");    printf("\n -host           name for the host [default = $PAM_DBHOST or mysql://localhost/pamelaprod]\n");
33    printf("\n YodaProfiler -rawFile /path/to/raw/files/000_000_00000_cln2.pam -yodaFile /path/to/filesfromyoda/000_000_00000_cln2.root \n\n");    printf("\n -user           username for the DB [default = $PAM_DBUSER or \"anonymous\"] \n");
34      printf("\n -psw            password for the DB [default = $PAM_DBPSW or \"\"]\n");
35      printf("\n -tle <file>     ascii file containing TLE obtained from celestrak.org or space-track.org [default = no]\n");
36      printf("\n The order of input files and options does not matter. \n");
37      printf("\nExample: \n");
38      printf("\n YodaProfiler -yodaFile /path/to/raw/files/000_000_00000_cln2.pam -rawFile /path/to/filesfromyoda/000_000_00000_cln2.root -v \n\n");
39  };  };
40  //  //
41  int main(int numinp, char *inps[]){  int main(int numinp, char *inps[]){
# Line 41  int main(int numinp, char *inps[]){ Line 47  int main(int numinp, char *inps[]){
47    UInt_t boot = 0;    UInt_t boot = 0;
48    UInt_t tsync = 0;    UInt_t tsync = 0;
49    UInt_t obt0 = 0;    UInt_t obt0 = 0;
50      //  Long64_t olderthan = 864000LL;
51      Long64_t olderthan = -1LL;
52      
53    //    //
54    //    //
55    TString filerawname;    TString filerawname  = "";
56      TString filerootname = "";
57    //    //
58    TString host;    TString host = "mysql://localhost/pamelaprod";
59    TString user;    TString user = "anonymous";
60    TString password;    TString password = "";
61      //
62      TString tlefilename = "";
63    
64      const char *pamdbhost = gSystem->Getenv("PAM_DBHOST");
65      const char *pamdbuser = gSystem->Getenv("PAM_DBUSER");
66      const char *pamdbpsw = gSystem->Getenv("PAM_DBPSW");
67      if ( !pamdbhost ) pamdbhost = "";
68      if ( !pamdbuser ) pamdbuser = "";
69      if ( !pamdbpsw ) pamdbpsw = "";
70      if ( strcmp(pamdbhost,"") ) host = pamdbhost;
71      if ( strcmp(pamdbuser,"") ) user = pamdbuser;
72      if ( strcmp(pamdbpsw,"") ) password = pamdbpsw;
73    //    //
   TString filerootname;  
74    //        //    
75    Bool_t beverbose = false;    Bool_t beverbose = true;
76    Bool_t debug = false;    Bool_t debug = false;
77      //
78    Int_t i = 0;    Int_t i = 0;
79    //    //
80    if ( numinp > 1 ){    if ( numinp > 1 ){
# Line 62  int main(int numinp, char *inps[]){ Line 84  int main(int numinp, char *inps[]){
84          exit(0);          exit(0);
85        };        };
86        if ( !strcmp(inps[i],"-h") || !strcmp(inps[i],"--help") ){        if ( !strcmp(inps[i],"-h") || !strcmp(inps[i],"--help") ){
87    
88          usage();          usage();
89          exit(0);          exit(0);
90        };        };
# Line 91  int main(int numinp, char *inps[]){ Line 114  int main(int numinp, char *inps[]){
114            usage();            usage();
115            exit(1);            exit(1);
116          };          };
117          tsync = atoi(inps[i+1]);                  tsync = (UInt_t)atoll(inps[i+1]);      
118        };        };
119        if ( !strcmp(inps[i],"-obt0") ) {        if ( !strcmp(inps[i],"-obt0") ) {
120          if ( numinp-1 < i+1 ){          if ( numinp-1 < i+1 ){
121            usage();            usage();
122            exit(1);            exit(1);
123          };          };
124          obt0 = atoi(inps[i+1]);          obt0 = (UInt_t)atoll(inps[i+1]);        
125          };
126          if ( !strcmp(inps[i],"-clean") ) {
127            if ( numinp-1 < i+1 ){
128              usage();
129              exit(1);
130            };
131            olderthan = (Long64_t)atoll(inps[i+1]);
132        };        };
133        if ( !strcmp(inps[i],"-host") ) {        if ( !strcmp(inps[i],"-host") ) {
134          if ( numinp-1 < i+1 ){          if ( numinp-1 < i+1 ){
# Line 121  int main(int numinp, char *inps[]){ Line 151  int main(int numinp, char *inps[]){
151          };          };
152          password = (TString)inps[i+1];            password = (TString)inps[i+1];  
153        };        };
154    
155          if ( !strcmp(inps[i],"-tle") ) {
156            if ( numinp-1 < i+1 ){
157              usage();
158              exit(1);
159            };
160            tlefilename = (TString)inps[i+1];
161          };
162    
163        //        //
164        if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true;        if ( !strcmp(inps[i],"-v") || !strcmp(inps[i],"--verbose") ) beverbose = true;
165        //        //
166          if ( !strcmp(inps[i],"-s") || !strcmp(inps[i],"--silent") ) beverbose = false;
167          //
168        if ( !strcmp(inps[i],"-g") || !strcmp(inps[i],"--debug") ) debug = true;        if ( !strcmp(inps[i],"-g") || !strcmp(inps[i],"--debug") ) debug = true;
169        //        //
170        i++;        i++;
# Line 151  int main(int numinp, char *inps[]){ Line 192  int main(int numinp, char *inps[]){
192    TString message;    TString message;
193    char *version = YodaProfilerInfo(false);    char *version = YodaProfilerInfo(false);
194    PamelaDBOperations *pamDB = 0;    PamelaDBOperations *pamDB = 0;
195    UInt_t sizeofwar = 10;    UInt_t sizeofwar = 11;
196    UInt_t WAR[10];    UInt_t WAR[11];
197    memset(WAR, 0, 10*sizeof(UInt_t));    memset(WAR, 0, 11*sizeof(UInt_t));
198    //    //
199    printf("\n Welcome to the PAMELA SuperYodaProfiler, version %s \n\n",version);    printf("\n Welcome to the PAMELA YodaProfiler, version %s \n\n",version);
200    try{    try{
201      //      //
202      //-------------------------------------------------------------------------------------------      //-------------------------------------------------------------------------------------------
203      // Create pamDB object and open SQL connection      // Create pamDB object and open SQL connection
204      //-------------------------------------------------------------------------------------------      //-------------------------------------------------------------------------------------------
205      if ( beverbose ) printf(" 1 => Create pamDB object and open SQL connection \n");      if ( beverbose ) printf(" 1 => Initialize and open SQL connection \n");
206      pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug);      pamDB = new PamelaDBOperations(host,user,password,filerawname,filerootname,boot,tsync,obt0,debug,tlefilename);
207      pamDB->CheckFile();      pamDB->CheckConnection();
     //-------------------------------------------------------------------------------------------  
     //  
     //-------------------------------------------------------------------------------------------  
     //Insert a Raw file in GL_RAW  
     //-------------------------------------------------------------------------------------------  
     if ( beverbose ) printf(" 2 => Insert a RAW file in GL_RAW \n");  
     WAR[0] = pamDB->insertPamelaRawFile();  
     //-------------------------------------------------------------------------------------------  
     //-------------------------------------------------------------------------------------------    
     //Update a single GL_RAW record with its BOOT_NUMBER  
     //-------------------------------------------------------------------------------------------  
     if ( beverbose ) printf(" 3 => Update a single GL_RAW record with its BOOT_NUMBER \n");  
     WAR[3] = pamDB->assignBOOT_NUMBER();  
     //    if ( WAR[3] ) pamDB->SetNOBOOT(true);  
     if ( WAR[3] && WAR[3] != 1 ) throw -9;  
208      //-------------------------------------------------------------------------------------------      //-------------------------------------------------------------------------------------------
209      //      //
210      //-------------------------------------------------------------------------------------------  
211      //Insert an entry in GL_TIMESYNC      if(pamDB->InsertRaw()){
212      //-------------------------------------------------------------------------------------------        //-------------------------------------------------------------------------------------------
213      if ( beverbose ) printf(" 4 => Insert an entry in GL_TIMESYNC \n");        //Insert a Raw file in GL_RAW
214      WAR[1] = pamDB->insertPamelaGL_TIMESYNC();        //-------------------------------------------------------------------------------------------
215      //-------------------------------------------------------------------------------------------        if ( beverbose ) printf(" 2 => Insert a RAW file in GL_RAW \n");
216          WAR[0] = pamDB->insertPamelaRawFile();
217          //-------------------------------------------------------------------------------------------
218        };
219    
220        if(pamDB->InsertRoot()){
221              
222          if(!pamDB->InsertRaw())printf("=> RAW file not inserted --- the DB might not ( yet ) be filled correctly \n");
223          pamDB->CheckFile();
224          //-------------------------------------------------------------------------------------------  
225          //Update a single GL_RAW record with its BOOT_NUMBER
226          //-------------------------------------------------------------------------------------------
227          if ( beverbose ) printf(" 3 => Update a single GL_RAW record with its BOOT_NUMBER \n");
228          WAR[3] = pamDB->assignBOOT_NUMBER();
229          //    if ( WAR[3] ) pamDB->SetNOBOOT(true);
230          if ( WAR[3] && WAR[3] != 1 ) throw -9;
231          //-------------------------------------------------------------------------------------------
232          //
233          //-------------------------------------------------------------------------------------------
234          //Insert an entry in GL_TIMESYNC
235          //-------------------------------------------------------------------------------------------
236          if ( beverbose ) printf(" 4 => Insert an entry in GL_TIMESYNC \n");
237          WAR[1] = pamDB->insertPamelaGL_TIMESYNC();
238          //-------------------------------------------------------------------------------------------
239          //
240          //-------------------------------------------------------------------------------------------
241          //Insert unpack ROOT file in GL_ROOT  
242          //-------------------------------------------------------------------------------------------
243          if ( beverbose ) printf(" 5 => Insert unpack ROOT file in GL_ROOT \n");
244          WAR[2] = pamDB->insertPamelaRootFile();
245          //-------------------------------------------------------------------------------------------
246          //
247          //-------------------------------------------------------------------------------------------      
248          //Insert in GL_RUN runs information records relative to a single unpack
249          //-------------------------------------------------------------------------------------------
250          if ( beverbose ) printf(" 6 => Scan physics and store runs in the GL_RUN table\n");
251          WAR[4] = pamDB->insertPamelaRUN();
252          //-------------------------------------------------------------------------------------------    
253            
254          //-------------------------------------------------------------------------------------------
255          //Insert in GL_CALO_CALIB calibration information records relative to a single unpack
256          //-------------------------------------------------------------------------------------------
257          if ( beverbose ) printf(" 7 => Insert calorimeter calibrations in the GL_CALO_CALIB table\n");
258          WAR[5] = pamDB->insertCALO_CALIB();
259          //-------------------------------------------------------------------------------------------    
260            
261          //-------------------------------------------------------------------------------------------
262          //Insert in GL_TRK_CALIB calibration information records relative to a single unpack
263          //-------------------------------------------------------------------------------------------
264          if ( beverbose ) printf(" 8 => Insert tracker calibrations in the GL_TRK_CALIB table\n");
265          WAR[6] = pamDB->insertTRK_CALIB();
266          //-------------------------------------------------------------------------------------------    
267            
268          //-------------------------------------------------------------------------------------------
269          //Insert in GL_S4_CALIB calibration information records relative to a single unpack
270          //-------------------------------------------------------------------------------------------
271          if ( beverbose ) printf(" 9 => Insert S4 calibrations in the GL_S4_CALIB table\n");
272          WAR[7] = pamDB->insertS4_CALIB();
273          //-------------------------------------------------------------------------------------------    
274        };
275      //      //
276      //-------------------------------------------------------------------------------------------      pamDB->CheckValidate(olderthan);
     //Insert unpack ROOT file in GL_ROOT    
     //-------------------------------------------------------------------------------------------  
     if ( beverbose ) printf(" 5 => Insert unpack ROOT file in GL_ROOT \n");  
     WAR[2] = pamDB->insertPamelaRootFile();  
     //-------------------------------------------------------------------------------------------  
277      //      //
278        if(pamDB->Validate()){  
279          //-------------------------------------------------------------------------------------------
280          //Clean the GL_RUN_FRAGMENTS
281          //-------------------------------------------------------------------------------------------
282          if ( beverbose ) printf(" 10 => Clean the GL_RUN_FRAGMENTS table (earlier than %s) \n",pamDB->GetCleanTime() );
283          WAR[8] = pamDB->CleanGL_RUN_FRAGMENTS();
284          //-------------------------------------------------------------------------------------------    
285            
286          //-------------------------------------------------------------------------------------------
287          //Validate runs
288          //-------------------------------------------------------------------------------------------
289          if ( beverbose ) printf(" 11 => Validate runs (earlier than %s)\n",pamDB->GetCleanTime());
290          WAR[9] = pamDB->ValidateRuns();
291          //-------------------------------------------------------------------------------------------    
292        };
293    
294      //-------------------------------------------------------------------------------------------            if(! tlefilename.IsNull() ) {
295      //Insert in GL_RUN runs information records relative to a single unpack        //----------------------------------------------
296      //-------------------------------------------------------------------------------------------        //Populate GL_TLE table using the file provided
297      if ( beverbose ) printf(" 6 => Scan physics and store runs in the GL_RUN table\n");        //----------------------------------------------
298      WAR[4] = pamDB->insertPamelaRUN();        if ( beverbose ) printf(" 12 => Insert TLE elements in the GL_TLE table from file %s \n",tlefilename.Data());
299      //-------------------------------------------------------------------------------------------            WAR[10] = pamDB->populateTLE();
300        }
301      //-------------------------------------------------------------------------------------------          
     //Insert in GL_CALO_CALIB calibration information records relative to a single unpack  
     //-------------------------------------------------------------------------------------------  
     if ( beverbose ) printf(" 7 => Insert calorimeter calibrations in the GL_CALO_CALIB table\n");  
     WAR[5] = pamDB->insertCALO_CALIB();  
     //-------------------------------------------------------------------------------------------      
   
     //-------------------------------------------------------------------------------------------  
     //Insert in GL_TRK_CALIB calibration information records relative to a single unpack  
     //-------------------------------------------------------------------------------------------  
     if ( beverbose ) printf(" 8 => Insert tracker calibrations in the GL_TRK_CALIB table\n");  
     WAR[6] = pamDB->insertTRK_CALIB();  
     //-------------------------------------------------------------------------------------------      
   
     //-------------------------------------------------------------------------------------------  
     //Insert in GL_S4_CALIB calibration information records relative to a single unpack  
     //-------------------------------------------------------------------------------------------  
     if ( beverbose ) printf(" 9 => Insert S4 calibrations in the GL_S4_CALIB table\n");  
     WAR[7] = pamDB->insertS4_CALIB();  
     //-------------------------------------------------------------------------------------------      
   
302    } catch (Int_t exc) {    } catch (Int_t exc) {
303      signal = exc;      signal = exc;
304      switch(exc){      switch(exc){
# Line 233  int main(int numinp, char *inps[]){ Line 308  int main(int numinp, char *inps[]){
308      case -4: message += " Error querying DB"; break;      case -4: message += " Error querying DB"; break;
309      case -5: message += " Inconsistent OBT/pkt_num"; break;      case -5: message += " Inconsistent OBT/pkt_num"; break;
310      case -6: message += " The file is not in the database"; break;      case -6: message += " The file is not in the database"; break;
311        case -7: message += " Cannot open TLE file"; break;
312      case -8: message += " Event file is empty"; break;      case -8: message += " Event file is empty"; break;
313      case -9: message += " No VarDump no BOOT number, use the -boot option to override"; break;      case -9: message += " No VarDump no BOOT number, use the -boot option to override"; break;
314      case -10: message += " No results from DB"; break;      case -10: message += " No results from DB"; break;
# Line 250  int main(int numinp, char *inps[]){ Line 326  int main(int numinp, char *inps[]){
326      case -22: message += " No CalibTrk1 tree in Level0 file"; break;      case -22: message += " No CalibTrk1 tree in Level0 file"; break;
327      case -23: message += " No CalibTrk2 tree in Level0 file"; break;      case -23: message += " No CalibTrk2 tree in Level0 file"; break;
328      case -24: message += " No CalibS4 tree in Level0 file"; break;      case -24: message += " No CalibS4 tree in Level0 file"; break;
329      case -97: message += " Missing runheader not recognized by HandleRun method"; break;      case -25: message += " Cannot find the run just inserted"; break;
330      case -99: message += " THIS CASE HAS NOT YET BEEN IMPLEMENTED"; break;      case -26: message += " Raw file not found looking for VarDump"; break;
331        case -27: message += " Cannot determine downlink orbit, wrong filename format?"; break;
332        case -28: message += " Cannot assign a RUN ID unique number!"; break;
333      default: message += " Unidentified error"; break;      default: message += " Unidentified error"; break;
334      };      };
335      printf("\n");      printf("\n");
# Line 271  int main(int numinp, char *inps[]){ Line 349  int main(int numinp, char *inps[]){
349          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
350            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
351              if ( bit == 0 ) message += "=> RAW file already inserted\n";              if ( bit == 0 ) message += "=> RAW file already inserted\n";
352              else message += "=> Unidentified warning\n";              else message += "=> Unidentified insertPamelaRaw warning\n";
353            };            };
354          };          };
355        };        };
# Line 280  int main(int numinp, char *inps[]){ Line 358  int main(int numinp, char *inps[]){
358          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
359            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
360              if ( bit == 0 ) message += "=> TIMESYNC already inserted\n";              if ( bit == 0 ) message += "=> TIMESYNC already inserted\n";
361              if ( bit == 1 ) message += "=> No mcmd timesync in the file\n";              else if ( bit == 1 ) message += "=> No mcmd timesync in the file\n";
362              else  message += "=> Unidentified warning\n";              else if ( bit == 2 ) message += "=> No runheaders in the file\n";
363                else if ( bit == 3 ) message += "=> No runtrailers in the file\n";
364                else if ( bit == 4 ) message += "=> No mcmd inclination in the file\n";
365                else  message += "=> Unidentified insertTimeSync warning\n";
366            };            };
367          };          };
368        };        };
# Line 290  int main(int numinp, char *inps[]){ Line 371  int main(int numinp, char *inps[]){
371          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
372            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
373              if ( bit == 0 ) message += "=> ROOT file already inserted\n";              if ( bit == 0 ) message += "=> ROOT file already inserted\n";
374              else message += "=> Unidentified warning\n";              else message += "=> Unidentified insertPamelaRoot warning\n";
375            };            };
376          };          };
377        };        };
# Line 298  int main(int numinp, char *inps[]){ Line 379  int main(int numinp, char *inps[]){
379        if ( j == 3 ){ // assignBOOTnumber warnings        if ( j == 3 ){ // assignBOOTnumber warnings
380          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
381            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
382              if ( bit == 0 ) message += "=> BOOT number already inserted\n";              if ( bit == 0 ) message += "=> BOOT number already inserted\n";//
383              if ( bit == 1 ) message += "=> VarDump event tree is empty, use the -boot option to override\n";              else if ( bit == 1 ) message += "=> VarDump event tree is empty, use the -boot option to override\n";//
384              if ( bit == 2 ) message += "=> No BOOT number in VarDump(!), use the -boot option to override\n";              else if ( bit == 2 ) message += "=> No BOOT number in VarDump(!), use the -boot option to override\n";//
385              if ( bit == 3 ) message += "=> Raw file not found looking for VarDump, use the -boot option to override\n";              else if ( bit == 4 ) message += "=> The file is not in the database looking for VarDump, use the -boot option to override\n";//
386              if ( bit == 4 ) message += "=> The file is not in the database looking for VarDump, use the -boot option to override\n";              else message += "=> Unidentified assignBOOTnumber warning\n";
             else message += "=> Unidentified warning\n";  
387            };            };
388          };          };
389        };        };
# Line 311  int main(int numinp, char *inps[]){ Line 391  int main(int numinp, char *inps[]){
391        if ( j == 4 ){ // insertPamelaRUN        if ( j == 4 ){ // insertPamelaRUN
392          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
393            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
394              if      ( bit == 0 ) message += "=> bah already inserted\n";              if      ( bit == 0 ) message += "=> Inconsistent PKT/OBT sequence\n";
395              else if ( bit == 1 ) message += "=> boh already inserted\n";              else if ( bit == 1 ) message += "=> No physics events in the file\n";
396              else  message += "=> Unidentified warning\n";              else if ( bit == 2 ) message += "=> Less than 2 physics events in the file\n";
397                else  message += "=> Unidentified insertPamelaRun warning\n";
398            };            };
399          };          };
400        };        };
# Line 321  int main(int numinp, char *inps[]){ Line 402  int main(int numinp, char *inps[]){
402        if ( j == 5 ){ // insertCALO_CALIB        if ( j == 5 ){ // insertCALO_CALIB
403          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
404            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
405              if      ( bit == 0 ) message += "=> bah already inserted\n";              if      ( bit == 0 ) message += "=> No calorimeter calibrations in the file\n";
406              else if ( bit == 1 ) message += "=> boh already inserted\n";              else  message += "=> Unidentified insertCaloCalib warning\n";
             else  message += "=> Unidentified warning\n";  
407            };            };
408          };          };
409        };        };
# Line 332  int main(int numinp, char *inps[]){ Line 412  int main(int numinp, char *inps[]){
412        if ( j == 6 ){ // insertTRACKER_CALIB        if ( j == 6 ){ // insertTRACKER_CALIB
413          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
414            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
415              if      ( bit == 0 ) message += "=> bah already inserted\n";              if      ( bit == 0 ) message += "=> No tracker calibrations in the file\n";
416              else if ( bit == 1 ) message += "=> boh already inserted\n";              else  message += "=> Unidentified insertTrkCalib warning\n";
             else  message += "=> Unidentified warning\n";  
417            };            };
418          };          };
419        };        };
# Line 343  int main(int numinp, char *inps[]){ Line 422  int main(int numinp, char *inps[]){
422        if ( j == 7 ){ // insertS4_CALIB        if ( j == 7 ){ // insertS4_CALIB
423          for (UInt_t bit=0; bit<32; bit++){          for (UInt_t bit=0; bit<32; bit++){
424            if ( WAR[j] & (1 << bit) ){            if ( WAR[j] & (1 << bit) ){
425              if      ( bit == 0 ) message += "=> bah already inserted\n";              if      ( bit == 0 ) message += "=> No s4 calibrations in the file\n";
426              else if ( bit == 1 ) message += "=> boh already inserted\n";              else  message += "=> Unidentified insertS4calib warning\n";
             else  message += "=> Unidentified warning\n";  
427            };            };
428          };          };
429        };        };
430        //        //
431          //
432          if ( j == 8 ){ // CleanGL_RUN_FRAGMENTS
433            for (UInt_t bit=0; bit<32; bit++){
434              if ( WAR[j] & (1 << bit) ){
435                if      ( bit == 0 ) message += "=> Skip the GL_RUN_FRAGMENTS table cleaning\n";
436                else  message += "=> Unidentified CleanGL_RUN_FRAGMENTS warning\n";
437              };
438            };
439          };
440          //
441          if ( j == 9 ){ // ValidateRuns
442            for (UInt_t bit=0; bit<32; bit++){
443              if ( WAR[j] & (1 << bit) ){
444                if      ( bit == 0 ) message += "=> Skip the run validation \n";
445                else  message += "=> Unidentified ValidateRuns warning\n";
446              };
447            };
448          };
449          //
450          if ( j == 10 ){ // populateTLE
451            for (UInt_t bit=0; bit<32; bit++){
452              if ( WAR[j] & (1 << bit) ){
453                if      ( bit == 0 ) message += "=> TLE insertion failed\n";
454                if      ( bit == 1 ) message += "=> No new TLE available\n";
455                else  message += "=> Unidentified populateTle warning\n";
456              };
457            };
458          };
459      };      };
460    };    };
461    //    //
# Line 363  int main(int numinp, char *inps[]){ Line 469  int main(int numinp, char *inps[]){
469    //---------------------------------------------------------------------------------------    //---------------------------------------------------------------------------------------
470    // Close and exit    // Close and exit
471    //---------------------------------------------------------------------------------------    //---------------------------------------------------------------------------------------
472      if ( beverbose ) printf(" 13 => Free objects and close SQL connection \n");
473    pamDB->Close();    pamDB->Close();
474    //    //
475    printf("\n");    printf("\n");

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

  ViewVC Help
Powered by ViewVC 1.1.23