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