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

Last change on this file since 4781 was 4768, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.0 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 Byte_t fFlags; // flag for the method which is used
24 Byte_t fNumMinNeighbors;
25
26 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
27
28 enum
29 {
30 kUseInterpolation = 1,
31 kUseCentralPixel = 2,
32 kProcessPedestalRun = 3,
33 kProcessPedestalEvt = 4,
34 kProcessTimes = 5,
35 kHardTreatment = 6
36 };
37
38 static Double_t Pow2(Double_t x) { return x*x; }
39
40 void InterpolateTimes() const;
41 void InterpolateSignal() const;
42 void InterpolatePedestals() const;
43
44 void Unmap() const;
45 Bool_t IsPixelBad(Int_t idx) const;
46
47 Bool_t ReInit(MParList *pList);
48 Int_t PreProcess(MParList *pList);
49 Int_t Process();
50 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
51 void StreamPrimitive(ofstream &out) const;
52
53public:
54 MBadPixelsTreat(const char *name=NULL, const char *title=NULL);
55
56 void SetUseInterpolation(Bool_t b=kTRUE)
57 {
58 b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
59 }
60 void SetUseCentralPixel(Bool_t b=kTRUE)
61 {
62 b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
63 }
64 void SetProcessPedestalRun(Bool_t b=kTRUE)
65 {
66 b ? SETBIT(fFlags, kProcessPedestalRun) : CLRBIT(fFlags, kProcessPedestalRun);
67 }
68 void SetProcessPedestalEvt(Bool_t b=kTRUE)
69 {
70 b ? SETBIT(fFlags, kProcessPedestalEvt) : CLRBIT(fFlags, kProcessPedestalEvt);
71 }
72 void SetProcessPedestal(Bool_t b=kTRUE)
73 {
74 SetProcessPedestalRun(!b);
75 SetProcessPedestalEvt(b);
76 }
77 void SetProcessTimes(Bool_t b=kTRUE)
78 {
79 b ? SETBIT(fFlags, kProcessTimes) : CLRBIT(fFlags, kProcessTimes);
80 }
81 void SetHardTreatment(Bool_t b=kTRUE)
82 {
83 b ? SETBIT(fFlags, kHardTreatment) : CLRBIT(fFlags, kHardTreatment);
84 }
85
86 Bool_t IsHardTreatment() const { return TESTBIT(fFlags, kHardTreatment); }
87 Bool_t IsProcessPedestalRun() const { return TESTBIT(fFlags, kProcessPedestalRun); }
88 Bool_t IsProcessPedestalEvt() const { return TESTBIT(fFlags, kProcessPedestalEvt); }
89 Bool_t IsProcessTimes() const { return TESTBIT(fFlags, kProcessTimes); }
90 Bool_t IsUseCentralPixel() const { return TESTBIT(fFlags, kUseCentralPixel); }
91 Bool_t IsUseInterpolation() const { return TESTBIT(fFlags, kUseInterpolation); }
92
93 void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
94 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; }
95
96 ClassDef(MBadPixelsTreat, 1) // Task to treat bad pixels (interpolation, unmapping)
97};
98
99#endif
100
Note: See TracBrowser for help on using the repository browser.