StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_tpcAnodeHVC.h
1 #ifndef St_tpcAnodeHVC_h
2 #define St_tpcAnodeHVC_h
3 
4 #include "TChair.h"
5 #include "tables/St_tpcAnodeHV_Table.h"
6 
7 class St_tpcAnodeHVC : public TChair {
8  public:
9  static St_tpcAnodeHVC* instance();
10  tpcAnodeHV_st *Struct(Int_t i = 0) const {return ((St_tpcAnodeHV*) Table())->GetTable()+i;}
11  UInt_t getNumRows() const {return GetNRows();}
12  UShort_t sector(Int_t i = 0) const {return Struct(i)->sector;}
13  UShort_t socket(Int_t i = 0) const {return Struct(i)->socket;}
14  Float_t voltage(Int_t i = 0) const;
15  Bool_t livePadrow(Int_t sector = 1, Int_t padrow = 1) const { return voltagePadrow(sector,padrow) > 850; }
16  Float_t voltagePadrow(Int_t sector = 1, Int_t padrow = 1) const ; // sector=1..24 , padrow=1..100
17  Bool_t tripped(Int_t sector = 1, Int_t padrow = 1) const { return (voltagePadrow(sector,padrow) < -100); }
18  static void sockets(Int_t sector, Int_t padrow, Int_t &e1, Int_t &e2, Float_t &f2);
19  protected:
20  St_tpcAnodeHVC(St_tpcAnodeHV *table=0) : TChair(table) {}
21  virtual ~St_tpcAnodeHVC() {fgInstance = 0;}
22  private:
23  static St_tpcAnodeHVC* fgInstance;
24  ClassDefChair(St_tpcAnodeHV, tpcAnodeHV_st )
25  ClassDef(St_tpcAnodeHVC,1) //C++ TChair for tpcAnodeHV table class
26 };
27 #endif
Definition: TChair.h:27