1 | #ifndef MARS_MJPedestal
|
---|
2 | #define MARS_MJPedestal
|
---|
3 |
|
---|
4 | #ifndef MARS_MPedestalCam
|
---|
5 | #include "MPedestalCam.h"
|
---|
6 | #endif
|
---|
7 | #ifndef MARS_MBadPixelsCam
|
---|
8 | #include "MBadPixelsCam.h"
|
---|
9 | #endif
|
---|
10 |
|
---|
11 | class TEnv;
|
---|
12 | class TCanvas;
|
---|
13 | class MParList;
|
---|
14 | class MSequence;
|
---|
15 | class MRunIter;
|
---|
16 | class MHCamera;
|
---|
17 | class TH1D;
|
---|
18 | class MExtractor;
|
---|
19 |
|
---|
20 | class MJPedestal : public MParContainer
|
---|
21 | {
|
---|
22 | private:
|
---|
23 |
|
---|
24 | static const Double_t fgPedestalMin;
|
---|
25 | static const Double_t fgPedestalMax;
|
---|
26 | static const Double_t fgPedRmsMin;
|
---|
27 | static const Double_t fgPedRmsMax;
|
---|
28 |
|
---|
29 | static const Float_t fgRefPedClosedLids;
|
---|
30 | static const Float_t fgRefPedExtraGalactic;
|
---|
31 | static const Float_t fgRefPedGalactic;
|
---|
32 |
|
---|
33 | static const Float_t fgRefPedRmsClosedLidsInner;
|
---|
34 | static const Float_t fgRefPedRmsExtraGalacticInner;
|
---|
35 | static const Float_t fgRefPedRmsGalacticInner;
|
---|
36 |
|
---|
37 | static const Float_t fgRefPedRmsClosedLidsOuter;
|
---|
38 | static const Float_t fgRefPedRmsExtraGalacticOuter;
|
---|
39 | static const Float_t fgRefPedRmsGalacticOuter;
|
---|
40 |
|
---|
41 | TString fOutputPath; // Directory where the F0-files get stored
|
---|
42 |
|
---|
43 | TEnv *fEnv; // Input setup-file
|
---|
44 | MRunIter *fRuns; // Used pedestal runs
|
---|
45 | MSequence *fSequence; // Sequence
|
---|
46 |
|
---|
47 | MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices
|
---|
48 |
|
---|
49 | MPedestalCam fPedestalCam; // Created pedestal results
|
---|
50 | MBadPixelsCam fBadPixels; // Bad Pixels
|
---|
51 |
|
---|
52 | enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types
|
---|
53 |
|
---|
54 | Display_t fDisplayType; // Chosen Display type
|
---|
55 |
|
---|
56 | Bool_t fDataCheck; // Flag if the data check is run on raw data
|
---|
57 |
|
---|
58 | Bool_t ReadPedestalCam();
|
---|
59 | Bool_t WriteResult();
|
---|
60 |
|
---|
61 | void DisplayResult(MParList &plist);
|
---|
62 | void DisplayReferenceLines(MHCamera *cam, const Int_t what) const;
|
---|
63 | void DisplayOutliers(TH1D *hist) const;
|
---|
64 | void FixDataCheckHist(TH1D *hist) const;
|
---|
65 |
|
---|
66 | void CheckEnv();
|
---|
67 |
|
---|
68 | public:
|
---|
69 |
|
---|
70 | MJPedestal(const char *name=NULL, const char *title=NULL);
|
---|
71 | ~MJPedestal();
|
---|
72 |
|
---|
73 | MPedestalCam &GetPedestalCam() { return fPedestalCam; }
|
---|
74 | const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
|
---|
75 |
|
---|
76 | const char* GetOutputFile() const;
|
---|
77 | const Bool_t IsDataCheck() const { return fDataCheck; }
|
---|
78 |
|
---|
79 | Bool_t Process();
|
---|
80 | Bool_t ProcessFile();
|
---|
81 |
|
---|
82 | void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
|
---|
83 | void SetExtractor(MExtractor* ext) { fExtractor = ext; }
|
---|
84 | void SetInput(MRunIter *iter) { fRuns = iter; }
|
---|
85 | void SetSequence(MSequence *seq) { fSequence = seq; }
|
---|
86 | void SetOutputPath(const char *path=".");
|
---|
87 | void SetEnv(const char *env);
|
---|
88 |
|
---|
89 | void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); }
|
---|
90 |
|
---|
91 | void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
|
---|
92 | void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
|
---|
93 |
|
---|
94 | ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam)
|
---|
95 | };
|
---|
96 |
|
---|
97 | #endif
|
---|