/[PAMELA software]/YodaProfiler/inc/PamelaDBOperations.h
ViewVC logotype

Diff of /YodaProfiler/inc/PamelaDBOperations.h

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

revision 1.8 by mocchiut, Fri Oct 20 11:39:31 2006 UTC revision 1.19 by mocchiut, Wed Feb 6 12:22:00 2008 UTC
# Line 4  Line 4 
4  #include <iostream>  #include <iostream>
5  #include <list>  #include <list>
6    
7    #include <TFile.h>
8  #include <TSQLServer.h>  #include <TSQLServer.h>
9  #include <EventHeader.h>  #include <EventHeader.h>
10  #include <PscuHeader.h>  #include <PscuHeader.h>
# Line 57  class PamelaDBOperations { Line 58  class PamelaDBOperations {
58      UInt_t id;      UInt_t id;
59      UInt_t idroot;      UInt_t idroot;
60      UInt_t pktfirst;      UInt_t pktfirst;
61      ULong64_t obtfirst;      UInt_t obtfirst;
62      ULong64_t upperobt;      UInt_t ppktfirst;
63      UInt_t upperpkt;      UInt_t pobtfirst;
64        Long64_t upperobt;
65        Long64_t upperpkt;
66      UInt_t upperentry;      UInt_t upperentry;
67      Int_t rtev;      Int_t rtev;
68      Int_t rhev;      Int_t rhev;
# Line 83  class PamelaDBOperations { Line 86  class PamelaDBOperations {
86      TString tlefilename;      TString tlefilename;
87                    
88      // flag to control profiler actions      // flag to control profiler actions
89        Bool_t STATIC;
90      Bool_t INSERT_RAW;      Bool_t INSERT_RAW;
91      Bool_t INSERT_ROOT;      Bool_t INSERT_ROOT;
92      Bool_t VALIDATE;      Bool_t VALIDATE;
93        Bool_t NOFRAG;
94        Bool_t AUTOBOOT;
95        Bool_t PEDANTIC;
96            
97      TDatime *clean_time;      TDatime *clean_time;
98            
# Line 150  class PamelaDBOperations { Line 157  class PamelaDBOperations {
157      void FillClass(Bool_t mishead, Bool_t mistrail, UInt_t firstev, UInt_t lastev);      void FillClass(Bool_t mishead, Bool_t mistrail, UInt_t firstev, UInt_t lastev);
158      void HandleTRK_CALIB(Bool_t pk1, Bool_t pk2);      void HandleTRK_CALIB(Bool_t pk1, Bool_t pk2);
159      //      //
160        void RemoveCALIBS();
161        void ValidationOFF();
162        void ReArrangeRUNS();
163        void RemoveRUNS();
164        void RemoveFILES();
165        //
166      Bool_t IsDebug(){return(debug);};      Bool_t IsDebug(){return(debug);};
167      Bool_t IsRunAlreadyInserted();      Bool_t IsRunAlreadyInserted();
168      Bool_t IsRunConsistent(Bool_t mishead, Bool_t mistrail, UInt_t &firstev, UInt_t &lastev);      Bool_t IsRunConsistent(Bool_t mishead, Bool_t mistrail, UInt_t &firstev, UInt_t &lastev);
169        Bool_t AutoBoot(){return(AUTOBOOT);};
170      //      //
171      Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2);      Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2);
172      //      //
173      UInt_t PKT(UInt_t pkt_num);      Long64_t PKT(UInt_t pkt_num);
174      //      //
175      ULong64_t OBT(UInt_t obt);      Long64_t OBT(UInt_t obt);
176      //      //
177      UInt_t AssignRunID();      UInt_t AssignRunID();
178    
# Line 168  class PamelaDBOperations { Line 182  class PamelaDBOperations {
182    
183   public:   public:
184      //      //
185      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      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
186      //      //
187      void Close(); // destructor      void Close(); // destructor
188      //      //
# Line 177  class PamelaDBOperations { Line 191  class PamelaDBOperations {
191      //      //
192      void SetConnection(TString host, TString user, TString password);      void SetConnection(TString host, TString user, TString password);
193      void SetBOOTnumber(UInt_t boot);      void SetBOOTnumber(UInt_t boot);
194        void SetBOOTnumber(UInt_t boot, Bool_t gpamela);
195      void SetRawName(TString str);      void SetRawName(TString str);
196      void SetRootName(TString str);      void SetRootName(TString str);
197      void SetDebugFlag(Bool_t debug);      void SetDebugFlag(Bool_t debug);
198      void SetID_RAW(UInt_t idr);      void SetID_RAW(UInt_t idr);
199      void SetID_ROOT(UInt_t idr);      void SetID_ROOT(UInt_t idr);
200      void SetTsync(UInt_t ts);      void SetTsync(UInt_t ts);
201        void SetTsync(UInt_t ts, Bool_t gpamela);
202      void SetObt0(UInt_t ts);      void SetObt0(UInt_t ts);
203      void SetCommonGLRUN(UInt_t absth, UInt_t abstt);      void SetCommonGLRUN(UInt_t absth, UInt_t abstt);
204      void SetNOBOOT(Bool_t noboot);      void SetNOBOOT(Bool_t noboot);
205      void SetOlderThan(Long64_t oldthan);      void SetOlderThan(Long64_t oldthan);
206      void SetTLEPath(TString str);      void SetTLEPath(TString str);
207      void SetOrbitNo();      void SetOrbitNo(UInt_t dwinput);
208        void SetNoFrag(Bool_t nf);
209        void SetAutoBoot(Bool_t nf);
210        void SetPedantic(Bool_t pd);
211      //      //
212      Bool_t SetID_RAW();      Bool_t SetID_RAW();
213      //      //
# Line 208  class PamelaDBOperations { Line 227  class PamelaDBOperations {
227      const PacketType* GetPacketType(const char* type);      const PacketType* GetPacketType(const char* type);
228      //      //
229      TString GetRawFile(){return((TString)gSystem->BaseName(filerawname.Data()));};      TString GetRawFile(){return((TString)gSystem->BaseName(filerawname.Data()));};
     TString GetRawPath(){return((TString)gSystem->DirName(filerawname.Data())+'/');};  
