source: trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h@ 4905

Last change on this file since 4905 was 4742, checked in by gaug, 20 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MARS_MJExtractCalibTest
2#define MARS_MJExtractCalibTest
3
4#ifndef MARS_MJob
5#include "MJob.h"
6#endif
7#ifndef MARS_MCalibrationTestCam
8#include "MCalibrationTestCam.h"
9#endif
10#ifndef MARS_MHCalibrationTestTimeCam
11#include "MHCalibrationTestTimeCam.h"
12#endif
13#ifndef MARS_MPedPhotCam
14#include "MPedPhotCam.h"
15#endif
16#ifndef MARS_MBadPixelsCam
17#include "MBadPixelsCam.h"
18#endif
19
20class MRunIter;
21class MParList;
22class MPedestalCam;
23class MCalibrationRelTimeCam;
24class MCalibrationChargeCam;
25class MCalibrationQECam;
26class MExtractor;
27class MExtractTime;
28class MJExtractCalibTest : public MJob
29{
30private:
31
32 Bool_t fUseCosmicsFilter;
33
34 MRunIter *fRuns; // Data files
35 MExtractor *fExtractor; // Signal extractor
36 MExtractTime *fTimeExtractor; // Arrival time extractor
37
38 MBadPixelsCam fBadPixels;
39 MCalibrationTestCam fTestCam;
40 MHCalibrationTestTimeCam fTestTimeCam;
41 MPedPhotCam fPedPhotCam;
42
43 enum Display_t // Possible Display types
44 {
45 kDataCheckDisplay,
46 kNormalDisplay
47 };
48
49 Display_t fDisplayType; // Chosen Display type
50
51 Bool_t ReadPedPhotCam();
52
53 void DisplayResult(MParList &plist);
54 void DisplayResultT(MParList &plist);
55
56 Bool_t WriteResultD();
57 Bool_t WriteResultT();
58
59 Bool_t ProcessFileD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam);
60 Bool_t ProcessFileT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam);
61
62 Bool_t CheckEnv();
63
64public:
65 MJExtractCalibTest(const char *name=NULL, const char *title=NULL);
66
67 void SetInput(MRunIter *iter) { fRuns = iter; }
68
69 const char* GetOutputFile() const;
70
71 MCalibrationTestCam &GetTestCam() { return fTestCam; }
72 MHCalibrationTestTimeCam &GetTestTimeCam() { return fTestTimeCam; }
73 MPedPhotCam &GetPedPhotCam() { return fPedPhotCam; }
74 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; }
75
76 void SetExtractor(MExtractor* ext) { fExtractor = ext; }
77 void SetTimeExtractor(MExtractTime* ext) { fTimeExtractor = ext; }
78 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
79 void SetUseCosmicsFilter( const Bool_t b ) { fUseCosmicsFilter = b; }
80
81 // Displays
82 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; }
83 void SetNormalDisplay() { fDisplayType = kNormalDisplay; }
84
85 Bool_t ProcessD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam);
86 Bool_t ProcessT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam);
87
88 ClassDef(MJExtractCalibTest, 0) // Tool to extract, calibrate and test the signal
89};
90
91#endif
Note: See TracBrowser for help on using the repository browser.