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

Last change on this file since 4644 was 4641, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 3.1 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;
19
20class MJPedestal : public MParContainer
21{
22private:
23 static const Double_t fgPedestalMin;
24 static const Double_t fgPedestalMax;
25 static const Double_t fgPedRmsMin;
26 static const Double_t fgPedRmsMax;
27
28 static const Float_t fgRefPedClosedLids;
29 static const Float_t fgRefPedExtraGalactic;
30 static const Float_t fgRefPedGalactic;
31
32 static const Float_t fgRefPedRmsClosedLidsInner;
33 static const Float_t fgRefPedRmsExtraGalacticInner;
34 static const Float_t fgRefPedRmsGalacticInner;
35
36 static const Float_t fgRefPedRmsClosedLidsOuter;
37 static const Float_t fgRefPedRmsExtraGalacticOuter;
38 static const Float_t fgRefPedRmsGalacticOuter;
39
40 TString fOutputPath; // Directory where the F0-files get stored
41
42 TEnv *fEnv; // Input setup-file
43 MRunIter *fRuns; // Used pedestal runs
44 MSequence *fSequence; // Sequence
45
46 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices
47
48 MPedestalCam fPedestalCam; // Created pedestal results
49 MBadPixelsCam fBadPixels; // Bad Pixels
50
51 enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types
52
53 Display_t fDisplayType; // Chosen Display type
54
55 Bool_t fDataCheck; // Flag if the data check is run on raw data
56 Bool_t fUseData; // Use data-runs from sequence instead of pedestal runs
57
58 Int_t fMaxEvents; // Maximum number of events
59
60 Bool_t ReadPedestalCam();
61 Bool_t WriteResult();
62
63 void DisplayResult(MParList &plist);
64 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const;
65 void DisplayOutliers(TH1D *hist) const;
66 void FixDataCheckHist(TH1D *hist) const;
67
68 void CheckEnv();
69
70public:
71 MJPedestal(const char *name=NULL, const char *title=NULL);
72 ~MJPedestal();
73
74 MPedestalCam &GetPedestalCam() { return fPedestalCam; }
75 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
76
77 const char* GetOutputFile() const;
78 const Bool_t IsDataCheck() const { return fDataCheck; }
79
80 Bool_t Process();
81 Bool_t ProcessFile();
82
83 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
84 void SetExtractor(MExtractor* ext) { fExtractor = ext; }
85 void SetInput(MRunIter *iter) { fRuns = iter; }
86 void SetSequence(MSequence *seq, Bool_t usedata=kFALSE) { fSequence = seq; }
87 void SetOutputPath(const char *path=".");
88 void SetEnv(const char *env);
89 void SetMaxEvents(Int_t max) { fMaxEvents = max; }
90
91 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); }
92
93 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
94 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
95
96 ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam)
97};
98
99#endif
Note: See TracBrowser for help on using the repository browser.