StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_itpcPadGainT0C.h
1 #ifndef St_itpcPadGainT0C_h
2 #define St_itpcPadGainT0C_h
3 
4 #include "TChair.h"
5 #include "tables/St_itpcPadGainT0_Table.h"
6 class TBrowser;
7 struct rowpadFEEmap_t {// FEE & RDO map for iTPC
8  Int_t row, padMin, padMax, fee, rdo;
9 };
10 class St_itpcPadGainT0C : public TChair {
11  public:
12  static St_itpcPadGainT0C* instance();
13  itpcPadGainT0_st *Struct(Int_t i = 0) const {return ((St_itpcPadGainT0*) Table())->GetTable()+i;}
14  UInt_t getNumRows() const {return GetNRows();}
15  Int_t run(Int_t i = 0) const {return Struct(i)->run;}
16  Float_t *Gains(Int_t sector, Int_t row) {return (((St_itpcPadGainT0 *) Table())->GetTable())->Gain[sector-1][row-1];}
17  Float_t Gain(Int_t sector, Int_t row, Int_t pad) const {
18  return ((sector > 0 && sector <= 24) && (row > 0 && row <= 40) && (pad > 0 && pad <= 120)) ?
19  Struct()->Gain[sector-1][row-1][pad-1] : 0;
20  }
21  Float_t T0(Int_t sector, Int_t row, Int_t pad) const {
22  return ((sector > 0 && sector <= 24) && (row > 0 && row <= 40) && (pad > 0 && pad <= 120)) ?
23  Struct()->T0[sector-1][row-1][pad-1] : 0;
24  }
25  Bool_t livePadrow(Int_t sector, Int_t row) {
26  for (Int_t pad=1; pad<=120; pad++) if (Gain(sector,row,pad)>0) return kTRUE;
27  return kFALSE;
28  }
29  void Browse(TBrowser *b) {}
30  static rowpadFEEmap_t rowpadFEE[];
31  static Int_t NCrowpadFEE;
32  protected:
33  St_itpcPadGainT0C(St_itpcPadGainT0 *table=0) : TChair(table) {}
34  virtual ~St_itpcPadGainT0C() {fgInstance = 0;}
35  private:
36  static St_itpcPadGainT0C* fgInstance;
37  ClassDefChair(St_itpcPadGainT0, itpcPadGainT0_st )
38  ClassDef(St_itpcPadGainT0C,1) //C++ TChair for itpcPadGainT0 table class
39 };
40 #endif
Definition: TChair.h:27
void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).