| 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 | Bool_t OpenNextFile();
|
|---|
| 51 |
|
|---|
| 52 | Int_t GetNumEvents(const TString name) const;
|
|---|
| 53 | Bool_t CheckHeader(const TString fname) const;
|
|---|
| 54 |
|
|---|
| 55 | void ReadPedestals();
|
|---|
| 56 | Int_t ReadRunHeader();
|
|---|
| 57 | Int_t ReadRunFooter();
|
|---|
| 58 | Bool_t CheckFilePosition();
|
|---|
| 59 | void ProcessRunHeader(const struct outputpars &outpars);
|
|---|
| 60 | void ProcessEvent(const struct eventrecord &event);
|
|---|
| 61 |
|
|---|
| 62 | Bool_t PreProcess(MParList *pList);
|
|---|
| 63 | Bool_t Process();
|
|---|
| 64 | Bool_t PostProcess();
|
|---|
| 65 |
|
|---|
| 66 | public:
|
|---|
| 67 | MCT1ReadPreProc(const char *filename=NULL,
|
|---|
| 68 | const char *name=NULL,
|
|---|
| 69 | const char *title=NULL);
|
|---|
| 70 |
|
|---|
| 71 | ~MCT1ReadPreProc();
|
|---|
| 72 |
|
|---|
| 73 | void AddFile(const char *fname);
|
|---|
| 74 |
|
|---|
| 75 | UInt_t GetEntries() { return fEntries; }
|
|---|
| 76 |
|
|---|
| 77 | ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
|
|---|
| 78 | };
|
|---|
| 79 |
|
|---|
| 80 | #endif
|
|---|
| 81 |
|
|---|