StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_TpcAvgCurrentC.h
1 #ifndef St_TpcAvgCurrentC_h
2 #define St_TpcAvgCurrentC_h
3 
4 #include "TChair.h"
5 #include "tables/St_TpcAvgCurrent_Table.h"
6 #include "St_tpcAnodeHVC.h"
7 class St_TpcAvgCurrentC : public TChair {
8  public:
9  static St_TpcAvgCurrentC* instance();
10  TpcAvgCurrent_st *Struct(Int_t i = 0) const {return ((St_TpcAvgCurrent*) Table())->GetTable()+i;}
11  UInt_t getNumRows() const {return GetNRows();}
12  Int_t run(Int_t i = 0) const {return Struct(i)->run;}
13  Int_t start_time(Int_t i = 0) const {return Struct(i)->start_time;}
14  Int_t stop_time(Int_t i = 0) const {return Struct(i)->stop_time;}
15  static Int_t ChannelFromRow(Int_t sector, Int_t row);
16  static Int_t ChannelFromSocket(Int_t socket);
17  Float_t AvCurrent(Int_t sector = 1, Int_t channel = 1);
18  /* {
19  return (sector > 0 && sector <= 24 && channel > 0 && channel <= 8) ?
20  Struct()->AvCurrent[8*(sector-1)+channel-1] :
21  0;} */
22  Float_t AvCurrSocket(Int_t sector = 1, Int_t socket = 1) {return AvCurrent(sector,ChannelFromSocket(socket));}
23  Float_t AvCurrRow(Int_t sector = 1, Int_t row = 1) {return AvCurrent(sector,ChannelFromRow(sector,row));}
24  Float_t AcCharge(Int_t sector = 1, Int_t channel = 1);
25  /* {
26  return (sector > 0 && sector <= 24 && channel > 0 && channel <= 8) ?
27  Struct()->AcCharge[8*(sector-1)+channel-1] :
28  0;
29  } */
30  Float_t AcChargeSocket(Int_t sector = 1, Int_t socket = 1) {return AcCharge(sector,ChannelFromSocket(socket));}
31  Float_t AcChargeRow(Int_t sector = 1, Int_t row = 1) {return AcCharge(sector,ChannelFromRow(sector,row));}
32  Float_t AcChargeL(Int_t sector = 1, Int_t channel = 1); // C/cm
33  Float_t AcChargeRowL(Int_t sector = 1, Int_t row = 1) {return AcChargeL(sector,ChannelFromRow(sector,row));}
34  protected:
35  St_TpcAvgCurrentC(St_TpcAvgCurrent *table=0) : TChair(table) {}
36  virtual ~St_TpcAvgCurrentC() {fgInstance = 0;}
37  private:
38  static St_TpcAvgCurrentC* fgInstance;
39  ClassDefChair(St_TpcAvgCurrent, TpcAvgCurrent_st )
40  ClassDef(St_TpcAvgCurrentC,1) //C++ TChair for TpcAvgCurrent table class
41 };
42 #endif
Definition: TChair.h:27