15 |
#include <TTree.h> |
#include <TTree.h> |
16 |
#include <TGraph.h> |
#include <TGraph.h> |
17 |
#include <TDatime.h> |
#include <TDatime.h> |
18 |
|
#include <TTimeStamp.h> |
19 |
#include <TF1.h> |
#include <TF1.h> |
20 |
// |
// |
21 |
#include <EventHeader.h> |
#include <EventHeader.h> |
113 |
// |
// |
114 |
void PamelaDBOperations::CheckValidate(Long64_t olderthan){ |
void PamelaDBOperations::CheckValidate(Long64_t olderthan){ |
115 |
clean_time = new TDatime(); |
clean_time = new TDatime(); |
116 |
|
// |
117 |
if(olderthan >= 0){ |
if(olderthan >= 0){ |
118 |
VALIDATE = true; |
VALIDATE = true; |
119 |
UInt_t timelim = 0; |
UInt_t timelim = 0; |
120 |
timelim = (UInt_t)clean_time->Convert() - olderthan; |
timelim = (UInt_t)clean_time->Convert(true) - olderthan; |
121 |
clean_time->Set(timelim,false); |
clean_time->Set(timelim,false); |
122 |
}; |
}; |
123 |
}; |
}; |
766 |
bool connect = conn->IsConnected(); |
bool connect = conn->IsConnected(); |
767 |
if( !connect ) throw -1; |
if( !connect ) throw -1; |
768 |
if ( !dworbit && strcmp(this->GetRootName().Data(),"") ) throw -27; |
if ( !dworbit && strcmp(this->GetRootName().Data(),"") ) throw -27; |
769 |
|
// |
770 |
|
// set DB timezone to UTC |
771 |
|
// |
772 |
|
stringstream oss; |
773 |
|
// |
774 |
|
oss.str(""); |
775 |
|
oss << "SET time_zone='+0:00';"; |
776 |
|
conn->Query(oss.str().c_str()); |
777 |
|
// |
778 |
}; |
}; |
779 |
|
|
780 |
/** |
/** |
972 |
if ( !row ) throw -10; |
if ( !row ) throw -10; |
973 |
}; |
}; |
974 |
// |
// |
975 |
t0 = (UInt_t)TDatime(row->GetField(0)).Convert(); |
TDatime ti = TDatime(row->GetField(0)); |
976 |
|
TTimeStamp tu = TTimeStamp((UInt_t)ti.GetYear(),(UInt_t)ti.GetMonth(),(UInt_t)ti.GetDay(),(UInt_t)ti.GetHour(),(UInt_t)ti.GetMinute(),(UInt_t)ti.GetSecond(),0,true,0); |
977 |
|
t0 = (UInt_t)tu.GetSec(); |
978 |
|
// |
979 |
|
// t0 = (UInt_t)TDatime(row->GetField(0)).Convert(); |
980 |
/* |
/* |
981 |
* Verify that the TIMESYNC have been not already processed |
* Verify that the TIMESYNC have been not already processed |
982 |
*/ |
*/ |