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 |
|
---|
25 | struct outputpars;
|
---|
26 | struct eventrecord;
|
---|
27 |
|
---|
28 | class MCT1ReadPreProc : public MRead
|
---|
29 | {
|
---|
30 | private:
|
---|
31 | ifstream *fIn; // the inputfile
|
---|
32 | TList *fFileNames; // Array which stores the \0-terminated filenames
|
---|
33 |
|
---|
34 | MGeomCam *fGeom; // camera geometry
|
---|
35 | MCerPhotEvt *fNphot; // the data container for all data.
|
---|
36 | MPedestalCam *fPedest; // ct1 pedestals
|
---|
37 | MTime *fTime; // event time
|
---|
38 | MMcEvt *fMcEvt; // monte carlo data container for MC files
|
---|
39 | MMcTrig *fMcTrig; // mc data container for trigger information
|
---|
40 | MSrcPosCam *fSrcPos; // source position in the camera
|
---|
41 | MBlindPixels *fBlinds; // Array holding blind pixels
|
---|
42 | MRawRunHeader *fRawRunHeader; // raw run header
|
---|
43 | MParList *fParList; // parameter list
|
---|
44 |
|
---|
45 | Bool_t fIsMcFile; // Flag whether current run is a MC run
|
---|
46 |
|
---|
47 | UInt_t fNumEvents; // number of events counted in all runs in all files
|
---|
48 | UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
|
---|
49 | UInt_t fNumRuns; // number of processed runs of all files
|
---|
50 | UInt_t fEntries; // entries of all files succesfully added
|
---|
51 | UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
|
---|
52 |
|
---|
53 | TArrayF fPedRMS;
|
---|
54 |
|
---|
55 |
|
---|
56 | Bool_t OpenNextFile();
|
---|
57 |
|
---|
58 | Int_t GetNumEvents(const TString name) const;
|
---|
59 | Bool_t CheckHeader(const TString fname) const;
|
---|
60 |
|
---|
61 | void ReadPedestals();
|
---|
62 | Int_t ReadRunHeader();
|
---|
63 | Int_t ReadRunFooter();
|
---|
64 | Bool_t CheckFilePosition();
|
---|
65 | void ProcessRunHeader(const struct outputpars &outpars);
|
---|
66 | void ProcessEvent(const struct eventrecord &event);
|
---|
67 |
|
---|
68 | Bool_t PreProcess(MParList *pList);
|
---|
69 | Bool_t Process();
|
---|
70 | Bool_t PostProcess();
|
---|
71 |
|
---|
72 | public:
|
---|
73 | MCT1ReadPreProc(const char *filename=NULL,
|
---|
74 | const char *name=NULL,
|
---|
75 | const char *title=NULL);
|
---|
76 |
|
---|
77 | ~MCT1ReadPreProc();
|
---|
78 |
|
---|
79 | void AddFile(const char *fname);
|
---|
80 |
|
---|
81 | UInt_t GetEntries() { return fEntries; }
|
---|
82 |
|
---|
83 | ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
|
---|
84 | };
|
---|
85 |
|
---|
86 | #endif
|
---|
87 |
|
---|