/[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.1 by mocchiut, Wed Aug 30 11:18:13 2006 UTC revision 1.6 by mocchiut, Tue Oct 17 15:19:56 2006 UTC
# Line 3  Line 3 
3    
4  #include <iostream>  #include <iostream>
5  #include <list>  #include <list>
6  //  
7  #include <TSQLServer.h>  #include <TSQLServer.h>
 #include <TArrayD.h>  
 //  
8  #include <EventHeader.h>  #include <EventHeader.h>
9  #include <PscuHeader.h>  #include <PscuHeader.h>
10  #include <mcmd/McmdEvent.h>  #include <mcmd/McmdEvent.h>
# Line 20  Line 18 
18  #include <varDump/VarDumpEvent.h>  #include <varDump/VarDumpEvent.h>
19  #include <varDump/VarDumpRecord.h>  #include <varDump/VarDumpRecord.h>
20  #include <physics/S4/S4Event.h>  #include <physics/S4/S4Event.h>
21  //  
22  #include <GLTables.h>  #include <GLTables.h>
23    
24  using namespace pamela;  #include <cTle.h>
25    
26    using namespace pamela;
27    
28  /**  /**
29   * Collections of Pamela specific operations over a database   * Collections of Pamela specific operations over a database
# Line 50  class PamelaDBOperations { Line 49  class PamelaDBOperations {
49      UInt_t tsync;      UInt_t tsync;
50      UInt_t toffset;      UInt_t toffset;
51      //      //
52    //    Long64_t olderthan;
53        //
54      UInt_t BOOTNO;      UInt_t BOOTNO;
55      UInt_t obt0;      UInt_t obt0;
56      UInt_t id;      UInt_t id;
# Line 76  class PamelaDBOperations { Line 77  class PamelaDBOperations {
77      //      //
78      Bool_t NOBOOT;      Bool_t NOBOOT;
79      Bool_t debug;      Bool_t debug;
80    
81        // Path to tle file
82        TString tlefilename;
83            
84            // flag to control profiler actions
85            Bool_t INSERT_RAW;
86            Bool_t INSERT_ROOT;
87            Bool_t VALIDATE;
88            
89            TDatime *clean_time;
90                    
91      //      //
92      typedef std::list<const char*> pcksList;      typedef std::list<const char*> pcksList;
93      static void getPacketsNames(pcksList &pcksNames){      static void getPacketsNames(pcksList &pcksNames){
# Line 141  class PamelaDBOperations { Line 153  class PamelaDBOperations {
153      Bool_t IsRunAlreadyInserted();      Bool_t IsRunAlreadyInserted();
154      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);
155      //      //
156        Bool_t MissingTRK_CALIB(UInt_t t1,UInt_t t2);
157        //
158      UInt_t PKT(UInt_t pkt_num);      UInt_t PKT(UInt_t pkt_num);
159      //      //
160      ULong64_t OBT(UInt_t obt);      ULong64_t OBT(UInt_t obt);
161      //      //
162      TArrayD S4_paramfit(pamela::CalibS4Event *S4CalibEvent);  
163      //      // GL_TLE related functions
164        int insertTle(cTle*);
165        bool isTlePresent(cTle*);
166    
167   public:   public:
168      //      //
169      PamelaDBOperations(TString host, TString user, TString password, TString filerawname, TString filerootname, UInt_t boot, UInt_t tsync, UInt_t obt0, Bool_t debug); // 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
170      //      //
171      void Close(); // destructor      void Close(); // destructor
172      //      //
# Line 168  class PamelaDBOperations { Line 184  class PamelaDBOperations {
184      void SetObt0(UInt_t ts);      void SetObt0(UInt_t ts);
185      void SetCommonGLRUN(UInt_t absth, UInt_t abstt);      void SetCommonGLRUN(UInt_t absth, UInt_t abstt);
186      void SetNOBOOT(Bool_t noboot);      void SetNOBOOT(Bool_t noboot);
187        void SetOlderThan(Long64_t oldthan);
188        void SetTLEPath(TString str);
189      //      //
190      Bool_t SetID_RAW();      Bool_t SetID_RAW();
191      //      //
# Line 192  class PamelaDBOperations { Line 210  class PamelaDBOperations {
210      TString GetRootPath(){return((TString)gSystem->DirName(filerootname.Data())+'/');};      TString GetRootPath(){return((TString)gSystem->DirName(filerootname.Data())+'/');};
211      TString GetRootName(){return(filerootname);};      TString GetRootName(){return(filerootname);};
212      TString GetRawName(){return(filerawname);};      TString GetRawName(){return(filerawname);};
213            
214            const char*  GetCleanTime(){return clean_time->AsSQLString();};
215      //      //
216      // Functions      // Functions
217      //      //
# Line 203  class PamelaDBOperations { Line 223  class PamelaDBOperations {
223      Int_t insertCALO_CALIB();      Int_t insertCALO_CALIB();
224      Int_t insertTRK_CALIB();      Int_t insertTRK_CALIB();
225      Int_t insertS4_CALIB();      Int_t insertS4_CALIB();
226      //      Int_t CleanGL_RUN_FRAGMENTS();
227      void OpenFile();      Int_t ValidateRuns();
228        Int_t assignVALIDATION(UInt_t ,Bool_t );
229        //
230        //    void OpenFile();
231        void CheckValidate(Long64_t olderthan);
232        void CheckConnection();
233      void CheckFile();      void CheckFile();
234      //      //
235            
236        Bool_t InsertRoot(){return(INSERT_ROOT);};
237        Bool_t InsertRaw(){return(INSERT_RAW);};
238        Bool_t Validate(){return(VALIDATE);};
239    
240        // Functions for TLE
241        Int_t populateTLE();
242            
243  };  };
244  #endif /* PAMELA_DB_OPERATIONS_H */  #endif /* PAMELA_DB_OPERATIONS_H */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.23