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

Last change on this file since 4751 was 4748, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.6 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 kProcessPedestal = 3,
33 kProcessTimes = 4,
34 kHardTreatment = 5
35 };
36
37 static Double_t Pow2(Double_t x) { return x*x; }
38
39 void InterpolateTimes() const;
40 void InterpolateSignal() const;
41 void InterpolatePedestals() const;
42
43 void Unmap() const;
44 Bool_t IsPixelBad(Int_t idx) const;
45
46 Bool_t ReInit(MParList *pList);
47 Int_t PreProcess(MParList *pList);
48 Int_t Process();
49 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
50 void StreamPrimitive(ofstream &out) const;
51
52public:
53 MBadPixelsTreat(const char *name=NULL, const char *title=NULL);
54
55 void SetUseInterpolation(Bool_t b=kTRUE)
56 {
57 b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
58 }
59 void SetUseCentralPixel(Bool_t b=kTRUE)
60 {
61 b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
62 }
63 void SetProcessPedestal(Bool_t b=kTRUE)
64 {
65 b ? SETBIT(fFlags, kProcessPedestal) : CLRBIT(fFlags, kProcessPedestal);
66 }
67 void SetProcessTimes(Bool_t b=kTRUE)
68 {
69 b ? SETBIT(fFlags, kProcessTimes) : CLRBIT(fFlags, kProcessTimes);
70 }
71 void SetHardTreatment(Bool_t b=kTRUE)
72 {
73 b ? SETBIT(fFlags, kHardTreatment) : CLRBIT(fFlags, kHardTreatment);
74 }
75
76 Bool_t IsHardTreatment() const { return TESTBIT(fFlags, kHardTreatment); }
77 Bool_t IsProcessPedestal() const { return TESTBIT(fFlags, kProcessPedestal); }
78 Bool_t IsProcessTimes() const { return TESTBIT(fFlags, kProcessTimes); }
79 Bool_t IsUseCentralPixel() const { return TESTBIT(fFlags, kUseCentralPixel); }
80 Bool_t IsUseInterpolation() const { return TESTBIT(fFlags, kUseInterpolation); }
81
82 void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
83 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; }
84
85 ClassDef(MBadPixelsTreat, 1) // Task to treat bad pixels (interpolation, unmapping)
86};
87
88#endif
89
Note: See TracBrowser for help on using the repository browser.