1 |
/** |
2 |
* \file TrkParams.h |
3 |
* \author Elena Vannuccini |
4 |
*/ |
5 |
#ifndef trkparams_h |
6 |
#define trkparams_h |
7 |
|
8 |
#include <TObject.h> |
9 |
#include <TString.h> |
10 |
#include <TSQLServer.h> |
11 |
#include <TSystem.h> |
12 |
|
13 |
#include <GLTables.h> |
14 |
#include <TrkStruct.h> |
15 |
#include <TrkCalib.h> |
16 |
|
17 |
#define NTYPES 10 |
18 |
|
19 |
/** |
20 |
* \brief Class to store tracker parameter information |
21 |
* |
22 |
*/ |
23 |
class TrkParams : public TObject { |
24 |
|
25 |
private: |
26 |
|
27 |
static Int_t GetIndex( UInt_t type ); |
28 |
|
29 |
public: |
30 |
|
31 |
// --------------------------------------------- |
32 |
// variables to store loaded-calibration info |
33 |
// --------------------------------------------- |
34 |
static GL_TRK_CALIB calib; |
35 |
static TString calibpatht; //truncated |
36 |
static TString calibpathf; //full |
37 |
static Bool_t calib104; |
38 |
static Bool_t calibload; |
39 |
// --------------------------------------------- |
40 |
// variables to store loaded-parameters info |
41 |
// --------------------------------------------- |
42 |
static UInt_t trkparamtype[NTYPES]; |
43 |
static GL_PARAM gl[NTYPES]; |
44 |
static TString glpath[NTYPES]; |
45 |
static Bool_t glload[NTYPES]; |
46 |
|
47 |
TrkParams(); |
48 |
|
49 |
// --------------------------------------------- |
50 |
// calibration (PED-SIG-BAD) |
51 |
// --------------------------------------------- |
52 |
static Bool_t SetCalib( GL_RUN* , TSQLServer* ); |
53 |
static Bool_t LoadCalib( ); |
54 |
static Bool_t CalibIsLoaded(){ return calibload; }; |
55 |
static void FillFCalibFrom(TFile* , Int_t , Int_t );//full |
56 |
static void FillTCalibFrom(TFile* , Int_t , Int_t );//truncated |
57 |
static void FillTCalibFrom(TString path); |
58 |
static void FillACalibFrom(TFile* , Int_t , Int_t );//all |
59 |
static void FillMask(TFile* , Int_t , Int_t ); |
60 |
|
61 |
// --------------------------------------------- |
62 |
// parameters |
63 |
// --------------------------------------------- |
64 |
static Bool_t Set( GL_RUN* glrun, TSQLServer* dbc, UInt_t type); |
65 |
static Bool_t Set( GL_RUN* glrun, TSQLServer* dbc){ |
66 |
for(Int_t i=0; i<NTYPES; i++) |
67 |
if( !TrkParams::Set(glrun,dbc,trkparamtype[i]) )return false; |
68 |
return true; |
69 |
}; |
70 |
static Bool_t Set( TString, UInt_t ); |
71 |
static Bool_t Set( UInt_t ); |
72 |
static Bool_t Set( ); |
73 |
static Bool_t Load( UInt_t ); |
74 |
static Bool_t Load( ); |
75 |
static Bool_t IsLoaded( UInt_t type ){return glload[TrkParams::GetIndex(type)];}; |
76 |
static Bool_t IsLoaded( ); |
77 |
|
78 |
ClassDef(TrkParams,1); |
79 |
|
80 |
}; |
81 |
|
82 |
#endif |
83 |
|