source: trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h@ 1663

Last change on this file since 1663 was 1663, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.0 KB
Line 
1#ifndef MARS_MCT1ReadPreProc
2#define MARS_MCT1ReadPreProc
3
4#ifndef MARS_MRead
5#include "MRead.h"
6#endif
7
8class TList;
9class MMcEvt;
10class MMcTrig;
11class MGeomCam;
12class MSrcPosCam;
13class MCerPhotEvt;
14class MPedestalCam;
15class MBlindPixels;
16
17struct outputpars;
18struct eventrecord;
19
20class MCT1ReadPreProc : public MRead
21{
22private:
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
53public:
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 preproc data file
69};
70
71#endif
72
Note: See TracBrowser for help on using the repository browser.