--- YodaProfiler/inc/PamelaDBOperations.h 2006/09/11 16:38:18 1.4 +++ YodaProfiler/inc/PamelaDBOperations.h 2006/10/20 11:39:31 1.8 @@ -3,9 +3,8 @@ #include #include -// + #include -// #include #include #include @@ -19,11 +18,12 @@ #include #include #include -// + #include -using namespace pamela; +#include +using namespace pamela; /** * Collections of Pamela specific operations over a database @@ -49,7 +49,8 @@ UInt_t tsync; UInt_t toffset; // -// Long64_t olderthan; + // Long64_t olderthan; + UInt_t dworbit; // UInt_t BOOTNO; UInt_t obt0; @@ -77,14 +78,17 @@ // Bool_t NOBOOT; Bool_t debug; + + // Path to tle file + TString tlefilename; - // flag to control profiler actions - Bool_t INSERT_RAW; - Bool_t INSERT_ROOT; - Bool_t VALIDATE; - - TDatime *clean_time; - + // flag to control profiler actions + Bool_t INSERT_RAW; + Bool_t INSERT_ROOT; + Bool_t VALIDATE; + + TDatime *clean_time; + // typedef std::list pcksList; static void getPacketsNames(pcksList &pcksNames){ @@ -149,17 +153,22 @@ Bool_t IsDebug(){return(debug);}; Bool_t IsRunAlreadyInserted(); Bool_t IsRunConsistent(Bool_t mishead, Bool_t mistrail, UInt_t &firstev, UInt_t &lastev); - // - Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); - // + // + Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); + // UInt_t PKT(UInt_t pkt_num); // ULong64_t OBT(UInt_t obt); // + UInt_t AssignRunID(); + + // GL_TLE related functions + int insertTle(cTle*); + bool isTlePresent(cTle*); public: // - PamelaDBOperations(TString host, TString user, TString password, TString filerawname, TString filerootname, UInt_t boot, UInt_t tsync, UInt_t obt0, Bool_t debug, Long64_t olderthan); // constructor + PamelaDBOperations(TString host, TString user, TString password, TString filerawname, TString filerootname, UInt_t boot, UInt_t tsync, UInt_t obt0, Bool_t debug, TString tlefilename); // constructor // void Close(); // destructor // @@ -178,6 +187,8 @@ void SetCommonGLRUN(UInt_t absth, UInt_t abstt); void SetNOBOOT(Bool_t noboot); void SetOlderThan(Long64_t oldthan); + void SetTLEPath(TString str); + void SetOrbitNo(); // Bool_t SetID_RAW(); // @@ -217,15 +228,20 @@ Int_t insertS4_CALIB(); Int_t CleanGL_RUN_FRAGMENTS(); Int_t ValidateRuns(); - Int_t assignVALIDATION(UInt_t ,Bool_t ); - // -// void OpenFile(); + Int_t assignVALIDATION(UInt_t ,Bool_t ); + // + // void OpenFile(); + void CheckValidate(Long64_t olderthan); void CheckConnection(); + void CheckFile(); // - Bool_t InsertRoot(){return(INSERT_ROOT);}; - Bool_t InsertRaw(){return(INSERT_RAW);}; - Bool_t Validate(){return(VALIDATE);}; + Bool_t InsertRoot(){return(INSERT_ROOT);}; + Bool_t InsertRaw(){return(INSERT_RAW);}; + Bool_t Validate(){return(VALIDATE);}; + + // Functions for TLE + Int_t populateTLE(); }; #endif /* PAMELA_DB_OPERATIONS_H */