StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_tpcPadGainT0C.h
1 #ifndef St_tpcPadGainT0C_h
2 #define St_tpcPadGainT0C_h
3 
4 #include "TChair.h"
5 #include "tables/St_tpcPadGainT0_Table.h"
6 #include "St_tpcPadConfigC.h"
7 class TBrowser;
8 class St_tpcPadGainT0C : public TChair {
9  public:
10  static St_tpcPadGainT0C* instance();
11  tpcPadGainT0_st *Struct() const {return ((St_tpcPadGainT0 *) Table())->GetTable();}
12  Int_t run() const {return Struct()->run;}
13  Float_t *Gains(Int_t sector, Int_t row) {return (((St_tpcPadGainT0 *) Table())->GetTable())->Gain[sector-1][row-1];}
14  Float_t Gain(Int_t sector, Int_t row, Int_t pad) const {
15  Float_t gain = 0;
16  if ((sector > 0 && sector <= 24) && (row > 0 && row <= St_tpcPadConfigC::instance()->padRows(sector)) && (pad > 0 && pad <= 182)) {
17  gain = Struct()->Gain[sector-1][row-1][pad-1];
18  }
19  return gain;
20  }
21  Float_t T0(Int_t sector, Int_t row, Int_t pad) const {
22  Float_t t0 = 0;
23  if ((sector > 0 && sector <= 24) && (row > 0 && row <= St_tpcPadConfigC::instance()->padRows(sector)) && (pad > 0 && pad <= 182)) {
24  t0 = Struct()->T0[sector-1][row-1][pad-1];
25  }
26  return t0;
27  }
28  Bool_t livePadrow(Int_t sector, Int_t row) {
29  for (Int_t pad=1; pad<=182; pad++) if (Gain(sector,row,pad)>0) return kTRUE;
30  return kFALSE;
31  }
32  void Browse(TBrowser *b) {}
33  protected:
34  St_tpcPadGainT0C(St_tpcPadGainT0 *table=0) : TChair(table) {}
35  virtual ~St_tpcPadGainT0C() {fgInstance = 0;}
36  private:
37  static St_tpcPadGainT0C* fgInstance;
38  ClassDefChair(St_tpcPadGainT0, tpcPadGainT0_st )
39  ClassDef(St_tpcPadGainT0C,1) //C++ TChair for tpcPadGainT0 table class
40 };
41 #endif
Definition: TChair.h:27
void Browse(TBrowser *b)
Browse this dataset (called by TBrowser).