/[PAMELA software]/YodaProfiler/inc/GLTables.h
ViewVC logotype

Contents of /YodaProfiler/inc/GLTables.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Fri Sep 8 14:42:48 2006 UTC (18 years, 2 months ago) by pam-fi
Branch: MAIN
Changes since 1.5: +5 -0 lines
File MIME type: text/plain
Implemented run validation

1 #ifndef gltables_h
2 #define gltables_h
3
4 #include <TString.h>
5 #include <TObject.h>
6 #include <TSQLServer.h>
7 #include <TSQLRow.h>
8 #include <TSQLResult.h>
9 #include <GLTablesStruct.h>
10 #include <EventHeader.h>
11 #include <PscuHeader.h>
12 #include <RunHeaderEvent.h>
13 #include <RunTrailerEvent.h>
14
15 using namespace pamela;
16 // ==================================================================
17 /**
18 * \brief Class to store GL_RUN data
19 */
20 class GL_RUN : public TObject {
21 private:
22
23 public:
24 //
25 UInt_t ID;
26 UInt_t ID_RUN_FRAG;
27 UInt_t ID_ROOT_L0;
28 UInt_t ID_ROOT_L2;
29 UInt_t RUNHEADER_TIME;
30 UInt_t RUNTRAILER_TIME;
31 UInt_t RUNHEADER_OBT;
32 UInt_t RUNTRAILER_OBT;
33 UInt_t RUNHEADER_PKT;
34 UInt_t RUNTRAILER_PKT;
35 UInt_t BOOT_NUMBER;
36 UInt_t EV_FROM;
37 UInt_t EV_TO;
38 UInt_t NEVENTS;
39 UInt_t PKT_COUNTER;
40 UInt_t PKT_READY_COUNTER;
41 UInt_t COMPILATIONTIMESTAMP;
42 UInt_t FAV_WRK_SCHEDULE;
43 UInt_t EFF_WRK_SCHEDULE;
44 UInt_t PRH_VAR_TRG_MODE_A;
45 UInt_t PRH_VAR_TRG_MODE_B;
46 UInt_t ACQ_BUILD_INFO;
47 UInt_t ACQ_VAR_INFO;
48 UInt_t RM_ACQ_AFTER_CALIB;
49 UInt_t RM_ACQ_SETTING_MODE;
50 UInt_t TRK_CALIB_USED;
51 UInt_t CAL_DSP_MASK;
52 UInt_t LAST_TIMESYNC;
53 UInt_t OBT_TIMESYNC;
54 UInt_t VALIDATION;
55 //
56 //
57 //
58 GL_RUN();
59 //
60 // functions
61 //
62 Int_t Query_GL_RUN(UInt_t, TSQLServer*);
63 Int_t Fill_GL_RUN(TSQLServer*);
64 Int_t Query_GL_RUN_FRAGMENTS(TString, TSQLServer*);
65 Int_t Fill_GL_RUN_FRAGMENTS(TSQLServer*);
66 void Clear();
67 //
68 // SETTERS
69 //
70 void Set_GL_RUNT(RunTrailerEvent *runt, PscuHeader *pht);
71 void Set_GL_RUNH(RunHeaderEvent *runt, PscuHeader *pht);
72 void Set_GL_RUNT0();
73 void Set_GL_RUNH0();
74 //
75 void Set_GL_RUN(TSQLRow *row);
76 //
77 void SetRUNHEADER_TIME(UInt_t abst);
78 void SetRUNTRAILER_TIME(UInt_t abst);
79 void SetRUNHEADER_PKT(UInt_t abst);
80 void SetRUNTRAILER_PKT(UInt_t abst);
81 void SetRUNHEADER_OBT(UInt_t abst);
82 void SetRUNTRAILER_OBT(UInt_t abst);
83 void SetBOOTNUMBER(UInt_t abst);
84 void SetID(UInt_t);
85 void SetID_ROOT_L2(UInt_t L2);
86 void SetID_ROOT_L0(UInt_t L0);
87 void SetID_RUN_FRAG(UInt_t RUN);
88 void SetVALIDATION(UInt_t valid);
89 void SetEV_FROM(UInt_t evfrom);
90 void SetEV_TO(UInt_t evto);
91 void SetNEVENTS(UInt_t nev);
92 void SetLAST_TIMESYNC(UInt_t ts);
93 void SetOBT_TIMESYNC(UInt_t ts);
94 void SetPKT_COUNTER(UInt_t);
95 void SetPKT_READY_COUNTER(UInt_t);
96 void SetCOMPILATIONTIMESTAMP(UInt_t);
97 void SetFAV_WRK_SCHEDULE(UInt_t);
98 void SetEFF_WRK_SCHEDULE(UInt_t);
99 void SetPRH_VAR_TRG_MODE_A(UInt_t);
100 void SetPRH_VAR_TRG_MODE_B(UInt_t);
101 void SetACQ_BUILD_INFO(UInt_t);
102 void SetACQ_VAR_INFO(UInt_t);
103 void SetRM_ACQ_AFTER_CALIB(UInt_t);
104 void SetRM_ACQ_SETTING_MODE(UInt_t);
105 void SetTRK_CALIB_USED(UInt_t);
106 void SetCAL_DSP_MASK(UInt_t);
107 //
108 // GETTERS
109 //
110 void GetLevel2Struct(cGLRun *l2) const;
111 UInt_t GetRUNHEADER_PKT(){return(RUNHEADER_PKT);};
112 UInt_t GetRUNTRAILER_PKT(){return(RUNTRAILER_PKT);};
113 UInt_t GetRUNHEADER_TIME(){return(RUNHEADER_TIME);};
114 UInt_t GetRUNTRAILER_TIME(){return(RUNTRAILER_TIME);};
115 UInt_t GetRUNHEADER_OBT(){return(RUNHEADER_OBT);};
116 UInt_t GetRUNTRAILER_OBT(){return(RUNTRAILER_OBT);};
117 UInt_t GetNEVENTS(){return(NEVENTS);};
118 UInt_t GetBOOT_NUMBER(){return(BOOT_NUMBER);};
119 UInt_t GetTRK_CALIB(){return(TRK_CALIB_USED);};
120 UInt_t GetPKT_COUNTER(){return(PKT_COUNTER);};
121 UInt_t GetLAST_TIMESYNC(){return(LAST_TIMESYNC);};
122 UInt_t GetOBT_TIMESYNC(){return(OBT_TIMESYNC);};
123 UInt_t GetPKT_READY_COUNTER(){return(PKT_READY_COUNTER);};
124 UInt_t GetCOMPILATIONTIMESTAMP(){return(COMPILATIONTIMESTAMP);};
125 UInt_t GetFAV_WRK_SCHEDULE(){return(FAV_WRK_SCHEDULE);};
126 UInt_t GetEFF_WRK_SCHEDULE(){return(EFF_WRK_SCHEDULE);};
127 UInt_t GetPRH_VAR_TRG_MODE_A(){return(PRH_VAR_TRG_MODE_A);};
128 UInt_t GetPRH_VAR_TRG_MODE_B(){return(PRH_VAR_TRG_MODE_B);};
129 UInt_t GetACQ_BUILD_INFO(){return(ACQ_BUILD_INFO);};
130 UInt_t GetACQ_VAR_INFO(){return(ACQ_VAR_INFO);};
131 UInt_t GetRM_ACQ_AFTER_CALIB(){return(RM_ACQ_AFTER_CALIB);};
132 UInt_t GetRM_ACQ_SETTING_MODE(){return(RM_ACQ_SETTING_MODE);};
133 UInt_t GetTRK_CALIB_USED(){return(TRK_CALIB_USED);};
134 UInt_t GetCAL_DSP_MASK(){return(CAL_DSP_MASK);};
135
136 //
137 ClassDef(GL_RUN,1);
138 };
139
140 // ==================================================================
141 /**
142 * \brief Class to store GL_ROOT
143 */
144 class GL_ROOT : public TObject{
145 private:
146
147 public:
148 //
149 UInt_t ID;
150 UInt_t ID_RAW;
151 UInt_t ID_TIMESYNC;
152 TString PATH;
153 TString NAME;
154
155 GL_ROOT();
156
157 Int_t Query_GL_ROOT(UInt_t id, TSQLServer *dbc);
158
159 ClassDef(GL_ROOT,1);
160 };
161 // ==================================================================
162 /**
163 * \brief Class to store GL_PARAM data
164 */
165 class GL_PARAM : public TObject{
166 private:
167
168 public:
169 //
170 UInt_t ID;
171 TString PATH;
172 TString NAME;
173 UInt_t FROM_TIME;
174 UInt_t TO_TIME;
175 UInt_t TYPE;
176 TString DESCR;
177
178 GL_PARAM();
179
180 Int_t Query_GL_PARAM(UInt_t time, UInt_t type, TSQLServer *dbc);
181
182 ClassDef(GL_PARAM,1);
183 };
184 // ==================================================================
185 /**
186 * \brief Class to store GL_TRK_CALIB data
187 */
188 class GL_TRK_CALIB : public TObject{
189 private:
190
191 public:
192 //
193 UInt_t ID;
194 UInt_t ID_ROOT_L0;
195 UInt_t EV_ROOT_CALIBTRK1 ;
196 UInt_t EV_ROOT_CALIBTRK2 ;
197 UInt_t FROM_TIME;
198 UInt_t TO_TIME;
199 UInt_t OBT1;
200 UInt_t OBT2;
201 UInt_t PKT1;
202 UInt_t PKT2;
203 UInt_t BOOT_NUMBER;
204 UInt_t VALIDATION;
205
206 GL_TRK_CALIB();
207
208 Int_t Query_GL_TRK_CALIB(UInt_t time, TSQLServer *dbc);
209
210 ClassDef(GL_TRK_CALIB,1);
211 };
212
213 // ==================================================================
214 /**
215 * \brief Class to store GL_CALO_CALIB data
216 */
217 class GL_CALO_CALIB : public TObject{
218 private:
219
220 public:
221 //
222 UInt_t ID;
223 UInt_t ID_ROOT_L0;
224 UInt_t EV_ROOT;
225 UInt_t FROM_TIME;
226 UInt_t TO_TIME;
227 UInt_t SECTION;
228
229 GL_CALO_CALIB();
230
231 Int_t Query_GL_CALO_CALIB(UInt_t time, UInt_t &uptime, UInt_t section, TSQLServer *dbc);
232
233 ClassDef(GL_CALO_CALIB,1);
234 };
235 // ==================================================================
236 /**
237 * \brief Class to store GL_S4_CALIB data
238 */
239 class GL_S4_CALIB : public TObject{
240 private:
241
242 public:
243 //
244 UInt_t ID;
245 UInt_t ID_ROOT_L0;
246 UInt_t EV_ROOT;
247 UInt_t FROM_TIME;
248 UInt_t TO_TIME;
249 Float_t PARAM_FIT0;
250 Float_t PARAM_FIT1;
251
252 GL_S4_CALIB();
253
254 Int_t Query_GL_S4_CALIB(UInt_t time, TSQLServer *dbc);
255
256 ClassDef(GL_S4_CALIB,1);
257 };
258
259 // ==================================================================
260 /**
261 * \brief Class to store TIMESYNC data
262 */
263 class GL_TIMESYNC : public TObject{
264 private:
265 UInt_t obtfirst;
266 UInt_t pktfirst;
267 UInt_t toffset;
268 //
269 UInt_t ID;
270 UInt_t ID_RAW;
271 UInt_t OBT0;
272 UInt_t TIMESYNC;
273 UInt_t TYPE;
274
275 public:
276 //
277 GL_TIMESYNC();
278 GL_TIMESYNC(UInt_t ID, TString TYPE, TSQLServer *dbc);
279 //
280 UInt_t DBabsTime(UInt_t OBT);
281 //
282 UInt_t DBpkt(UInt_t PKT);
283 ULong64_t DBobt(UInt_t OBT);
284 //
285 TString ConvertTime(TString tzone, UInt_t dbt);
286 TString UnConvertTime(TString tzone, UInt_t dbt);
287
288
289 ClassDef(GL_TIMESYNC,1);
290 };
291
292 #endif

  ViewVC Help
Powered by ViewVC 1.1.23