source: tags/Mars-V0.9.5/mbadpixels/MBadPixelsTreat.h

Last change on this file was 7376, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 3.3 KB
Line 
1#ifndef MARS_MBadPixelsTreat
2#define MARS_MBadPixelsTreat
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8class MGeomCam;
9class MSignalCam;
10class MPedPhotCam;
11class MBadPixelsCam;
12
13class MBadPixelsTreat : public MTask
14{
15private:
16 MGeomCam *fGeomCam; //!
17 MSignalCam *fEvt; //!
18 MBadPixelsCam *fBadPixels; //!
19
20 MPedPhotCam *fPedPhot1; //! Pedestal from extractor used for "no-signal" in InterpolateTimes
21 MPedPhotCam *fPedPhot2; //! Pedestal from extractor used for "no-signal" in InterpolateTimes
22
23
24 TList fPedPhotCams;
25
26 Byte_t fFlags; // flag for the method which is used
27 Byte_t fNumMinNeighbors;
28
29 TList fNamePedPhotCams;
30
31 enum
32 {
33 kUseInterpolation = 1,
34 kUseCentralPixel = 2,
35 kProcessPedestalRun = 3,
36 kProcessPedestalEvt = 4,
37 kProcessTimes = 5,
38 kHardTreatment = 6
39 };
40
41 static Double_t Pow2(Double_t x) { return x*x; }
42
43 void InterpolateTimes() const;
44 void InterpolateSignal() const;
45 void InterpolatePedestals(MPedPhotCam &pedphot) const;
46 void InterpolatePedestals() const;
47
48 void Unmap() const;
49 Bool_t IsPixelBad(Int_t idx) const;
50
51 Bool_t ReInit(MParList *pList);
52 Int_t PreProcess(MParList *pList);
53 Int_t Process();
54 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
55 void StreamPrimitive(ofstream &out) const;
56
57public:
58 MBadPixelsTreat(const char *name=NULL, const char *title=NULL);
59
60 void SetUseInterpolation(Bool_t b=kTRUE)
61 {
62 b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
63 }
64 void SetUseCentralPixel(Bool_t b=kTRUE)
65 {
66 b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
67 }
68 void SetProcessPedestalRun(Bool_t b=kTRUE)
69 {
70 b ? SETBIT(fFlags, kProcessPedestalRun) : CLRBIT(fFlags, kProcessPedestalRun);
71 }
72 void SetProcessPedestalEvt(Bool_t b=kTRUE)
73 {
74 b ? SETBIT(fFlags, kProcessPedestalEvt) : CLRBIT(fFlags, kProcessPedestalEvt);
75 }
76 void SetProcessPedestal(Bool_t b=kTRUE)
77 {
78 SetProcessPedestalRun(!b);
79 SetProcessPedestalEvt(b);
80 }
81 void SetProcessTimes(Bool_t b=kTRUE)
82 {
83 b ? SETBIT(fFlags, kProcessTimes) : CLRBIT(fFlags, kProcessTimes);
84 }
85 void SetHardTreatment(Bool_t b=kTRUE)
86 {
87 b ? SETBIT(fFlags, kHardTreatment) : CLRBIT(fFlags, kHardTreatment);
88 }
89
90 Bool_t IsHardTreatment() const { return TESTBIT(fFlags, kHardTreatment); }
91 Bool_t IsProcessPedestalRun() const { return TESTBIT(fFlags, kProcessPedestalRun); }
92 Bool_t IsProcessPedestalEvt() const { return TESTBIT(fFlags, kProcessPedestalEvt); }
93 Bool_t IsProcessTimes() const { return TESTBIT(fFlags, kProcessTimes); }
94 Bool_t IsUseCentralPixel() const { return TESTBIT(fFlags, kUseCentralPixel); }
95 Bool_t IsUseInterpolation() const { return TESTBIT(fFlags, kUseInterpolation); }
96
97 void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
98 void AddNamePedPhotCam(const char *name="MPedPhotCam");
99 void SetNamePedPhotCam(const char *name)
100 {
101 AddNamePedPhotCam(name);
102 } // Deprecated! Use AddNamePedPhotCam instead (directly)
103
104 ClassDef(MBadPixelsTreat, 1) // Task to treat bad pixels (interpolation, unmapping)
105};
106
107#endif
108
Note: See TracBrowser for help on using the repository browser.