source: trunk/MagicSoft/Mars/mimage/MImgCleanStd.h@ 8695

Last change on this file since 8695 was 8646, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 3.4 KB
Line 
1#ifndef MARS_MImgCleanStd
2#define MARS_MImgCleanStd
3
4#ifndef MARS_MGTask
5#include "MGTask.h"
6#endif
7
8class MGeomCam;
9class MGeomPix;
10class MSignalCam;
11class MPedPhotCam;
12class MArrivalTime;
13class MCameraData;
14//class MRawRunHeader;
15
16class MGGroupFrame;
17
18class MImgCleanStd : public MGTask
19{
20public:
21 typedef enum {
22 kStandard,
23 kScaled,
24 kDemocratic,
25 kProbability,
26 kAbsolute,
27 kTime,
28 } CleaningMethod_t;
29
30private:
31 static const TString gsNamePedPhotCam; // default name of the 'MPedPhotCam' container
32 static const TString gsNameGeomCam; // default name of the 'MGeomCam' container
33 static const TString gsNameSignalCam; // default name of the 'MSignalCam' container
34
35 const MGeomCam *fCam; //!
36 MSignalCam *fEvt; //!
37 MPedPhotCam *fPed; //!
38 MCameraData *fData; //!
39// MRawRunHeader *fHeader; //!
40
41 CleaningMethod_t fCleaningMethod;
42
43 Float_t fCleanLvl0;
44 Float_t fCleanLvl1;
45 Float_t fCleanLvl2;
46
47 Float_t fTimeLvl1;
48 Float_t fTimeLvl2;
49
50 UShort_t fCleanRings;
51 Bool_t fKeepIsolatedPixels;
52 Int_t fRecoverIsolatedPixels;
53 Int_t fPostCleanType;
54
55 TString fNamePedPhotCam; // name of the 'MPedPhotCam' container
56 TString fNameGeomCam; // name of the 'MGeomCam' container
57 TString fNameSignalCam; // name of the 'MSignalCam' container
58
59 // MImgCleanStd
60 Bool_t HasCoreNeighbors(const MGeomPix &gpix) const;
61 Bool_t HasUsedNeighbors(const MGeomPix &gpix) const;
62 void SetUsedNeighbors(const MGeomPix &gpix, Int_t r=1) const;
63 Int_t DoCleaning(Float_t &size) const;
64 void ResetCleaning() const;
65 Int_t RecoverIsolatedPixels(Float_t &size) const;
66 void CleanTime(Int_t n, Double_t lvl) const;
67
68 void CleanStepTime() const;
69
70 // MGTask, MTask, MParContainer
71 void CreateGuiElements(MGGroupFrame *f);
72 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
73
74 void StreamPrimitive(ostream &out) const;
75
76 Int_t PreProcess(MParList *pList);
77 Int_t Process();
78
79public:
80 MImgCleanStd(const Float_t lvl1=3.0, const Float_t lvl2=2.5,
81 const char *name=NULL, const char *title=NULL);
82 void Print(Option_t *o="") const;
83
84 Float_t GetCleanLvl0() const { return fCleanLvl0; }
85 Float_t GetCleanLvl1() const { return fCleanLvl1; }
86 Float_t GetCleanLvl2() const { return fCleanLvl2; }
87
88 Float_t GetTimeLvl1() const { return fTimeLvl1; }
89 Float_t GetTimeLvl2() const { return fTimeLvl2; }
90
91 void SetCleanLvl0(Float_t lvl) { fCleanLvl0=lvl; }
92 void SetCleanLvl1(Float_t lvl) { fCleanLvl1=lvl; }
93 void SetCleanLvl2(Float_t lvl) { fCleanLvl2=lvl; }
94
95 void SetTimeLvl1(Float_t lvl) { fTimeLvl1=lvl; }
96 void SetTimeLvl2(Float_t lvl) { fTimeLvl2=lvl; }
97
98 void SetCleanRings(UShort_t r) { fCleanRings=r; }
99 UShort_t GetCleanRings() const { return fCleanRings;}
100
101 void SetMethod(CleaningMethod_t m) { fCleaningMethod = m; }
102 void SetKeepIsolatedPixels(Bool_t b=kTRUE) { fKeepIsolatedPixels=b; }
103 void SetRecoverIsolatedPixels(Int_t n=-1) { fRecoverIsolatedPixels=n; }
104
105 Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
106
107 void SetNamePedPhotCam(const char *name) { fNamePedPhotCam = name; }
108 void SetNameSignalCam(const char *name) { fNameSignalCam = name; }
109 void SetNameGeomCam(const char *name) { fNameGeomCam = name; }
110
111 ClassDef(MImgCleanStd, 4) // task doing the image cleaning
112};
113
114#endif
Note: See TracBrowser for help on using the repository browser.