6 |
#include <TSQLServer.h> |
#include <TSQLServer.h> |
7 |
#include <TSQLRow.h> |
#include <TSQLRow.h> |
8 |
#include <TSQLResult.h> |
#include <TSQLResult.h> |
9 |
|
#include <TSystem.h> |
10 |
#include <GLTablesStruct.h> |
#include <GLTablesStruct.h> |
11 |
#include <EventHeader.h> |
#include <EventHeader.h> |
12 |
#include <PscuHeader.h> |
#include <PscuHeader.h> |
13 |
#include <RunHeaderEvent.h> |
#include <RunHeaderEvent.h> |
14 |
#include <RunTrailerEvent.h> |
#include <RunTrailerEvent.h> |
15 |
#include <sgp4.h> |
#include <sgp4.h> |
16 |
|
// |
17 |
|
|
18 |
using namespace pamela; |
using namespace pamela; |
19 |
|
// |
20 |
|
|
21 |
|
static const TString *fHost; |
22 |
|
static const TString *fUser; |
23 |
|
static const TString *fPsw; |
24 |
|
static UInt_t fNquery; |
25 |
|
static Bool_t fSet; |
26 |
|
|
27 |
|
// ================================================================== |
28 |
|
/** |
29 |
|
* \brief Class to store GL_RUN data |
30 |
|
*/ |
31 |
|
class GL_TABLES : public TObject { |
32 |
|
private: |
33 |
|
|
34 |
|
public: |
35 |
|
// |
36 |
|
TString mh; |
37 |
|
TString mp; |
38 |
|
TString mu; |
39 |
|
GL_TABLES(); |
40 |
|
GL_TABLES(TString, TString, TString); |
41 |
|
// |
42 |
|
void Set(TString, TString, TString); |
43 |
|
// |
44 |
|
Bool_t IsConnected(TSQLServer *&); |
45 |
|
// |
46 |
|
void ResetCounters(); |
47 |
|
void AddQ(); |
48 |
|
// |
49 |
|
const TString* GetHost(){return(fHost);}; |
50 |
|
const TString* GetUser(){return(fUser);}; |
51 |
|
const TString* GetPsw(){return(fPsw);}; |
52 |
|
TString CGetHost(){return(mh);}; |
53 |
|
TString CGetUser(){return(mu);}; |
54 |
|
TString CGetPsw(){return(mp);}; |
55 |
|
UInt_t GetfNquery(){return(fNquery);}; |
56 |
|
UInt_t GetNqueries(); |
57 |
|
Bool_t IsSet(){return(fSet);}; |
58 |
|
// |
59 |
|
GL_TABLES *GetGLTABLES(){return this;}; |
60 |
|
// |
61 |
|
ClassDef(GL_TABLES,2); |
62 |
|
}; |
63 |
|
|
64 |
// ================================================================== |
// ================================================================== |
65 |
/** |
/** |
66 |
* \brief Class to store GL_RUN data |
* \brief Class to store GL_RUN data |
67 |
*/ |
*/ |
68 |
class GL_RUN : public TObject { |
//class GL_RUN : public TObject { |
69 |
|
class GL_RUN : public GL_TABLES { |
70 |
private: |
private: |
71 |
|
|
72 |
public: |
public: |
184 |
UInt_t GetRM_ACQ_SETTING_MODE(){return(RM_ACQ_SETTING_MODE);}; |
UInt_t GetRM_ACQ_SETTING_MODE(){return(RM_ACQ_SETTING_MODE);}; |
185 |
UInt_t GetTRK_CALIB_USED(){return(TRK_CALIB_USED);}; |
UInt_t GetTRK_CALIB_USED(){return(TRK_CALIB_USED);}; |
186 |
UInt_t GetCAL_DSP_MASK(){return(CAL_DSP_MASK);}; |
UInt_t GetCAL_DSP_MASK(){return(CAL_DSP_MASK);}; |
187 |
|
// |
188 |
|
GL_RUN* GetGL_RUN(){return this;}; |
189 |
// |
// |
190 |
ClassDef(GL_RUN,1); |
ClassDef(GL_RUN,1); |
191 |
}; |
}; |
194 |
/** |
/** |
195 |
* \brief Class to store GL_ROOT |
* \brief Class to store GL_ROOT |
196 |
*/ |
*/ |
197 |
class GL_ROOT : public TObject{ |
class GL_ROOT : public GL_TABLES { |
198 |
|
//class GL_ROOT : public TObject{ |
199 |
private: |
private: |
200 |
|
|
201 |
public: |
public: |
216 |
/** |
/** |
217 |
* \brief Class to store GL_PARAM data |
* \brief Class to store GL_PARAM data |
218 |
*/ |
*/ |
219 |
class GL_PARAM : public TObject{ |
class GL_PARAM : public GL_TABLES { |
220 |
|
//class GL_PARAM : public TObject{ |
221 |
private: |
private: |
222 |
|
|
223 |
public: |
public: |
240 |
/** |
/** |
241 |
* \brief Class to store GL_TRK_CALIB data |
* \brief Class to store GL_TRK_CALIB data |
242 |
*/ |
*/ |
243 |
class GL_TRK_CALIB : public TObject{ |
//class GL_TRK_CALIB : public TObject{ |
244 |
|
class GL_TRK_CALIB : public GL_TABLES { |
245 |
private: |
private: |
246 |
|
|
247 |
public: |
public: |
270 |
/** |
/** |
271 |
* \brief Class to store GL_CALO_CALIB data |
* \brief Class to store GL_CALO_CALIB data |
272 |
*/ |
*/ |
273 |
class GL_CALO_CALIB : public TObject{ |
class GL_CALO_CALIB : public GL_TABLES { |
274 |
|
//class GL_CALO_CALIB : public TObject{ |
275 |
private: |
private: |
276 |
|
|
277 |
public: |
public: |
278 |
// |
// |
279 |
UInt_t ID; |
UInt_t ID; |
280 |
UInt_t ID_ROOT_L0; |
UInt_t ID_ROOT_L0; |
281 |
UInt_t EV_ROOT; |
UInt_t EV_ROOT; |
282 |
UInt_t FROM_TIME; |
UInt_t FROM_TIME; |
283 |
UInt_t TO_TIME; |
UInt_t TO_TIME; |
284 |
UInt_t SECTION; |
UInt_t SECTION; |
285 |
|
UInt_t OBT; |
286 |
|
UInt_t PKT; |
287 |
|
UInt_t BOOT_NUMBER; |
288 |
|
UInt_t VALIDATION; |
289 |
|
|
290 |
GL_CALO_CALIB(); |
GL_CALO_CALIB(); |
291 |
|
|
292 |
Int_t Query_GL_CALO_CALIB(UInt_t time, UInt_t &uptime, UInt_t section, TSQLServer *dbc); |
Int_t Query_GL_CALO_CALIB(UInt_t time, UInt_t &uptime, UInt_t section, TSQLServer *dbc); |
293 |
|
|
294 |
ClassDef(GL_CALO_CALIB,1); |
ClassDef(GL_CALO_CALIB,2); |
295 |
|
}; |
296 |
|
|
297 |
|
// ================================================================== |
298 |
|
/** |
299 |
|
* \brief Class to store GL_CALOPULSE_CALIB data |
300 |
|
*/ |
301 |
|
class GL_CALOPULSE_CALIB : public GL_TABLES { |
302 |
|
private: |
303 |
|
|
304 |
|
public: |
305 |
|
// |
306 |
|
UInt_t ID; |
307 |
|
UInt_t ID_ROOT_L0; |
308 |
|
UInt_t EV_ROOT; |
309 |
|
UInt_t FROM_TIME; |
310 |
|
UInt_t TO_TIME; |
311 |
|
UInt_t SECTION; |
312 |
|
UInt_t PULSED_STRIP; |
313 |
|
UInt_t PULSE_AMPLITUDE; |
314 |
|
UInt_t OBT; |
315 |
|
UInt_t PKT; |
316 |
|
UInt_t BOOT_NUMBER; |
317 |
|
UInt_t VALIDATION; |
318 |
|
|
319 |
|
GL_CALOPULSE_CALIB(); |
320 |
|
|
321 |
|
Int_t Query_GL_CALOPULSE_CALIB(UInt_t time, UInt_t section, UInt_t pampli, TSQLServer *dbc); |
322 |
|
|
323 |
|
ClassDef(GL_CALOPULSE_CALIB,1); |
324 |
}; |
}; |
325 |
// ================================================================== |
// ================================================================== |
326 |
/** |
/** |
327 |
* \brief Class to store GL_S4_CALIB data |
* \brief Class to store GL_S4_CALIB data |
328 |
*/ |
*/ |
329 |
class GL_S4_CALIB : public TObject{ |
class GL_S4_CALIB : public GL_TABLES { |
330 |
|
//class GL_S4_CALIB : public TObject{ |
331 |
private: |
private: |
332 |
|
|
333 |
public: |
public: |
334 |
// |
// |
335 |
UInt_t ID; |
UInt_t ID; |
336 |
UInt_t ID_ROOT_L0; |
UInt_t ID_ROOT_L0; |
337 |
UInt_t EV_ROOT; |
UInt_t EV_ROOT; |
338 |
UInt_t FROM_TIME; |
UInt_t FROM_TIME; |
339 |
UInt_t TO_TIME; |
UInt_t TO_TIME; |
340 |
Float_t PARAM_FIT0; |
UInt_t OBT; |
341 |
Float_t PARAM_FIT1; |
UInt_t PKT; |
342 |
|
UInt_t BOOT_NUMBER; |
343 |
|
|
344 |
GL_S4_CALIB(); |
GL_S4_CALIB(); |
345 |
|
|
346 |
Int_t Query_GL_S4_CALIB(UInt_t time, TSQLServer *dbc); |
Int_t Query_GL_S4_CALIB(UInt_t time, TSQLServer *dbc); |
347 |
|
|
348 |
ClassDef(GL_S4_CALIB,1); |
ClassDef(GL_S4_CALIB,2); |
349 |
}; |
}; |
350 |
|
|
351 |
// ================================================================== |
// ================================================================== |
352 |
/** |
/** |
353 |
* \brief Class to store TIMESYNC data |
* \brief Class to store TIMESYNC data |
354 |
*/ |
*/ |
355 |
class GL_TIMESYNC : public TObject{ |
class GL_TIMESYNC : public GL_TABLES { |
356 |
|
//class GL_TIMESYNC : public TObject{ |
357 |
private: |
private: |
358 |
UInt_t obtfirst; |
UInt_t obtfirst; |
359 |
UInt_t pktfirst; |
UInt_t pktfirst; |
360 |
UInt_t toffset; |
UInt_t toffset; |
361 |
// |
// |
362 |
// UInt_t ID; |
UInt_t ID; |
363 |
// UInt_t ID_RAW; |
UInt_t ID_RAW; |
364 |
|
UInt_t ID_RESURS_OFFSET; |
365 |
UInt_t OBT0; |
UInt_t OBT0; |
366 |
UInt_t TIMESYNC; |
UInt_t TIMESYNC; |
367 |
UInt_t TYPE; |
UInt_t TYPE; |
386 |
UInt_t GetT0() { return T0; }; |
UInt_t GetT0() { return T0; }; |
387 |
UInt_t GetType() { return TYPE; }; |
UInt_t GetType() { return TYPE; }; |
388 |
// |
// |
389 |
ClassDef(GL_TIMESYNC,2); |
ClassDef(GL_TIMESYNC,3); |
390 |
}; |
}; |
391 |
|
|
392 |
|
|
403 |
* tleFromTime to the UTC unix time of the tle and tleToTime to the |
* tleFromTime to the UTC unix time of the tle and tleToTime to the |
404 |
* UTC unix time of the next avaible tle. |
* UTC unix time of the next avaible tle. |
405 |
*/ |
*/ |
406 |
class GL_TLE : public TObject{ |
class GL_TLE : public GL_TABLES { |
407 |
|
//class GL_TLE : public TObject{ |
408 |
private: |
private: |
409 |
Int_t DoQuery(TString query, TSQLServer *dbc); |
Int_t DoQuery(TString query, TSQLServer *dbc); |
410 |
cTle* GiveTle(TSQLRow*); |
cTle* GiveTle(TSQLRow*); |