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

Diff of /YodaProfiler/src/PamelaDBOperations.cpp

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

revision 1.34 by mocchiut, Mon Apr 30 08:52:19 2007 UTC revision 1.39 by mocchiut, Mon Apr 30 10:23:36 2007 UTC
# Line 447  Int_t PamelaDBOperations::SetUpperLimits Line 447  Int_t PamelaDBOperations::SetUpperLimits
447          if ( t_pktlast < upperpkt && t_obtlast < upperobt && t_pktlast < upperpkt2 && t_obtlast < upperobt2 ){          if ( t_pktlast < upperpkt && t_obtlast < upperobt && t_pktlast < upperpkt2 && t_obtlast < upperobt2 ){
448            zomp = i + jump + 1;            zomp = i + jump + 1;
449            if ( zomp > nevent-2 ) zomp = nevent - 2;            if ( zomp > nevent-2 ) zomp = nevent - 2;
450            if ( IsDebug() ) printf(" .-. jump %i zomp %i upperpkt %lld pktlast %i upperobt %lld obtlast %u last entry is %i \n",jump,zomp,upperpkt,pktlast,upperobt,obtlast,i);            if ( IsDebug() ) printf(" .-. jump %i zomp %i upperpkt %lld pktlast %u upperobt %lld obtlast %u last entry is %i \n",jump,zomp,upperpkt,pktlast,upperobt,obtlast,i);
451            break;            break;
452          };          };
453          //          //
# Line 1549  Int_t PamelaDBOperations::insertPamelaRU Line 1549  Int_t PamelaDBOperations::insertPamelaRU
1549        //        //
1550        if ( !ptt &&  !(ptht+1) ){        if ( !ptt &&  !(ptht+1) ){
1551          //          //
1552          if ( IsDebug() ) printf(" Piece of run at the beginning of the file %i %i %i \n",ptht,pth,ptt);          if ( IsDebug() ) printf(" Piece of run at the beginning of the file %u %u %u \n",ptht,pth,ptt);
1553          //          //
1554          this->HandleRunFragments(true,false,0,(evbeft-1));          this->HandleRunFragments(true,false,0,(evbeft-1));
1555          //          //
1556          //          //
1557        } else if ( pth == ptht ){        } else if ( pth == ptht ){
1558          //          //
1559          if ( IsDebug() ) printf(" Missing header %i %i %i\n",ptht,pth,ptt);          if ( IsDebug() ) printf(" Missing header %u %u %u\n",ptht,pth,ptt);
1560          //          //
1561          if ( (ptt-1) < 0 ) throw -15; // should never arrive here!          if ( (ptt-1) < 0 ) throw -15; // should never arrive here!
1562          rt->GetEntry(ptt-1);          rt->GetEntry(ptt-1);
# Line 1565  Int_t PamelaDBOperations::insertPamelaRU Line 1565  Int_t PamelaDBOperations::insertPamelaRU
1565          rt->GetEntry(ptt);          rt->GetEntry(ptt);
1566          pht = eht->GetPscuHeader();          pht = eht->GetPscuHeader();
1567          //          //
1568          if ( IsDebug() ) printf(" Try to find the beginning of a run which has only the runtrailer   %i %i %i \n",ptht,pth,ptt);          if ( IsDebug() ) printf(" Try to find the beginning of a run which has only the runtrailer   %u %u %u \n",ptht,pth,ptt);
1569          if ( IsDebug() ) printf(" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''  %i %i %i \n",pkth,obth,obtt);          if ( IsDebug() ) printf(" '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''  %u %u %u \n",pkth,obth,obtt);
1570          //          //
1571          this->HandleMissingHoT(true,false,evbefh,evbeft-1);          this->HandleMissingHoT(true,false,evbefh,evbeft-1);
1572          //          //
1573        } else {        } else {
1574          //          //
1575          if ( IsDebug() ) printf(" Could be a good run, we have a runheader followed by a runtrailer %i %i %i\n",ptht,pth,ptt);          if ( IsDebug() ) printf(" Could be a good run, we have a runheader followed by a runtrailer %u %u %u\n",ptht,pth,ptt);
1576          //          //
1577          rh->GetEntry(ptht);          rh->GetEntry(ptht);
1578          phh = ehh->GetPscuHeader();          phh = ehh->GetPscuHeader();
# Line 1580  Int_t PamelaDBOperations::insertPamelaRU Line 1580  Int_t PamelaDBOperations::insertPamelaRU
1580          obth = phh->GetOrbitalTime();          obth = phh->GetOrbitalTime();
1581          cod = ehh->GetCounter();          cod = ehh->GetCounter();
1582          evbefh = cod->Get(pctp->Physics);          evbefh = cod->Get(pctp->Physics);
1583          if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %i %i %i \n",pkth,obth,obtt);          if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %u %u %u \n",pkth,obth,obtt);
1584          //          //
1585          // handle this run          // handle this run
1586          //          //
# Line 1592  Int_t PamelaDBOperations::insertPamelaRU Line 1592  Int_t PamelaDBOperations::insertPamelaRU
1592            //            //
1593            if ( IsDebug() ) printf(" Piece of run at the beginning of the file WITH NO RUNTRAILER \n");            if ( IsDebug() ) printf(" Piece of run at the beginning of the file WITH NO RUNTRAILER \n");
1594            //            //
1595            this->HandleRunFragments(true,true,0,(evbefh-1));            if ( (evbefh-1) == 1 ) {
1596            //              //
1597                signal = 8;
1598                if ( IsDebug() ) printf(" Not supported yet: run with no events, no runtrailer, no runheader \n");
1599                //
1600              } else {
1601                //
1602                this->HandleRunFragments(true,true,0,(evbefh-1));
1603                //
1604              };
1605          };          };
1606          //          //
1607          //          //
1608          if ( (ptht - pth) > 1 ){          if ( (ptht - pth) > 1 ){
1609            //            //
1610            if ( IsDebug() ) printf(" Missing runtrailers! \n");            if ( IsDebug() ) printf(" Missing runtrailers! \n");
1611            if ( IsDebug() ) printf(" Attention there is a jump in the runheader counter %i %i %i \n",ptht,pth,ptt);            if ( IsDebug() ) printf(" Attention there is a jump in the runheader counter %u %u %u \n",ptht,pth,ptt);
1612            // is not the consecutive header            // is not the consecutive header
1613            while ( pth != ptht ){                      while ( pth != ptht ){          
1614              //              //
# Line 1621  Int_t PamelaDBOperations::insertPamelaRU Line 1629  Int_t PamelaDBOperations::insertPamelaRU
1629              obth = phh->GetOrbitalTime();              obth = phh->GetOrbitalTime();
1630              evbefh = cod->Get(pctp->Physics);              evbefh = cod->Get(pctp->Physics);
1631              //              //
1632              if ( IsDebug() ) printf(" Try to find the end of a run which has only the runheader   %i %i %i \n",ptht,pth,ptt);              if ( IsDebug() ) printf(" Try to find the end of a run which has only the runheader   %u %u %u \n",ptht,pth,ptt);
1633              if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %i %i %i \n",pkth,obth,obtt);              if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' %u %u %u \n",pkth,obth,obtt);
1634              //              //
1635              this->HandleMissingHoT(false,true,evbefh,evbeft-1);              this->HandleMissingHoT(false,true,evbefh,evbeft-1);
1636              //              //
# Line 1631  Int_t PamelaDBOperations::insertPamelaRU Line 1639  Int_t PamelaDBOperations::insertPamelaRU
1639          } else if ( !(ptht - pth) ){          } else if ( !(ptht - pth) ){
1640            //            //
1641            if ( IsDebug() ) printf(" Missing runheader! \n");            if ( IsDebug() ) printf(" Missing runheader! \n");
1642            if ( IsDebug() ) printf(" Attention! the runheader counter did not changed %i %i %i \n",ptht,pth,ptt);            if ( IsDebug() ) printf(" Attention! the runheader counter did not changed %u %u %u \n",ptht,pth,ptt);
1643            if ( IsDebug() ) printf(" The run should have already been handled by HandleRun() \n");            if ( IsDebug() ) printf(" The run should have already been handled by HandleRun() \n");
1644            //            //
1645          } else {          } else {
# Line 1652  Int_t PamelaDBOperations::insertPamelaRU Line 1660  Int_t PamelaDBOperations::insertPamelaRU
1660            obth = phh->GetOrbitalTime();            obth = phh->GetOrbitalTime();
1661            cod = ehh->GetCounter();            cod = ehh->GetCounter();
1662            evbefh = cod->Get(pctp->Physics);            evbefh = cod->Get(pctp->Physics);
1663            if ( IsDebug() ) printf(" Piece of run at the end of file %i %i %i \n",pkth,obth,obtt);            if ( IsDebug() ) printf(" Piece of run at the end of file %u %u %u \n",pkth,obth,obtt);
1664            if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''' %i %i %i \n",ptht,pth,ptt);            if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''' %u %u %u \n",ptht,pth,ptt);
1665            if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''' %i \n",rhev);            if ( IsDebug() ) printf(" ''''''''''''''''''''''''''''''' %u \n",rhev);
1666            //            //
1667            this->HandleRunFragments(false,true,evbefh,upperentry);            this->HandleRunFragments(false,true,evbefh,upperentry);
1668          } else {          } else {
# Line 2054  void PamelaDBOperations::HandleRunFragme Line 2062  void PamelaDBOperations::HandleRunFragme
2062        ULong64_t aobt = OBT(glrun1->GetRUNTRAILER_OBT());        ULong64_t aobt = OBT(glrun1->GetRUNTRAILER_OBT());
2063        UInt_t bpkt = PKT(glrun->GetRUNHEADER_PKT());        UInt_t bpkt = PKT(glrun->GetRUNHEADER_PKT());
2064        ULong64_t bobt = OBT(glrun->GetRUNHEADER_OBT());        ULong64_t bobt = OBT(glrun->GetRUNHEADER_OBT());
2065        if ( IsDebug() ) printf(" Check overlapping events: %i %i %llu %llu firstev is %i\n",apkt,bpkt,aobt,bobt,firstev);        if ( IsDebug() ) printf(" Check overlapping events: %u %u %llu %llu firstev is %i\n",apkt,bpkt,aobt,bobt,firstev);
2066        TTree *T= 0;        TTree *T= 0;
2067        T = (TTree*)file->Get("Physics");        T = (TTree*)file->Get("Physics");
2068        if ( !T || T->IsZombie() ) throw -16;        if ( !T || T->IsZombie() ) throw -16;
# Line 2068  void PamelaDBOperations::HandleRunFragme Line 2076  void PamelaDBOperations::HandleRunFragme
2076          bobt = OBT(ph->GetOrbitalTime());                bobt = OBT(ph->GetOrbitalTime());      
2077          firstev++;          firstev++;
2078        };        };
2079        if ( IsDebug() ) printf(" Check overlapping events done: %i %i %llu %llu firstev is %i\n",apkt,bpkt,aobt,bobt,firstev);        if ( IsDebug() ) printf(" Check overlapping events done: %u %u %llu %llu firstev is %i\n",apkt,bpkt,aobt,bobt,firstev);
2080        //        //
2081        glrun1->SetPKT_COUNTER(glrun->GetPKT_COUNTER());        glrun1->SetPKT_COUNTER(glrun->GetPKT_COUNTER());
2082        glrun1->SetPKT_READY_COUNTER(glrun->GetPKT_READY_COUNTER());        glrun1->SetPKT_READY_COUNTER(glrun->GetPKT_READY_COUNTER());
# Line 2251  void PamelaDBOperations::HandleRunFragme Line 2259  void PamelaDBOperations::HandleRunFragme
2259        ULong64_t aobt = OBT(glrun->GetRUNTRAILER_OBT());        ULong64_t aobt = OBT(glrun->GetRUNTRAILER_OBT());
2260        UInt_t bpkt = PKT(glrun1->GetRUNHEADER_PKT());        UInt_t bpkt = PKT(glrun1->GetRUNHEADER_PKT());
2261        ULong64_t bobt = OBT(glrun1->GetRUNHEADER_OBT());        ULong64_t bobt = OBT(glrun1->GetRUNHEADER_OBT());
2262        if ( IsDebug() ) printf(" Check overlapping events: %i %i %llu %llu lastev is %i\n",apkt,bpkt,aobt,bobt,lastev);        if ( IsDebug() ) printf(" Check overlapping events: %u %u %llu %llu lastev is %i\n",apkt,bpkt,aobt,bobt,lastev);
2263        TTree *T= 0;        TTree *T= 0;
2264        T = (TTree*)file->Get("Physics");        T = (TTree*)file->Get("Physics");
2265        if ( !T || T->IsZombie() ) throw -16;        if ( !T || T->IsZombie() ) throw -16;
# Line 2265  void PamelaDBOperations::HandleRunFragme Line 2273  void PamelaDBOperations::HandleRunFragme
2273          aobt = OBT(ph->GetOrbitalTime());                aobt = OBT(ph->GetOrbitalTime());      
2274          lastev--;          lastev--;
2275        };        };
2276        if ( IsDebug() ) printf(" Check overlapping events done: %i %i %llu %llu lastev is %i\n",apkt,bpkt,aobt,bobt,lastev);        if ( IsDebug() ) printf(" Check overlapping events done: %u %u %llu %llu lastev is %i\n",apkt,bpkt,aobt,bobt,lastev);
2277        //        //
2278        glrun->SetEV_TO(lastev);        glrun->SetEV_TO(lastev);
2279        glrun->SetNEVENTS(lastev-firstev+1);        glrun->SetNEVENTS(lastev-firstev+1);
# Line 2917  Int_t PamelaDBOperations::insertCALO_CAL Line 2925  Int_t PamelaDBOperations::insertCALO_CAL
2925                //                //
2926                if ( IsDebug() ) printf(" Calibration with fromtime lower than others to be inserted in the DB for section %i \n",section);                if ( IsDebug() ) printf(" Calibration with fromtime lower than others to be inserted in the DB for section %i \n",section);
2927                if ( fromtime < 1150871000 ){ //1150866904                if ( fromtime < 1150871000 ){ //1150866904
2928                  if ( IsDebug() ) printf(" First PAMELA flight calibration at time %i \n",fromtime);                  if ( IsDebug() ) printf(" First PAMELA flight calibration at time %u \n",fromtime);
2929                  fromtime = 0;// the first flight calibration was taken at about  1156429100 s, this line allow to analyze first runs in raw mode                  fromtime = 0;// the first flight calibration was taken at about  1156429100 s, this line allow to analyze first runs in raw mode
2930                };                };
2931                //                //
# Line 3425  Int_t PamelaDBOperations::insertS4_CALIB Line 3433  Int_t PamelaDBOperations::insertS4_CALIB
3433            //            //
3434            if ( IsDebug() ) printf(" Calibration with fromtime lower than others to be inserted in the DB \n");            if ( IsDebug() ) printf(" Calibration with fromtime lower than others to be inserted in the DB \n");
3435            if ( fromtime < 1150871000 ){              if ( fromtime < 1150871000 ){  
3436              if ( IsDebug() ) printf(" First PAMELA flight calibration at time %i \n",fromtime);              if ( IsDebug() ) printf(" First PAMELA flight calibration at time %u \n",fromtime);
3437              fromtime = 0;// the first flight calibration was taken at about  1156429100 s, this line allow to analyze first runs in raw mode              fromtime = 0;// the first flight calibration was taken at about  1156429100 s, this line allow to analyze first runs in raw mode
3438            };            };
3439            //            //
# Line 3695  Int_t PamelaDBOperations::ValidateRuns(T Line 3703  Int_t PamelaDBOperations::ValidateRuns(T
3703        row = result->Next();        row = result->Next();
3704        t_stop = (UInt_t)atoll(row->GetField(4));        t_stop = (UInt_t)atoll(row->GetField(4));
3705      };      };
3706      if ( IsDebug() ) printf("Validation interval: from time %i - to time %i \n\n",t_stop,t_start);      if ( IsDebug() ) printf("Validation interval: from time %u - to time %u \n\n",t_stop,t_start);
3707      // --------------------------------------------------------------      // --------------------------------------------------------------
3708      // now retrieves runs to be validated      // now retrieves runs to be validated
3709      // --------------------------------------------------------------      // --------------------------------------------------------------
# Line 3866  Int_t PamelaDBOperations::ValidateRuns(T Line 3874  Int_t PamelaDBOperations::ValidateRuns(T
3874                    }else printf("ValidateRuns ***WARNING*** : run sequence exceed assumed size (%i) \n",nseq_max);                    }else printf("ValidateRuns ***WARNING*** : run sequence exceed assumed size (%i) \n",nseq_max);
3875            };            };
3876                        
3877            if ( IsDebug() ) printf("%i Run %i \n",nrow,this_run->ID);            if ( IsDebug() ) printf("%i Run %u \n",nrow,this_run->ID);
3878            nrow++;            nrow++;
3879                        
3880    };    };
# Line 3895  Bool_t PamelaDBOperations::MissingTRK_CA Line 3903  Bool_t PamelaDBOperations::MissingTRK_CA
3903          // which should be equal to the time between ascending-nodes.          // which should be equal to the time between ascending-nodes.
3904          //==============================================================          //==============================================================
3905          if ( t2 - trkcalib->FROM_TIME > 5700) {          if ( t2 - trkcalib->FROM_TIME > 5700) {
3906                  if ( IsDebug() )printf("Long time between calib and run start %i :-( ==> there might be a missing calib \n",t2 - trkcalib->FROM_TIME);                  if ( IsDebug() )printf("Long time between calib and run start %u :-( ==> there might be a missing calib \n",t2 - trkcalib->FROM_TIME);
3907          //==============================================================          //==============================================================
3908          // there might be a missing calibration, due to:          // there might be a missing calibration, due to:
3909          // - MM full          // - MM full
# Line 3916  Bool_t PamelaDBOperations::MissingTRK_CA Line 3924  Bool_t PamelaDBOperations::MissingTRK_CA
3924          // it is enough to say that there are no missing calibrations          // it is enough to say that there are no missing calibrations
3925          //==============================================================          //==============================================================
3926          // the long time interval bewteen runs might be due to download          // the long time interval bewteen runs might be due to download
3927          if ( IsDebug() )printf("Short time between calib and run start %i :-) ==> OK! \n",t2 - trkcalib->FROM_TIME);          if ( IsDebug() )printf("Short time between calib and run start %u :-) ==> OK! \n",t2 - trkcalib->FROM_TIME);
3928          return(false);          return(false);
3929                    
3930  };  };
# Line 4232  void PamelaDBOperations::ValidationOFF() Line 4240  void PamelaDBOperations::ValidationOFF()
4240        };        };
4241      };      };
4242    };    };
4243    if ( IsDebug() ) printf(" %i runs have been unvalidated \n",unv);    if ( IsDebug() ) printf(" %u runs have been unvalidated \n",unv);
4244  };  };
4245    
4246  /**  /**
# Line 4263  void PamelaDBOperations::RemoveRUNS(){ Line 4271  void PamelaDBOperations::RemoveRUNS(){
4271      if ( IsDebug() ) printf(" Deleting run from GL_RUN table \n");          if ( IsDebug() ) printf(" Deleting run from GL_RUN table \n");    
4272      while ( Row ){      while ( Row ){
4273        delrun->DeleteRun(conn,(UInt_t)atoll(Row->GetField(0)),"GL_RUN");        delrun->DeleteRun(conn,(UInt_t)atoll(Row->GetField(0)),"GL_RUN");
4274        if ( IsDebug() ) printf(" del run %i \n",(UInt_t)atoll(Row->GetField(0)));        if ( IsDebug() ) printf(" del run %u \n",(UInt_t)atoll(Row->GetField(0)));
4275        drun++;        drun++;
4276        Row = pResult->Next();            Row = pResult->Next();    
4277      };      };
# Line 4284  void PamelaDBOperations::RemoveRUNS(){ Line 4292  void PamelaDBOperations::RemoveRUNS(){
4292    } else {    } else {
4293      if ( IsDebug() ) printf(" Deleting run fragments from GL_RUN table \n");          if ( IsDebug() ) printf(" Deleting run fragments from GL_RUN table \n");    
4294      while ( Row ){      while ( Row ){
4295        if ( IsDebug() ) printf(" restore run %i \n",(UInt_t)atoll(Row->GetField(1)));        if ( IsDebug() ) printf(" restore run %u \n",(UInt_t)atoll(Row->GetField(1)));
4296        delrun->RestoreRun(conn,(UInt_t)atoll(Row->GetField(1)),"GL_RUN_FRAGMENTS");        delrun->RestoreRun(conn,(UInt_t)atoll(Row->GetField(1)),"GL_RUN_FRAGMENTS");
4297        if ( IsDebug() ) printf(" del run %i \n",(UInt_t)atoll(Row->GetField(1)));        if ( IsDebug() ) printf(" del run %u \n",(UInt_t)atoll(Row->GetField(1)));
4298        delrun->DeleteRun(conn,(UInt_t)atoll(Row->GetField(1)),"GL_RUN");        delrun->DeleteRun(conn,(UInt_t)atoll(Row->GetField(1)),"GL_RUN");
4299        if ( (UInt_t)atoll(Row->GetField(1)) != (UInt_t)atoll(Row->GetField(0)) ){        if ( (UInt_t)atoll(Row->GetField(1)) != (UInt_t)atoll(Row->GetField(0)) ){
4300          if ( IsDebug() ) printf(" del run %i \n",(UInt_t)atoll(Row->GetField(0)));          if ( IsDebug() ) printf(" del run %u \n",(UInt_t)atoll(Row->GetField(0)));
4301          delrun->DeleteRun(conn,(UInt_t)atoll(Row->GetField(0)),"GL_RUN");          delrun->DeleteRun(conn,(UInt_t)atoll(Row->GetField(0)),"GL_RUN");
4302        };        };
4303        drun++;        drun++;
# Line 4315  void PamelaDBOperations::RemoveRUNS(){ Line 4323  void PamelaDBOperations::RemoveRUNS(){
4323    } else {    } else {
4324      if ( IsDebug() ) printf(" Deleting run fragments from GL_RUN_TRASH table \n");          if ( IsDebug() ) printf(" Deleting run fragments from GL_RUN_TRASH table \n");    
4325      while ( Row ){      while ( Row ){
4326        if ( IsDebug() ) printf(" del run idtrash %i \n",(UInt_t)atoll(Row->GetField(0)));        if ( IsDebug() ) printf(" del run idtrash %u \n",(UInt_t)atoll(Row->GetField(0)));
4327        myquery.str("");        myquery.str("");
4328        myquery << " DELETE FROM GL_RUN_TRASH where ID_TRASH=" << Row->GetField(0) <<";";              myquery << " DELETE FROM GL_RUN_TRASH where ID_TRASH=" << Row->GetField(0) <<";";      
4329        conn->Query(myquery.str().c_str());        conn->Query(myquery.str().c_str());
# Line 4324  void PamelaDBOperations::RemoveRUNS(){ Line 4332  void PamelaDBOperations::RemoveRUNS(){
4332      };      };
4333    };    };
4334    //      //  
4335    if ( IsDebug() ) printf(" Deleted %i run(s) from GL_RUN_TRASH table \n",drun);        if ( IsDebug() ) printf(" Deleted %u run(s) from GL_RUN_TRASH table \n",drun);    
4336    //    //
4337    //    //
4338    //    //
# Line 4342  void PamelaDBOperations::RemoveRUNS(){ Line 4350  void PamelaDBOperations::RemoveRUNS(){
4350    } else {    } else {
4351      if ( IsDebug() ) printf(" Deleting run fragments from GL_RUN_FRAGMENTS table \n");          if ( IsDebug() ) printf(" Deleting run fragments from GL_RUN_FRAGMENTS table \n");    
4352      while ( Row ){      while ( Row ){
4353        if ( IsDebug() ) printf(" del run %i \n",(UInt_t)atoll(Row->GetField(0)));        if ( IsDebug() ) printf(" del run %u \n",(UInt_t)atoll(Row->GetField(0)));
4354        myquery.str("");        myquery.str("");
4355        myquery << " DELETE FROM GL_RUN_FRAGMENTS where ID=" << Row->GetField(0) <<";";        myquery << " DELETE FROM GL_RUN_FRAGMENTS where ID=" << Row->GetField(0) <<";";
4356        conn->Query(myquery.str().c_str());        conn->Query(myquery.str().c_str());
# Line 4351  void PamelaDBOperations::RemoveRUNS(){ Line 4359  void PamelaDBOperations::RemoveRUNS(){
4359      };      };
4360    };    };
4361    //      //  
4362    if ( IsDebug() ) printf(" Deleted %i run(s) from GL_RUN_FRAGMENTS table \n",drun);        if ( IsDebug() ) printf(" Deleted %u run(s) from GL_RUN_FRAGMENTS table \n",drun);    
4363    //    //
4364    //    //
4365    //    //
# Line 4682  UInt_t PamelaDBOperations::Check(){ Line 4690  UInt_t PamelaDBOperations::Check(){
4690      //    if ( (thisrht < prevrtt || thisrtt < prevrht || thisrht > thisrtt) && (thisrht != prevrht) ){      //    if ( (thisrht < prevrtt || thisrtt < prevrht || thisrht > thisrtt) && (thisrht != prevrht) ){
4691      if ( (thisrht < prevrtt) && (thisrht != prevrht) ){      if ( (thisrht < prevrtt) && (thisrht != prevrht) ){
4692        if ( IsDebug() ) printf(" IDprev %u ID %u    prevrht %u prevrtt %u  thisrht %u thisrtt %u \n",previd,thisid,prevrht,prevrtt,thisrht,thisrtt);        if ( IsDebug() ) printf(" IDprev %u ID %u    prevrht %u prevrtt %u  thisrht %u thisrtt %u \n",previd,thisid,prevrht,prevrtt,thisrht,thisrtt);
4693        printf(" CHECK n.1 TIME SCREW of %i s AROUND RUNs %u and %u \n",(thisrht-prevrtt),previd,thisid);        printf(" CHECK n.1 TIME SCREW of %u s AROUND RUNs %u and %u \n",(thisrht-prevrtt),previd,thisid);
4694        TString prevf = "";        TString prevf = "";
4695        TString thisf = "";        TString thisf = "";
4696        oss.str("");        oss.str("");
# Line 4703  UInt_t PamelaDBOperations::Check(){ Line 4711  UInt_t PamelaDBOperations::Check(){
4711      //      //
4712      if ( (thisrtt < prevrht) && (thisrht != prevrht) ){      if ( (thisrtt < prevrht) && (thisrht != prevrht) ){
4713        if ( IsDebug() ) printf(" IDprev %u ID %u    prevrht %u prevrtt %u  thisrht %u thisrtt %u \n",previd,thisid,prevrht,prevrtt,thisrht,thisrtt);        if ( IsDebug() ) printf(" IDprev %u ID %u    prevrht %u prevrtt %u  thisrht %u thisrtt %u \n",previd,thisid,prevrht,prevrtt,thisrht,thisrtt);
4714        printf(" CHECK n.2 TIME SCREW of %i s AROUND RUNs %u and %u \n",(thisrtt-prevrht),previd,thisid);        printf(" CHECK n.2 TIME SCREW of %u s AROUND RUNs %u and %u \n",(thisrtt-prevrht),previd,thisid);
4715        TString prevf = "";        TString prevf = "";
4716        TString thisf = "";        TString thisf = "";
4717        oss.str("");        oss.str("");
# Line 4724  UInt_t PamelaDBOperations::Check(){ Line 4732  UInt_t PamelaDBOperations::Check(){
4732      //      //
4733      if ( (thisrht > thisrtt) && (thisrht != prevrht) ){      if ( (thisrht > thisrtt) && (thisrht != prevrht) ){
4734        if ( IsDebug() ) printf(" IDprev %u ID %u    prevrht %u prevrtt %u  thisrht %u thisrtt %u \n",previd,thisid,prevrht,prevrtt,thisrht,thisrtt);        if ( IsDebug() ) printf(" IDprev %u ID %u    prevrht %u prevrtt %u  thisrht %u thisrtt %u \n",previd,thisid,prevrht,prevrtt,thisrht,thisrtt);
4735        printf(" CHECK n.3 TIME SCREW of %i s AROUND RUNs %u and %u \n",(thisrht-thisrtt),previd,thisid);        printf(" CHECK n.3 TIME SCREW of %u s AROUND RUNs %u and %u \n",(thisrht-thisrtt),previd,thisid);
4736        TString prevf = "";        TString prevf = "";
4737        TString thisf = "";        TString thisf = "";
4738        oss.str("");        oss.str("");

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.23