--- chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2013/04/10 11:29:38 1.36 +++ chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2014/10/14 13:19:32 1.40 @@ -1373,6 +1373,7 @@ oss.str(""); oss << "SET wait_timeout=173000;"; conn->Query(oss.str().c_str()); + delete conn->Query("SET sql_mode = 'NO_UNSIGNED_SUBTRACTION';"); // } @@ -1658,7 +1659,8 @@ Int_t PamelaDBOperations::insertPamelaGL_TIMESYNC(){ // Int_t signal = 0; - UInt_t idresof = 0; + // UInt_t idresof = 0; + idresof = 0; stringstream oss; TSQLResult *result = 0; TSQLRow *row = 0; @@ -1972,7 +1974,7 @@ // if ( chewbacca ){ oss.str(""); - oss << " SELECT ID FROM GL_TIMESYNC where TIMESYNC="<Query(oss.str().c_str()); // @@ -2976,6 +2978,7 @@ if ( IsDebug() ) printf(" here firstev is %i lastev is %i \n",firstev,lastev); // glrun->SetEV_FROM(firstev); + glrun->SetEV_TO(lastev); // EM 10 RED ghost run bug glrun->SetNEVENTS(lastev-firstev+1); // glrun->SetRUNHEADER_TIME(glrun1->GetRUNHEADER_TIME()); @@ -3171,6 +3174,7 @@ }; if ( IsDebug() ) printf(" Check overlapping events done: %u %u %llu %llu lastev is %i\n",apkt,bpkt,aobt,bobt,lastev); // + glrun->SetEV_FROM(firstev); // EM 10RED ghost run bug glrun->SetEV_TO(lastev); glrun->SetNEVENTS(lastev-firstev+1); glrun->SetPKT_COUNTER(glrun1->GetPKT_COUNTER()); @@ -4013,6 +4017,7 @@ glrun1->SetRUNTRAILER_PKT(glrun->GetRUNTRAILER_PKT()); // glrun->SetEV_FROM(firstev); + glrun->SetEV_TO(lastev); // 10 RED ghost run bug glrun->SetNEVENTS(lastev-firstev+1); // glrun->SetRUNHEADER_TIME(glrun1->GetRUNHEADER_TIME()); @@ -5742,7 +5747,7 @@ // --------------------------------------------------------------------- UInt_t idtimesync = 0; oss.str(""); - oss << " SELECT ID FROM GL_TIMESYNC where TIMESYNC="<Query(oss.str().c_str()); if ( !result ) throw -3;