source: trunk/MagicSoft/Mars/mjobs/MJPedestal.h@ 4773

Last change on this file since 4773 was 4760, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.8 KB
Line 
1#ifndef MARS_MJPedestal
2#define MARS_MJPedestal
3
4#ifndef MARS_MJob
5#include "MJob.h"
6#endif
7#ifndef MARS_MPedestalCam
8#include "MPedestalCam.h"
9#endif
10#ifndef MARS_MBadPixelsCam
11#include "MBadPixelsCam.h"
12#endif
13
14class TCanvas;
15class MParList;
16class MRunIter;
17class MHCamera;
18class TH1D;
19class MExtractor;
20class MEvtLoop;
21
22class MJPedestal : public MJob
23{
24private:
25 static const Double_t fgPedestalMin;
26 static const Double_t fgPedestalMax;
27 static const Double_t fgPedRmsMin;
28 static const Double_t fgPedRmsMax;
29
30 static const Float_t fgRefPedClosedLids;
31 static const Float_t fgRefPedExtraGalactic;
32 static const Float_t fgRefPedGalactic;
33
34 static const Float_t fgRefPedRmsClosedLidsInner;
35 static const Float_t fgRefPedRmsExtraGalacticInner;
36 static const Float_t fgRefPedRmsGalacticInner;
37
38 static const Float_t fgRefPedRmsClosedLidsOuter;
39 static const Float_t fgRefPedRmsExtraGalacticOuter;
40 static const Float_t fgRefPedRmsGalacticOuter;
41
42 MRunIter *fRuns; // Used pedestal runs
43 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices
44
45 MPedestalCam fPedestalCam; // Created pedestal results
46 MBadPixelsCam fBadPixels; // Bad Pixels
47
48 enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types
49
50 Display_t fDisplayType; // Chosen Display type
51
52 Bool_t fDataCheck; // Flag if the data check is run on raw data
53 Bool_t fUseData; // Use data-runs from sequence instead of pedestal runs
54
55 Bool_t ReadPedestalCam();
56 Bool_t WriteResult();
57 //Bool_t WriteEventloop(MEvtLoop &evtloop) const;
58
59 void DisplayResult(MParList &plist);
60 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const;
61 void DisplayOutliers(TH1D *hist) const;
62 void FixDataCheckHist(TH1D *hist) const;
63
64 Bool_t CheckEnvLocal();
65
66public:
67 MJPedestal(const char *name=NULL, const char *title=NULL);
68
69 MPedestalCam &GetPedestalCam() { return fPedestalCam; }
70 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
71
72 const char* GetOutputFile() const;
73 const Bool_t IsDataCheck() const { return fDataCheck; }
74
75 Bool_t Process();
76 Bool_t ProcessFile();
77
78 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
79 void SetExtractor(MExtractor* ext) { fExtractor = ext; }
80 void SetInput(MRunIter *iter) { fRuns = iter; }
81
82 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; b ? SetDataCheckDisplay() : SetNormalDisplay(); }
83
84 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
85 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
86
87 ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam)
88};
89
90#endif
Note: See TracBrowser for help on using the repository browser.