1 | #ifndef MARS_MCT1ReadPreProc
|
---|
2 | #define MARS_MCT1ReadPreProc
|
---|
3 |
|
---|
4 | #ifndef ROOT_TArrayF
|
---|
5 | #include <TArrayF.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MRead
|
---|
9 | #include "MRead.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class TList;
|
---|
13 | class MTime;
|
---|
14 | class MMcEvt;
|
---|
15 | class MMcTrig;
|
---|
16 | class MGeomCam;
|
---|
17 | class MSrcPosCam;
|
---|
18 | class MCerPhotEvt;
|
---|
19 | class MPedestalCam;
|
---|
20 | class MBlindPixels;
|
---|
21 | class MRawRunHeader;
|
---|
22 | class MTaskList;
|
---|
23 | class MParList;
|
---|
24 | class MParameterD;
|
---|
25 | class MBinning;
|
---|
26 |
|
---|
27 | struct outputpars;
|
---|
28 | struct eventrecord;
|
---|
29 |
|
---|
30 | class MCT1ReadPreProc : public MRead
|
---|
31 | {
|
---|
32 | private:
|
---|
33 | ifstream *fIn; // the inputfile
|
---|
34 | TList *fFileNames; // Array which stores the \0-terminated filenames
|
---|
35 |
|
---|
36 | MGeomCam *fGeom; // camera geometry
|
---|
37 | MCerPhotEvt *fNphot; // the data container for all data.
|
---|
38 | MPedestalCam *fPedest; // ct1 pedestals
|
---|
39 | MTime *fTime; // event time
|
---|
40 | MMcEvt *fMcEvt; // monte carlo data container for MC files
|
---|
41 | MMcTrig *fMcTrig; // mc data container for trigger information
|
---|
42 | MSrcPosCam *fSrcPos; // source position in the camera
|
---|
43 | MBlindPixels *fBlinds; // Array holding blind pixels
|
---|
44 | MRawRunHeader *fRawRunHeader; // raw run header
|
---|
45 | MParList *fParList; // parameter list
|
---|
46 | MParameterD *fHourAngle; // hour angle [deg]
|
---|
47 | MParameterD *fThetaOrig; // original zenith angle [rad]
|
---|
48 | MBinning *fBinningT; // Theta binning for the smearing
|
---|
49 |
|
---|
50 | Bool_t fIsMcFile; // Flag whether current run is a MC run
|
---|
51 |
|
---|
52 | UInt_t fNumFile;
|
---|
53 | UInt_t fNumEvents; // number of events counted in all runs in all files
|
---|
54 | UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
|
---|
55 | UInt_t fNumRuns; // number of processed runs of all files
|
---|
56 | UInt_t fEntries; // entries of all files succesfully added
|
---|
57 | UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
|
---|
58 |
|
---|
59 | TArrayF fPedRMS;
|
---|
60 |
|
---|
61 | Bool_t OpenNextFile();
|
---|
62 |
|
---|
63 | Int_t GetNumEvents(const TString name) const;
|
---|
64 | Bool_t CheckHeader(const TString fname) const;
|
---|
65 |
|
---|
66 | void ReadPedestals();
|
---|
67 | Int_t ReadRunHeader();
|
---|
68 | Int_t ReadRunFooter();
|
---|
69 | Bool_t CheckFilePosition();
|
---|
70 | void ProcessRunHeader(const struct outputpars &outpars);
|
---|
71 | Bool_t ProcessEvent(const struct eventrecord &event);
|
---|
72 |
|
---|
73 | Double_t SmearTheta(Double_t theta);
|
---|
74 | Double_t DiscreteTheta(Double_t theta);
|
---|
75 |
|
---|
76 | Bool_t PreProcess(MParList *pList);
|
---|
77 | Bool_t Process();
|
---|
78 | Bool_t PostProcess();
|
---|
79 |
|
---|
80 | Bool_t Rewind();
|
---|
81 |
|
---|
82 | public:
|
---|
83 | MCT1ReadPreProc(const char *filename=NULL,
|
---|
84 | const char *name=NULL,
|
---|
85 | const char *title=NULL);
|
---|
86 |
|
---|
87 | ~MCT1ReadPreProc();
|
---|
88 |
|
---|
89 | void AddFile(const char *fname);
|
---|
90 |
|
---|
91 | UInt_t GetEntries() { return fEntries; }
|
---|
92 |
|
---|
93 | ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
|
---|
94 | };
|
---|
95 |
|
---|
96 | #endif
|
---|
97 |
|
---|
98 |
|
---|
99 |
|
---|