--- chewbacca/YodaProfiler/inc/PamelaDBOperations.h 2008/09/23 07:20:32 1.1.1.1 +++ chewbacca/YodaProfiler/inc/PamelaDBOperations.h 2009/12/28 08:39:23 1.8 @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include @@ -89,21 +91,27 @@ // flag to control profiler actions Bool_t STATIC; + Bool_t KEEPENV; Bool_t INSERT_RAW; Bool_t INSERT_ROOT; Bool_t VALIDATE; Bool_t NOFRAG; Bool_t AUTOBOOT; Bool_t PEDANTIC; + Bool_t RELAXED; // flags and variables for chewbacca Bool_t chewbacca; UInt_t chID; // + TString tag; + TString chiby; + // UInt_t chpktinit; UInt_t chpktfinal; UInt_t chobtinit; UInt_t chobtfinal; + UInt_t chrtinit; Int_t nrhbef; Int_t nrhaf; Int_t nrtbef; @@ -181,19 +189,21 @@ void FillClass(); void FillClass(Bool_t mishead, Bool_t mistrail, Int_t firstev, Int_t lastev); void HandleTRK_CALIB(Bool_t pk1, Bool_t pk2); + void HandleTRK_CALIB(GL_TRK_CALIB*); // void RemoveCALIBS(); void ValidationOFF(); void ReArrangeRUNS(); void RemoveRUNS(); - void RemoveFILES(); + void RemoveFILES(UInt_t idtsy); // 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 AutoBoot(){return(AUTOBOOT);}; // - Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); + // Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); + UInt_t MissingTRK_CALIB(UInt_t t1,UInt_t t2); // Long64_t PKT(UInt_t pkt_num); // @@ -207,7 +217,7 @@ public: // - 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,UInt_t dwinput, Bool_t staticp, Bool_t gpamela); // 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,UInt_t dwinput, Bool_t staticp, Bool_t gpamela, Bool_t keepenv); // constructor // void Close(); // destructor // @@ -233,6 +243,10 @@ void SetNoFrag(Bool_t nf); void SetAutoBoot(Bool_t nf); void SetPedantic(Bool_t pd); + void SetRelaxed(Bool_t pd){ if ( pd ) printf(" WARNING: USING RELAXED CONDITIONS, ARE YOU SURE ON WHAT YOU'RE DOING? \n"); RELAXED=pd;}; + void SetPhysEndRunVariables(); + // + void SetTag(TString ntag){tag=ntag;}; // Bool_t SetID_RAW(); // @@ -254,7 +268,7 @@ // TString GetRawFile(){return((TString)gSystem->BaseName(filerawname.Data()));}; TString GetRootFile(){return((TString)gSystem->BaseName(filerootname.Data()));}; - TString GetRootName(){return(filerootname);}; + TString GetRootName(){return((TString)gSystem->ExpandPathName(filerootname.Data()));}; TString GetRawName(){return(filerawname);}; TString GetRawPath(); TString GetRootPath(); @@ -265,7 +279,9 @@ // Int_t assignBOOT_NUMBER(); Int_t insertPamelaRootFile(); + Int_t insertPamelaRootFile(GL_ROOT*); Int_t insertPamelaRawFile(); + Int_t insertPamelaRawFile(GL_RAW*); Int_t insertPamelaGL_TIMESYNC(); Int_t insertPamelaRUN(); Int_t insertCALO_CALIB(); @@ -279,8 +295,10 @@ Int_t ValidateRuns(); Int_t ValidateRuns(TString valfile); Int_t assignVALIDATION(UInt_t ,Bool_t ); + Int_t assignVALIDATION(UInt_t ,UInt_t ); Int_t removeFile(TString rootfilename); // + Bool_t IsChewbacca(){return chewbacca;}; // void OpenFile(); void CheckValidate(Long64_t olderthan); void CheckConnection(); @@ -289,6 +307,8 @@ void LockTables(); void UnLockTables(); // + void NotChewbacca(UInt_t boot, UInt_t tsync, UInt_t obt0, Bool_t gpamela); + // Bool_t NoFrag(){return(NOFRAG);}; Bool_t InsertRoot(){return(INSERT_ROOT);}; @@ -298,8 +318,11 @@ // Functions for TLE Int_t populateTLE(); - UInt_t ValidateTrkCalib( CalibTrk1Event* calibtrk , EventHeader* h); - UInt_t ValidateTrkCalib( CalibTrk2Event* calibtrk , EventHeader* h){return ValidateTrkCalib((CalibTrk1Event*)calibtrk,h); }; + UInt_t ValidateTrkCalib( CalibTrk1Event* calibtrk , EventHeader* h, TFile* file); + UInt_t ValidateTrkCalib( CalibTrk2Event* calibtrk , EventHeader* h, TFile* file){return ValidateTrkCalib((CalibTrk1Event*)calibtrk,h,file); }; + + UInt_t ValidateTrkCalib( CalibTrk1Event* calibtrk , EventHeader* h){return ValidateTrkCalib((CalibTrk1Event*)calibtrk,h,file); }; + UInt_t ValidateTrkCalib( CalibTrk2Event* calibtrk , EventHeader* h){return ValidateTrkCalib((CalibTrk1Event*)calibtrk,h,file); }; UInt_t Check(); UInt_t Check(UInt_t from, UInt_t to);