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

Last change on this file since 4611 was 4609, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.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;
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 fgRefPedRmsClosedLids;
33 static const Float_t fgRefPedRmsExtraGalactic;
34 static const Float_t fgRefPedRmsGalactic;
35
36 TString fOutputPath;
37
38 TEnv *fEnv; // Input setup-file
39 MRunIter *fRuns;
40 MSequence *fSequence; //
41
42 MExtractor *fExtractor; // Signal extractor, used to find the nr. of used FADC slices
43
44 MPedestalCam fPedestalCam;
45 MBadPixelsCam fBadPixels;
46
47 enum Display_t { kDataCheckDisplay, kNormalDisplay }; // Possible Display types
48
49 Display_t fDisplayType; // Chosen Display type
50
51 Bool_t fDataCheck; // Flag if the data check is run on raw data
52
53 Bool_t ReadPedestalCam();
54 Bool_t WriteResult();
55
56 void DisplayResult(MParList &plist);
57 void DisplayReferenceLines(MHCamera *cam, const Int_t what) const;
58 void DisplayOutliers(TH1D *hist) const;
59
60 void CheckEnv();
61
62public:
63 MJPedestal(const char *name=NULL, const char *title=NULL);
64 ~MJPedestal();
65
66 MPedestalCam &GetPedestalCam() { return fPedestalCam; }
67 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
68
69 const char* GetOutputFile() const;
70 const Bool_t IsDataCheck() const { return fDataCheck; }
71
72 Bool_t Process();
73 Bool_t ProcessFile();
74
75 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
76 void SetExtractor(MExtractor* ext) { fExtractor = ext; }
77 void SetInput(MRunIter *iter) { fRuns = iter; }
78 void SetSequence(MSequence *seq) { fSequence = seq; }
79 void SetOutputPath(const char *path=".");
80 void SetEnv(const char *env);
81
82 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); }
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.