]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSOnlineCalibrationSPD.h
Restoring some changes lost after the last commit (Alberto)
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineCalibrationSPD.h
1 #ifndef ALI_ITS_ONLINECALIBRATIONSPD_H
2 #define ALI_ITS_ONLINECALIBRATIONSPD_H
3
4 ///////////////////////////////////////////////////////////////////////
5 // Author: Henrik Tydesjo                                            //
6 // This class is used as a container to keep the dead and noisy      //
7 // pixels online. Each object corresponds to one module.             //
8 // Note: This class should not be used directly.                     //
9 // Use it via AliITSOnlineCalibrationSPDhandler instead.             //
10 ///////////////////////////////////////////////////////////////////////
11
12 #include <TObject.h>
13 #include <TArrayI.h>
14
15 class AliITSOnlineCalibrationSPD : public TObject {
16
17  public:
18     AliITSOnlineCalibrationSPD();
19     virtual ~AliITSOnlineCalibrationSPD() {}
20
21     void   SetModuleNr(UInt_t mod) {fModuleNr=mod;}
22     UInt_t GetModuleNr() const {return fModuleNr;}
23     void   SetDeadList(TArrayI deadlist) {fDeadChannels=deadlist;}
24     void   SetNoisyList(TArrayI noisylist) {fNoisyChannels=noisylist;}
25     void   SetNrDead(UInt_t nr) {fNrDead=nr;}
26     void   SetNrNoisy(UInt_t nr) {fNrNoisy=nr;}
27
28     void   AddDead(UInt_t col, UInt_t row);
29     Int_t  GetNrDead() const {return fNrDead;}
30     Int_t  GetDeadColAt(UInt_t index) const; //returns -1 if out of bounds
31     Int_t  GetDeadRowAt(UInt_t index) const; //returns -1 if out of bounds
32     void   ClearDead() {fDeadChannels.Reset(); fNrDead=0;}
33     Bool_t IsPixelDead(Int_t col, Int_t row) const ;
34     void   AddNoisy(UInt_t col, UInt_t row);
35     Int_t  GetNrNoisy() const {return fNrNoisy;}
36     Int_t  GetNoisyColAt(UInt_t index) const; //returns -1 if out of bounds
37     Int_t  GetNoisyRowAt(UInt_t index) const; //returns -1 if out of bounds
38     void   ClearNoisy() {fNoisyChannels.Reset(); fNrNoisy=0;}
39     Bool_t IsPixelNoisy(Int_t col, Int_t row) const ;
40
41  private:
42     UInt_t   fModuleNr;       // module nr
43     UInt_t   fNrDead;         // nr of dead pixels
44     TArrayI  fDeadChannels;   // index 0 is nr of dead, then pairs of col and row
45     UInt_t   fNrNoisy;        // nr of noisy pixels
46     TArrayI  fNoisyChannels;  // index 0 is nr of noisy, then pairs of col and row
47
48     ClassDef(AliITSOnlineCalibrationSPD,1)
49 };
50
51 #endif