230      TString GetRootFile(){return((TString)gSystem->BaseName(filerootname.Data()));};      TString GetRootFile(){return((TString)gSystem->BaseName(filerootname.Data()));};
     TString GetRootPath(){return((TString)gSystem->DirName(filerootname.Data())+'/');};  
231      TString GetRootName(){return(filerootname);};      TString GetRootName(){return(filerootname);};
232      TString GetRawName(){return(filerawname);};      TString GetRawName(){return(filerawname);};
233        TString GetRawPath();
234        TString GetRootPath();
235                    
236          const char*  GetCleanTime(){return clean_time->AsSQLString();};      const char*  GetCleanTime(){return clean_time->AsSQLString();};
237      //      //
238      // Functions      // Functions
239      //      //
# Line 224  class PamelaDBOperations { Line 243  class PamelaDBOperations {
243      Int_t insertPamelaGL_TIMESYNC();      Int_t insertPamelaGL_TIMESYNC();
244      Int_t insertPamelaRUN();      Int_t insertPamelaRUN();
245      Int_t insertCALO_CALIB();      Int_t insertCALO_CALIB();
246        Int_t insertCALOPULSE_CALIB();
247      Int_t insertTRK_CALIB();      Int_t insertTRK_CALIB();
248      Int_t insertS4_CALIB();      Int_t insertS4_CALIB();
249      Int_t CleanGL_RUN_FRAGMENTS();      Int_t CleanGL_RUN_FRAGMENTS();
250        Int_t CleanGL_RUN_FRAGMENTS(TString fcleanfile);
251      Int_t ValidateRuns();      Int_t ValidateRuns();
252        Int_t ValidateRuns(TString valfile);
253      Int_t assignVALIDATION(UInt_t ,Bool_t );      Int_t assignVALIDATION(UInt_t ,Bool_t );
254        Int_t removeFile(TString rootfilename);
255      //      //
256      //    void OpenFile();      //    void OpenFile();
257      void CheckValidate(Long64_t olderthan);      void CheckValidate(Long64_t olderthan);
# Line 236  class PamelaDBOperations { Line 259  class PamelaDBOperations {
259      void CheckFile();      void CheckFile();
260      //      //
261                    
262        Bool_t NoFrag(){return(NOFRAG);};
263      Bool_t InsertRoot(){return(INSERT_ROOT);};      Bool_t InsertRoot(){return(INSERT_ROOT);};
264      Bool_t InsertRaw(){return(INSERT_RAW);};      Bool_t InsertRaw(){return(INSERT_RAW);};
265      Bool_t Validate(){return(VALIDATE);};      Bool_t Validate(){return(VALIDATE);};
266    
267      // Functions for TLE      // Functions for TLE
268      Int_t populateTLE();      Int_t populateTLE();
269    
270        UInt_t ValidateTrkCalib( CalibTrk1Event* calibtrk , EventHeader* h);
271        UInt_t ValidateTrkCalib( CalibTrk2Event* calibtrk , EventHeader* h){return ValidateTrkCalib((CalibTrk1Event*)calibtrk,h); };
272    
273        UInt_t Check();
274                    
275  };  };
276  #endif /* PAMELA_DB_OPERATIONS_H */  #endif /* PAMELA_DB_OPERATIONS_H */

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.23