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