StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_pxlRowColumnStatusC.h
1 #ifndef St_pxlRowColumnStatusC_h
2 #define St_pxlRowColumnStatusC_h
3 
4 #include "TChair.h"
5 #include "tables/St_pxlRowColumnStatus_Table.h"
6 #include "StPxlUtil/StPxlConstants.h"
7 
8 class St_pxlRowColumnStatusC : public TChair {
9  public:
10  static St_pxlRowColumnStatusC* instance();
11  pxlRowColumnStatus_st *Struct(Int_t i = 0) const {return ((St_pxlRowColumnStatus*) Table())->GetTable()+i;}
12  UInt_t getNumRows() const {return GetNRows();}
13  UChar_t* rows(Int_t i = 0) const {return Struct(i)->rows;}
14  UChar_t* cols(Int_t i = 0) const {return Struct(i)->cols;}
15  Int_t rowStatus(Int_t sector, Int_t ladder, Int_t sensor, Int_t row) const {
16  return (Int_t) (rows()[kNumberOfPxlRowsOnSensor * ((sector - 1) * (kNumberOfPxlSensorsPerLadder * kNumberOfPxlLaddersPerSector) + (ladder - 1) * kNumberOfPxlSensorsPerLadder + (sensor - 1)) + row]);
17  }
18  Int_t columnStatus(Int_t sector, Int_t ladder, Int_t sensor, Int_t column) const {
19  return (Int_t) (cols()[kNumberOfPxlColumnsOnSensor * ((sector - 1) * (kNumberOfPxlSensorsPerLadder * kNumberOfPxlLaddersPerSector) + (ladder - 1) * kNumberOfPxlSensorsPerLadder + (sensor - 1)) + column]);
20  }
21  protected:
22  St_pxlRowColumnStatusC(St_pxlRowColumnStatus *table=0) : TChair(table) {}
23  virtual ~St_pxlRowColumnStatusC() {fgInstance = 0;}
24  private:
25  static St_pxlRowColumnStatusC* fgInstance;
26  ClassDefChair(St_pxlRowColumnStatus, pxlRowColumnStatus_st )
27  ClassDef(St_pxlRowColumnStatusC,1) //C++ TChair for pxlRowColumnStatus table class
28 };
29 #endif
Definition: TChair.h:27