1 | #ifndef MARS_MCT1ReadPreProc
|
---|
2 | #define MARS_MCT1ReadPreProc
|
---|
3 |
|
---|
4 | #ifndef MARS_MRead
|
---|
5 | #include "MRead.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TList;
|
---|
9 | class MMcEvt;
|
---|
10 | class MMcTrig;
|
---|
11 | class MGeomCam;
|
---|
12 | class MSrcPosCam;
|
---|
13 | class MCerPhotEvt;
|
---|
14 | class MPedestalCam;
|
---|
15 | class MBlindPixels;
|
---|
16 |
|
---|
17 | struct outputpars;
|
---|
18 | struct eventrecord;
|
---|
19 |
|
---|
20 | class MCT1ReadPreProc : public MRead
|
---|
21 | {
|
---|
22 | private:
|
---|
23 | ifstream *fIn; // the inputfile
|
---|
24 | TList *fFileNames; // Array which stores the \0-terminated filenames
|
---|
25 |
|
---|
26 | MGeomCam *fGeom; // camera geometry
|
---|
27 | MCerPhotEvt *fNphot; // the data container for all data.
|
---|
28 | MPedestalCam *fPedest; // ct1 pedestals
|
---|
29 | MMcEvt *fMcEvt; // monte carlo data container for MC files
|
---|
30 | MMcTrig *fMcTrig; // mc data container for trigger information
|
---|
31 | MSrcPosCam *fSrcPos; // source position in the camera
|
---|
32 | MBlindPixels *fBlinds; // Array holding blind pixels
|
---|
33 |
|
---|
34 | Bool_t fIsMcFile; // Flag whether current run is a MC run
|
---|
35 |
|
---|
36 | UInt_t fNumEvents; // number of events counted in all runs in all files
|
---|
37 | UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
|
---|
38 | UInt_t fNumRuns; // number of processed runs of all files
|
---|
39 | UInt_t fEntries; // entries of all files succesfully added
|
---|
40 | UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
|
---|
41 |
|
---|
42 | Bool_t OpenNextFile();
|
---|
43 |
|
---|
44 | Int_t GetNumEvents();
|
---|
45 |
|
---|
46 | void ReadPedestals();
|
---|
47 | Bool_t ReadRunHeader();
|
---|
48 | Bool_t ReadRunFooter();
|
---|
49 | Bool_t CheckFilePosition();
|
---|
50 | void ProcessRunHeader(const struct outputpars &outpars);
|
---|
51 | void ProcessEvent(const struct eventrecord &event);
|
---|
52 |
|
---|
53 | public:
|
---|
54 | MCT1ReadPreProc(const char *filename=NULL,
|
---|
55 | const char *name=NULL,
|
---|
56 | const char *title=NULL);
|
---|
57 |
|
---|
58 | ~MCT1ReadPreProc();
|
---|
59 |
|
---|
60 | void AddFile(const char *fname);
|
---|
61 |
|
---|
62 | Bool_t PreProcess(MParList *pList);
|
---|
63 | Bool_t Process();
|
---|
64 | Bool_t PostProcess();
|
---|
65 |
|
---|
66 | UInt_t GetEntries() { return fEntries; }
|
---|
67 |
|
---|
68 | ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 data file
|
---|
69 | };
|
---|
70 |
|
---|
71 | #endif
|
---|
72 |
|
---|