| 1 |
mocchiut |
1.1 |
#ifndef RunInfo_h |
| 2 |
|
|
#define RunInfo_h |
| 3 |
|
|
// |
| 4 |
|
|
#include <TObject.h> |
| 5 |
|
|
#include <TTree.h> |
| 6 |
mocchiut |
1.4 |
#include <TChain.h> |
| 7 |
mocchiut |
1.1 |
#include <TFile.h> |
| 8 |
mocchiut |
1.4 |
#include <TArrayI.h> |
| 9 |
mocchiut |
1.1 |
#include <TSQLServer.h> |
| 10 |
|
|
// |
| 11 |
|
|
#include <GLTables.h> |
| 12 |
|
|
// |
| 13 |
pam-fi |
1.2 |
#include <RunInfoStruct.h> |
| 14 |
|
|
|
| 15 |
mocchiut |
1.10 |
class ProcInfo : public TObject { |
| 16 |
|
|
|
| 17 |
|
|
private: |
| 18 |
|
|
|
| 19 |
|
|
public: |
| 20 |
|
|
UInt_t runID; ///< ID of the processed run (input from DV) |
| 21 |
|
|
TString date; ///< processing date and time |
| 22 |
|
|
TString commandLine; ///< input command line |
| 23 |
|
|
TString outputFilename; ///< output filename |
| 24 |
|
|
TString localDir; ///< workiing directory |
| 25 |
|
|
TString uname; ///< local machine and arch (output of "uname -a") |
| 26 |
|
|
TString DB; ///< database used for this processing |
| 27 |
|
|
// |
| 28 |
|
|
// Default constructor |
| 29 |
|
|
// |
| 30 |
|
|
ProcInfo(); |
| 31 |
|
|
|
| 32 |
|
|
void Clear(Option_t *t=""); |
| 33 |
|
|
ProcInfo* GetProcInfo(){return this;}; |
| 34 |
|
|
// |
| 35 |
|
|
ClassDef(ProcInfo,1); |
| 36 |
|
|
// |
| 37 |
|
|
}; |
| 38 |
mocchiut |
1.1 |
|
| 39 |
|
|
class SoftInfo : public TObject { |
| 40 |
|
|
|
| 41 |
|
|
private: |
| 42 |
|
|
|
| 43 |
|
|
public: |
| 44 |
mocchiut |
1.6 |
TString DV_ver; |
| 45 |
|
|
TString ORB_ver; |
| 46 |
mocchiut |
1.1 |
TString TRIG_ver; |
| 47 |
|
|
TString TOF_ver; |
| 48 |
|
|
TString AC_ver; |
| 49 |
|
|
TString TRK_ver; |
| 50 |
|
|
TString CAL_ver; |
| 51 |
|
|
TString S4_ver; |
| 52 |
|
|
TString ND_ver; |
| 53 |
|
|
// |
| 54 |
|
|
// Default constructor |
| 55 |
|
|
// |
| 56 |
|
|
SoftInfo(); |
| 57 |
pam-fi |
1.2 |
|
| 58 |
mocchiut |
1.8 |
void Clear(Option_t *t=""); |
| 59 |
pam-fi |
1.2 |
void GetLevel2Struct(cSoftInfo *l2) const; |
| 60 |
mocchiut |
1.4 |
SoftInfo* GetSoftInfo(){return this;}; |
| 61 |
mocchiut |
1.6 |
UInt_t GetSWinfo(TString DEC); |
| 62 |
mocchiut |
1.4 |
|
| 63 |
mocchiut |
1.1 |
// |
| 64 |
mocchiut |
1.6 |
ClassDef(SoftInfo,2); |
| 65 |
mocchiut |
1.1 |
// |
| 66 |
|
|
}; |
| 67 |
|
|
|
| 68 |
|
|
class ItoRunInfo : public GL_RUN { |
| 69 |
|
|
|
| 70 |
|
|
private: |
| 71 |
mocchiut |
1.4 |
UInt_t file_entries; |
| 72 |
|
|
UInt_t totnorun; |
| 73 |
mocchiut |
1.1 |
Int_t first_file_entry; |
| 74 |
|
|
Int_t last_file_entry; |
| 75 |
|
|
UInt_t norun; |
| 76 |
|
|
Bool_t reprocessing; |
| 77 |
|
|
Bool_t updating; |
| 78 |
|
|
Bool_t isreadonly; |
| 79 |
|
|
TFile *file; |
| 80 |
|
|
TTree *newtree; |
| 81 |
mocchiut |
1.4 |
TArrayI *runlist; |
| 82 |
|
|
UInt_t idRun; |
| 83 |
mocchiut |
1.1 |
TSQLServer *dbc; |
| 84 |
|
|
TString processFolder; |
| 85 |
|
|
TString Detector; |
| 86 |
mocchiut |
1.4 |
void CopyFromTo(GL_RUN *, GL_RUN *, SoftInfo *, SoftInfo *); |
| 87 |
mocchiut |
1.1 |
|
| 88 |
|
|
public: |
| 89 |
|
|
// |
| 90 |
|
|
SoftInfo *version; |
| 91 |
|
|
// |
| 92 |
mocchiut |
1.5 |
// GL_RUN *glrun; |
| 93 |
|
|
// |
| 94 |
mocchiut |
1.1 |
// Default constructor |
| 95 |
|
|
// |
| 96 |
|
|
ItoRunInfo(); |
| 97 |
mocchiut |
1.9 |
~ItoRunInfo(); |
| 98 |
mocchiut |
1.1 |
// |
| 99 |
|
|
// Other constructors... |
| 100 |
|
|
// |
| 101 |
|
|
// ... for updating GL_RUN informations by RunInfo exec |
| 102 |
|
|
// |
| 103 |
|
|
ItoRunInfo(TSQLServer *db, TFile *processFl, TString processFld); |
| 104 |
|
|
// |
| 105 |
|
|
// ... for updating versioning informations by programs and to read only data |
| 106 |
|
|
// |
| 107 |
|
|
ItoRunInfo(TFile *processFile); |
| 108 |
|
|
// |
| 109 |
|
|
// |
| 110 |
|
|
// |
| 111 |
mocchiut |
1.4 |
Int_t Update(UInt_t run, TString Detector, TString Version); |
| 112 |
|
|
Int_t Read(UInt_t run); |
| 113 |
mocchiut |
1.9 |
void Write(); |
| 114 |
mocchiut |
1.4 |
Int_t GetRunInfo(UInt_t run); |
| 115 |
mocchiut |
1.1 |
UInt_t GetRunForEntry(UInt_t entry); |
| 116 |
|
|
void Close(); |
| 117 |
mocchiut |
1.8 |
void Clear(Option_t *t=""); |
| 118 |
mocchiut |
1.1 |
// |
| 119 |
mocchiut |
1.4 |
void *GetPointerToSI(){return &version;}; |
| 120 |
|
|
void *GetPointerToRI(){return this;}; |
| 121 |
mocchiut |
1.5 |
//void *GetPointerToRI(){return &glrun;}; |
| 122 |
mocchiut |
1.6 |
TChain *GetRunTree(TList *fl); |
| 123 |
mocchiut |
1.4 |
// |
| 124 |
|
|
UInt_t GetRunEntries(){return(totnorun);}; |
| 125 |
mocchiut |
1.1 |
UInt_t GetNoRun(){return(norun);}; |
| 126 |
mocchiut |
1.4 |
TArrayI *GetRunList(){return(runlist);}; |
| 127 |
mocchiut |
1.1 |
Bool_t IsReprocessing(){return(reprocessing);}; |
| 128 |
|
|
UInt_t GetFirstEntry(){return(first_file_entry);}; |
| 129 |
|
|
UInt_t GetLastEntry(){return(last_file_entry-1);}; |
| 130 |
mocchiut |
1.7 |
UInt_t GetEntries(){Long64_t en = last_file_entry-1-first_file_entry; if ( en < 0LL ) en = 0LL; return((UInt_t)en);}; |
| 131 |
mocchiut |
1.4 |
UInt_t GetFileEntries(){return(file_entries);}; |
| 132 |
mocchiut |
1.1 |
// |
| 133 |
mocchiut |
1.9 |
ClassDef(ItoRunInfo,3); |
| 134 |
mocchiut |
1.1 |
// |
| 135 |
|
|
}; |
| 136 |
|
|
|
| 137 |
|
|
#endif |
| 138 |
|
|
|