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

Last change on this file since 4601 was 4601, checked in by tbretz, 20 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
60public:
61 MJPedestal(const char *name=NULL, const char *title=NULL);
62 ~MJPedestal();
63
64 MPedestalCam &GetPedestalCam() { return fPedestalCam; }
65 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
66
67 const char* GetOutputFile() const;
68 const Bool_t IsDataCheck() const { return fDataCheck; }
69
70 Bool_t Process();
71 Bool_t ProcessFile();
72
73 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
74 void SetExtractor(MExtractor* ext) { fExtractor = ext; }
75 void SetInput(MRunIter *iter) { fRuns = iter; }
76 void SetSequence(MSequence *seq) { fSequence = seq; }
77 void SetOutputPath(const char *path=".");
78 void SetEnv(const char *env);
79
80 void SetDataCheck(const Bool_t b=kTRUE) { fDataCheck = b; SetDataCheckDisplay(); }
81
82 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
83 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
84
85 ClassDef(MJPedestal, 0) // Tool to create a pedestal file (MPedestalCam)
86};
87
88#endif
Note: See TracBrowser for help on using the repository browser.