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

Last change on this file since 4724 was 4723, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 3.5 KB
Line 
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
11class TEnv;
12class TCanvas;
13class MParList;
14class MSequence;
15class MRunIter;
16class MHCamera;
17class TH1D;
18class MExtractor;
19class MEvtLoop;
20
21class MJPedestal : public MParContainer
22{
23private:
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 TString fInputPath; // Directory from which to read the data files
43
44 TEnv *fEnv; // Input setup-file
45 MRunIter *fRuns; // Used pedestal runs
46 const MSequence *fSequence; // Sequence
47
48 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices
49
50 MPedestalCam fPedestalCam; // Created pedestal results
51 MBadPixelsCam fBadPixels; // Bad Pixels
52
53 enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types
54
55 Display_t fDisplayType; // Chosen Display type
56
57 Bool_t fDataCheck; // Flag if the data check is run on raw data
58 Bool_t fUseData; // Use data-runs from sequence instead of pedestal runs
59 Bool_t fOverwrite; // Allow to overwite existing files
60
61 Int_t fMaxEvents; // Maximum number of events
62
63 Bool_t ReadPedestalCam();
64 Bool_t WriteResult();
65 //Bool_t WriteEventloop(MEvtLoop &evtloop) const;
66
67 void DisplayResult(MParList &plist);
68 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const;
69 void DisplayOutliers(TH1D *hist) const;
70 void FixDataCheckHist(TH1D *hist) const;
71
72 void CheckEnv();
73
74public:
75 MJPedestal(const char *name=NULL, const char *title=NULL);
76 ~MJPedestal();
77
78 MPedestalCam &GetPedestalCam() { return fPedestalCam; }
79 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
80
81 const char* GetOutputFile() const;
82 const Bool_t IsDataCheck() const { return fDataCheck; }
83
84 Bool_t Process();
85 Bool_t ProcessFile();
86
87 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
88 void SetExtractor(MExtractor* ext) { fExtractor = ext; }
89 void SetInput(MRunIter *iter) { fRuns = iter; }
90 void SetSequence(const MSequence *seq, Bool_t usedata=kFALSE) { fSequence = seq; }
91 void SetOutputPath(const char *path=".");
92 void SetInputPath(const char *path=".");
93 void SetEnv(const char *env);
94 void SetOverwrite(Bool_t b=kTRUE) { fOverwrite=b; }
95 void SetMaxEvents(Int_t max) { fMaxEvents = max; }
96
97 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); }
98
99 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
100 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
101
102 MStatusDisplay *GetDisplay() { return fDisplay; }
103
104 ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam)
105};
106
107#endif
Note: See TracBrowser for help on using the repository browser.