StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_pxlSensorStatusC.h
1 #ifndef St_pxlSensorStatusC_h
2 #define St_pxlSensorStatusC_h
3 
4 #include "TChair.h"
5 #include "tables/St_pxlSensorStatus_Table.h"
6 #include "StPxlUtil/StPxlConstants.h"
7 
8 class St_pxlSensorStatusC : public TChair {
9  public:
10  static St_pxlSensorStatusC* instance();
11  pxlSensorStatus_st *Struct(Int_t i = 0) const {return ((St_pxlSensorStatus*) Table())->GetTable()+i;}
12  UInt_t getNumRows() const {return GetNRows();}
13  UChar_t* status(Int_t i = 0) const {return Struct(i)->status;}
14  Int_t sensorStatus(Int_t sector, Int_t ladder, Int_t sensor) const {
15  return status()[(sector - 1) * kNumberOfPxlLaddersPerSector * kNumberOfPxlSensorsPerLadder + (ladder - 1) * kNumberOfPxlSensorsPerLadder + (sensor - 1)];
16  }
17  protected:
18  St_pxlSensorStatusC(St_pxlSensorStatus *table=0) : TChair(table) {}
19  virtual ~St_pxlSensorStatusC() {fgInstance = 0;}
20  private:
21  static St_pxlSensorStatusC* fgInstance;
22  ClassDefChair(St_pxlSensorStatus, pxlSensorStatus_st )
23  ClassDef(St_pxlSensorStatusC,1) //C++ TChair for pxlSensorStatus table class
24 };
25 #endif
Definition: TChair.h:27
Int_t sensorStatus(Int_t sector, Int_t ladder, Int_t sensor) const