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