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 fNumEvents; // number of events counted in all runs in all files
|
---|
53 | UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
|
---|
54 | UInt_t fNumRuns; // number of processed runs of all files
|
---|
55 | UInt_t fEntries; // entries of all files succesfully added
|
---|
56 | UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
|
---|
57 |
|
---|
58 | TArrayF fPedRMS;
|
---|
59 |
|
---|
60 | Bool_t OpenNextFile();
|
---|
61 |
|
---|
62 | Int_t GetNumEvents(const TString name) const;
|
---|
63 | Bool_t CheckHeader(const TString fname) const;
|
---|
64 |
|
---|
65 | void ReadPedestals();
|
---|
66 | Int_t ReadRunHeader();
|
---|
67 | Int_t ReadRunFooter();
|
---|
68 | Bool_t CheckFilePosition();
|
---|
69 | void ProcessRunHeader(const struct outputpars &outpars);
|
---|
70 | Bool_t ProcessEvent(const struct eventrecord &event);
|
---|
71 |
|
---|
72 | Double_t SmearTheta(Double_t theta);
|
---|
73 |
|
---|
74 | Bool_t PreProcess(MParList *pList);
|
---|
75 | Bool_t Process();
|
---|
76 | Bool_t PostProcess();
|
---|
77 |
|
---|
78 | public:
|
---|
79 | MCT1ReadPreProc(const char *filename=NULL,
|
---|
80 | const char *name=NULL,
|
---|
81 | const char *title=NULL);
|
---|
82 |
|
---|
83 | ~MCT1ReadPreProc();
|
---|
84 |
|
---|
85 | void AddFile(const char *fname);
|
---|
86 |
|
---|
87 | UInt_t GetEntries() { return fEntries; }
|
---|
88 |
|
---|
89 | ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
|
---|
90 | };
|
---|
91 |
|
---|
92 | #endif
|
---|
93 |
|
---|
94 |
|
---|
95 |
|
---|