| 1 | /* ======================================================================== *\ | 
|---|
| 2 | !  $Name: not supported by cvs2svn $:$Id: MBadPixelsCam.h,v 1.11 2007-01-30 14:16:44 tbretz Exp $ | 
|---|
| 3 | \* ======================================================================== */ | 
|---|
| 4 | #ifndef MARS_MBadPixelsCam | 
|---|
| 5 | #define MARS_MBadPixelsCam | 
|---|
| 6 |  | 
|---|
| 7 | #ifndef MARS_MBadPixelsPix | 
|---|
| 8 | #include "MBadPixelsPix.h" | 
|---|
| 9 | #endif | 
|---|
| 10 | #ifndef MARS_MCamEvent | 
|---|
| 11 | #include "MCamEvent.h" | 
|---|
| 12 | #endif | 
|---|
| 13 |  | 
|---|
| 14 | class TArrayC; | 
|---|
| 15 | class TClonesArray; | 
|---|
| 16 |  | 
|---|
| 17 | class MGeomPix; | 
|---|
| 18 |  | 
|---|
| 19 | class MBadPixelsCam : public MParContainer, public MCamEvent | 
|---|
| 20 | { | 
|---|
| 21 | private: | 
|---|
| 22 | TClonesArray *fArray; //-> | 
|---|
| 23 |  | 
|---|
| 24 | Short_t GetNumSuitableNeighbors(MBadPixelsPix::UnsuitableType_t type, const MGeomPix &pix) const; | 
|---|
| 25 | Short_t GetNumMaxCluster(MBadPixelsPix::UnsuitableType_t type, TObjArray &list, Int_t idx, Int_t aidx) const; | 
|---|
| 26 |  | 
|---|
| 27 | void PrintBadPixels( MBadPixelsPix::UncalibratedType_t typ, const char *text) const; | 
|---|
| 28 |  | 
|---|
| 29 | public: | 
|---|
| 30 | MBadPixelsCam(const char *name=NULL, const char *title=NULL); | 
|---|
| 31 | MBadPixelsCam(const MBadPixelsCam &cam); | 
|---|
| 32 | ~MBadPixelsCam(); | 
|---|
| 33 |  | 
|---|
| 34 | void Reset(); | 
|---|
| 35 | void Clear(Option_t *o=""); | 
|---|
| 36 | void Print(Option_t *o="") const; | 
|---|
| 37 | void Copy(TObject &object) const; | 
|---|
| 38 |  | 
|---|
| 39 | void InitSize(const UInt_t i); | 
|---|
| 40 | Int_t GetSize() const; | 
|---|
| 41 |  | 
|---|
| 42 | MBadPixelsPix &operator[](Int_t i); | 
|---|
| 43 | const MBadPixelsPix &operator[](Int_t i) const; | 
|---|
| 44 |  | 
|---|
| 45 | void Merge(const MBadPixelsCam &cam); | 
|---|
| 46 |  | 
|---|
| 47 | Short_t GetNumUnsuitable(MBadPixelsPix::UnsuitableType_t type, const MGeomCam *geom, Int_t aidx=-1) const; | 
|---|
| 48 | Short_t GetNumUnsuitable(MBadPixelsPix::UnsuitableType_t type) const { return GetNumUnsuitable(type, 0); } | 
|---|
| 49 | Short_t GetNumUnsuitable() const; | 
|---|
| 50 | Short_t GetNumSuitable(MBadPixelsPix::UnsuitableType_t type, const MGeomCam *geom, Int_t aidx=-1) const; | 
|---|
| 51 | Short_t GetNumSuitable(MBadPixelsPix::UnsuitableType_t type) const { return GetNumSuitable(type, 0); } | 
|---|
| 52 | Short_t GetNumIsolated(MBadPixelsPix::UnsuitableType_t type, const MGeomCam &geom, Int_t aidx=-1) const; | 
|---|
| 53 | Short_t GetNumIsolated(const MGeomCam &geom, Int_t aidx=-1) const { return GetNumIsolated(MBadPixelsPix::kUnsuitableRun, geom, aidx); } | 
|---|
| 54 | Short_t GetNumMaxCluster(MBadPixelsPix::UnsuitableType_t type, const MGeomCam &geom, Int_t aidx=-1) const; | 
|---|
| 55 | Short_t GetNumMaxCluster(const MGeomCam &geom, Int_t aidx=-1) { return GetNumMaxCluster(MBadPixelsPix::kUnsuitableRun, geom, aidx); } | 
|---|
| 56 |  | 
|---|
| 57 | TArrayC GetUnsuitable(MBadPixelsPix::UnsuitableType_t typ=MBadPixelsPix::kUnsuitable) const; | 
|---|
| 58 | TArrayC GetUncalibrated(MBadPixelsPix::UncalibratedType_t typ) const; | 
|---|
| 59 |  | 
|---|
| 60 | void   AsciiRead(istream &fin); | 
|---|
| 61 | Bool_t AsciiWrite(ostream &out) const; | 
|---|
| 62 |  | 
|---|
| 63 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; | 
|---|
| 64 | void DrawPixelContent(Int_t num) const; | 
|---|
| 65 |  | 
|---|
| 66 | ClassDef(MBadPixelsCam, 1)  //Storage container to store bad pixel of the camera... | 
|---|
| 67 | }; | 
|---|
| 68 |  | 
|---|
| 69 | #endif | 
|---|
| 70 |  | 
|---|