1 | #ifndef MARS_MBlindPixelCalc
|
---|
2 | #define MARS_MBlindPixelCalc
|
---|
3 |
|
---|
4 | #ifndef MARS_MTask
|
---|
5 | #include "MTask.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayS
|
---|
9 | #include <TArrayS.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class MGeomCam;
|
---|
13 | class MCerPhotEvt;
|
---|
14 | class MBlindPixels;
|
---|
15 |
|
---|
16 | class MBlindPixelCalc : public MTask
|
---|
17 | {
|
---|
18 | private:
|
---|
19 | MCerPhotEvt *fEvt; //!
|
---|
20 | MBlindPixels *fPixels; //!
|
---|
21 | MGeomCam *fGeomCam; //!
|
---|
22 |
|
---|
23 | TArrayS fPixelsID; // Pixel IDs for blind pixels, which are entered by the user.
|
---|
24 |
|
---|
25 | Byte_t fFlags; // flag for the method which is used
|
---|
26 |
|
---|
27 | enum
|
---|
28 | {
|
---|
29 | kUseInterpolation = 1,
|
---|
30 | kUseCentralPixel = 2,
|
---|
31 | kUseBlindPixels = 3
|
---|
32 | };
|
---|
33 |
|
---|
34 | void Interpolate() const;
|
---|
35 | void Unmap() const;
|
---|
36 | void StreamPrimitive(ofstream &out) const;
|
---|
37 |
|
---|
38 | public:
|
---|
39 | MBlindPixelCalc(const char *name=NULL, const char *title=NULL);
|
---|
40 |
|
---|
41 | void SetUseInterpolation(Bool_t b=kTRUE)
|
---|
42 | {
|
---|
43 | b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
|
---|
44 | }
|
---|
45 | void SetUseCentralPixel(Bool_t b=kTRUE)
|
---|
46 | {
|
---|
47 | b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
|
---|
48 | }
|
---|
49 | void SetUseBlindPixels(Bool_t b=kTRUE)
|
---|
50 | {
|
---|
51 | b ? SETBIT(fFlags, kUseBlindPixels) : CLRBIT(fFlags, kUseBlindPixels);
|
---|
52 | }
|
---|
53 |
|
---|
54 | Bool_t PreProcess(MParList *pList);
|
---|
55 | Bool_t Process();
|
---|
56 |
|
---|
57 | void SetPixels(Int_t num, Short_t *ids);
|
---|
58 | void SetPixels(const TArrayS pix) { SetPixels((Int_t)pix.GetSize(), (Short_t*)pix.GetArray()); }
|
---|
59 | virtual Bool_t ReInit(MParList *pList);
|
---|
60 |
|
---|
61 | ClassDef(MBlindPixelCalc, 1) // task to deal with hot spots (star, broken pixels, etc)
|
---|
62 | };
|
---|
63 |
|
---|
64 | #endif
|
---|
65 |
|
---|