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.1 |
|
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 |
pam-fi |
1.2 |
|
34 |
mocchiut |
1.4 |
void Clear(); |
35 |
pam-fi |
1.2 |
void GetLevel2Struct(cSoftInfo *l2) const; |
36 |
mocchiut |
1.4 |
SoftInfo* GetSoftInfo(){return this;}; |
37 |
|
|
|
38 |
mocchiut |
1.1 |
// |
39 |
|
|
ClassDef(SoftInfo,1); |
40 |
|
|
// |
41 |
|
|
}; |
42 |
|
|
|
43 |
|
|
class ItoRunInfo : public GL_RUN { |
44 |
|
|
|
45 |
|
|
private: |
46 |
mocchiut |
1.4 |
UInt_t file_entries; |
47 |
|
|
UInt_t totnorun; |
48 |
mocchiut |
1.1 |
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 |
mocchiut |
1.4 |
TArrayI *runlist; |
57 |
|
|
UInt_t idRun; |
58 |
mocchiut |
1.1 |
TSQLServer *dbc; |
59 |
|
|
TString processFolder; |
60 |
|
|
TString Detector; |
61 |
mocchiut |
1.4 |
void CopyFromTo(GL_RUN *, GL_RUN *, SoftInfo *, SoftInfo *); |
62 |
mocchiut |
1.1 |
|
63 |
|
|
public: |
64 |
|
|
// |
65 |
|
|
SoftInfo *version; |
66 |
|
|
// |
67 |
mocchiut |
1.5 |
// GL_RUN *glrun; |
68 |
|
|
// |
69 |
mocchiut |
1.1 |
// 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 |
mocchiut |
1.4 |
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 |
mocchiut |
1.1 |
UInt_t GetRunForEntry(UInt_t entry); |
89 |
|
|
void Close(); |
90 |
|
|
void Clear(); |
91 |
|
|
// |
92 |
mocchiut |
1.4 |
void *GetPointerToSI(){return &version;}; |
93 |
|
|
void *GetPointerToRI(){return this;}; |
94 |
mocchiut |
1.5 |
//void *GetPointerToRI(){return &glrun;}; |
95 |
mocchiut |
1.4 |
TChain *LoadRunInfoTree(TList *fl); |
96 |
|
|
// |
97 |
|
|
UInt_t GetRunEntries(){return(totnorun);}; |
98 |
mocchiut |
1.1 |
UInt_t GetNoRun(){return(norun);}; |
99 |
mocchiut |
1.4 |
TArrayI *GetRunList(){return(runlist);}; |
100 |
mocchiut |
1.1 |
Bool_t IsReprocessing(){return(reprocessing);}; |
101 |
|
|
UInt_t GetFirstEntry(){return(first_file_entry);}; |
102 |
|
|
UInt_t GetLastEntry(){return(last_file_entry-1);}; |
103 |
mocchiut |
1.3 |
UInt_t GetEntries(){return(last_file_entry-1-first_file_entry);}; |
104 |
mocchiut |
1.4 |
UInt_t GetFileEntries(){return(file_entries);}; |
105 |
mocchiut |
1.1 |
// |
106 |
|
|
ClassDef(ItoRunInfo,1); |
107 |
|
|
// |
108 |
|
|
}; |
109 |
|
|
|
110 |
|
|
#endif |
111 |
|
|
|