| 1 |
#ifndef RunInfo_h |
| 2 |
#define RunInfo_h |
| 3 |
// |
| 4 |
#include <TObject.h> |
| 5 |
#include <TTree.h> |
| 6 |
#include <TChain.h> |
| 7 |
#include <TFile.h> |
| 8 |
#include <TArrayI.h> |
| 9 |
#include <TSQLServer.h> |
| 10 |
// |
| 11 |
#include <GLTables.h> |
| 12 |
// |
| 13 |
#include <RunInfoStruct.h> |
| 14 |
|
| 15 |
|
| 16 |
class SoftInfo : public TObject { |
| 17 |
|
| 18 |
private: |
| 19 |
|
| 20 |
public: |
| 21 |
TString DV_ver; |
| 22 |
TString ORB_ver; |
| 23 |
TString TRIG_ver; |
| 24 |
TString TOF_ver; |
| 25 |
TString AC_ver; |
| 26 |
TString TRK_ver; |
| 27 |
TString CAL_ver; |
| 28 |
TString S4_ver; |
| 29 |
TString ND_ver; |
| 30 |
// |
| 31 |
// Default constructor |
| 32 |
// |
| 33 |
SoftInfo(); |
| 34 |
|
| 35 |
void Clear(Option_t *t=""); |
| 36 |
void GetLevel2Struct(cSoftInfo *l2) const; |
| 37 |
SoftInfo* GetSoftInfo(){return this;}; |
| 38 |
UInt_t GetSWinfo(TString DEC); |
| 39 |
|
| 40 |
// |
| 41 |
ClassDef(SoftInfo,2); |
| 42 |
// |
| 43 |
}; |
| 44 |
|
| 45 |
class ItoRunInfo : public GL_RUN { |
| 46 |
|
| 47 |
private: |
| 48 |
UInt_t file_entries; |
| 49 |
UInt_t totnorun; |
| 50 |
Int_t first_file_entry; |
| 51 |
Int_t last_file_entry; |
| 52 |
UInt_t norun; |
| 53 |
Bool_t reprocessing; |
| 54 |
Bool_t updating; |
| 55 |
Bool_t isreadonly; |
| 56 |
TFile *file; |
| 57 |
TTree *newtree; |
| 58 |
TArrayI *runlist; |
| 59 |
UInt_t idRun; |
| 60 |
TSQLServer *dbc; |
| 61 |
TString processFolder; |
| 62 |
TString Detector; |
| 63 |
void CopyFromTo(GL_RUN *, GL_RUN *, SoftInfo *, SoftInfo *); |
| 64 |
|
| 65 |
public: |
| 66 |
// |
| 67 |
SoftInfo *version; |
| 68 |
// |
| 69 |
// GL_RUN *glrun; |
| 70 |
// |
| 71 |
// Default constructor |
| 72 |
// |
| 73 |
ItoRunInfo(); |
| 74 |
~ItoRunInfo(); |
| 75 |
// |
| 76 |
// Other constructors... |
| 77 |
// |
| 78 |
// ... for updating GL_RUN informations by RunInfo exec |
| 79 |
// |
| 80 |
ItoRunInfo(TSQLServer *db, TFile *processFl, TString processFld); |
| 81 |
// |
| 82 |
// ... for updating versioning informations by programs and to read only data |
| 83 |
// |
| 84 |
ItoRunInfo(TFile *processFile); |
| 85 |
// |
| 86 |
// |
| 87 |
// |
| 88 |
Int_t Update(UInt_t run, TString Detector, TString Version); |
| 89 |
Int_t Read(UInt_t run); |
| 90 |
void Write(); |
| 91 |
Int_t GetRunInfo(UInt_t run); |
| 92 |
UInt_t GetRunForEntry(UInt_t entry); |
| 93 |
void Close(); |
| 94 |
void Clear(Option_t *t=""); |
| 95 |
// |
| 96 |
void *GetPointerToSI(){return &version;}; |
| 97 |
void *GetPointerToRI(){return this;}; |
| 98 |
//void *GetPointerToRI(){return &glrun;}; |
| 99 |
TChain *GetRunTree(TList *fl); |
| 100 |
// |
| 101 |
UInt_t GetRunEntries(){return(totnorun);}; |
| 102 |
UInt_t GetNoRun(){return(norun);}; |
| 103 |
TArrayI *GetRunList(){return(runlist);}; |
| 104 |
Bool_t IsReprocessing(){return(reprocessing);}; |
| 105 |
UInt_t GetFirstEntry(){return(first_file_entry);}; |
| 106 |
UInt_t GetLastEntry(){return(last_file_entry-1);}; |
| 107 |
UInt_t GetEntries(){Long64_t en = last_file_entry-1-first_file_entry; if ( en < 0LL ) en = 0LL; return((UInt_t)en);}; |
| 108 |
UInt_t GetFileEntries(){return(file_entries);}; |
| 109 |
// |
| 110 |
ClassDef(ItoRunInfo,3); |
| 111 |
// |
| 112 |
}; |
| 113 |
|
| 114 |
#endif |
| 115 |
|