00001
00002 #ifndef TkrLayer_H
00003 #define TkrLayer_H
00004
00005 #include "TObject.h"
00006 #include "TObjArray.h"
00007 #include "StripId.h"
00008
00020 class TkrLayer : public TObject
00021 {
00022 private:
00024 UChar_t m_plane;
00026 UChar_t m_xy;
00028 UInt_t m_ToT[2];
00030 UInt_t m_errf[2];
00031 TObjArray *m_strips;
00032
00033 Int_t m_numStrips;
00034
00035 public:
00036
00037
00038 typedef enum {
00039 X = 0,
00040 Y
00041 } TKRAxes;
00042
00043 TkrLayer();
00044 TkrLayer(TObjArray *strips);
00045 virtual ~TkrLayer();
00046 void Clean(Option_t *option="");
00047
00048 TObjArray* getStrips() { return m_strips; };
00049 void setToT(UInt_t right, UInt_t left);
00050 void setErrf(UInt_t right, UInt_t left);
00051 void setPlaneNum(UChar_t planeVal) { m_plane = planeVal; };
00052 void setXY(TKRAxes xyVal) { m_xy = (xyVal == X ? 0 : 1); };
00053
00055 Int_t getToT(UChar_t ctrlNum);
00056 Int_t getErrf(UChar_t ctrlNum);
00058 inline UShort_t getPlaneNum() const { return UShort_t(m_plane); };
00060 UShort_t getLayerNum() const;
00062 TKRAxes getXY() const { return (m_xy ? Y : X); };
00064 UInt_t getNumHits() { return m_strips->GetEntries(); };
00066 StripId* getHit(int i) { return ( (i < m_strips->GetEntries()) ? (StripId*)(m_strips->At(i)) : 0); };
00067
00069 Int_t Compare(const TObject *obj) const;
00070 Bool_t IsSortable() const;
00071
00072 ClassDef(TkrLayer,3)
00073 };
00074
00075 #endif