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

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