source: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h@ 6634

Last change on this file since 6634 was 5728, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.2 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 MCerPhotEvt;
10class MPedPhotCam;
11class MArrivalTime;
12class MBadPixelsCam;
13
14class MBadPixelsTreat : public MTask
15{
16private:
17 MGeomCam *fGeomCam; //!
18 //MPedPhotCam *fPedPhot; //!
19 MCerPhotEvt *fEvt; //!
20 MArrivalTime *fTimes; //!
21 MBadPixelsCam *fBadPixels; //!
22
23 TList fPedPhotCams;
24
25 Byte_t fFlags; // flag for the method which is used
26 Byte_t fNumMinNeighbors;
27
28 //TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
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.