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

Last change on this file since 4742 was 4698, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.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 MCerPhotEvt;
10class MPedPhotCam;
11class MBadPixelsCam;
12
13class MBadPixelsTreat : public MTask
14{
15private:
16 MGeomCam *fGeomCam; //!
17 MPedPhotCam *fPedPhot; //!
18 MCerPhotEvt *fEvt; //!
19 MBadPixelsCam *fBadPixels; //!
20
21 Byte_t fFlags; // flag for the method which is used
22 Byte_t fNumMinNeighbors;
23 TString fNamePedPhotContainer; // name of the 'MPedPhotCam' container
24
25 enum
26 {
27 kUseInterpolation = 1,
28 kUseCentralPixel = 2,
29 kProcessPedestal = 3,
30 kHardTreatment = 4
31 };
32
33 static Double_t Pow2(Double_t x) { return x*x; }
34
35 void InterpolateSignal() const;
36 void InterpolatePedestals() const;
37
38 void Unmap() const;
39 Bool_t IsPixelBad(Int_t idx) const;
40
41 Bool_t ReInit(MParList *pList);
42 Int_t PreProcess(MParList *pList);
43 Int_t Process();
44 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
45 void StreamPrimitive(ofstream &out) const;
46
47public:
48 MBadPixelsTreat(const char *name=NULL, const char *title=NULL);
49
50 void SetUseInterpolation(Bool_t b=kTRUE)
51 {
52 b ? SETBIT(fFlags, kUseInterpolation) : CLRBIT(fFlags, kUseInterpolation);
53 }
54 void SetUseCentralPixel(Bool_t b=kTRUE)
55 {
56 b ? SETBIT(fFlags, kUseCentralPixel) : CLRBIT(fFlags, kUseCentralPixel);
57 }
58 void SetProcessPedestal(Bool_t b=kTRUE)
59 {
60 b ? SETBIT(fFlags, kProcessPedestal) : CLRBIT(fFlags, kProcessPedestal);
61 }
62 void SetHardTreatment(Bool_t b=kTRUE)
63 {
64 b ? SETBIT(fFlags, kHardTreatment) : CLRBIT(fFlags, kHardTreatment);
65 }
66
67 Bool_t IsHardTreatment() const { return TESTBIT(fFlags, kHardTreatment); }
68 Bool_t IsProcessPedestal() const { return TESTBIT(fFlags, kProcessPedestal); }
69 Bool_t IsUseCentralPixel() const { return TESTBIT(fFlags, kUseCentralPixel); }
70 Bool_t IsUseInterpolation() const { return TESTBIT(fFlags, kUseInterpolation); }
71
72 void SetNumMinNeighbors(Byte_t num) { fNumMinNeighbors=num; }
73 void SetNamePedPhotContainer(const char *name) { fNamePedPhotContainer = name; }
74
75
76 ClassDef(MBadPixelsTreat, 1) // Task to treat bad pixels (interpolation, unmapping)
77};
78
79#endif
80
Note: See TracBrowser for help on using the repository browser.