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

Last change on this file since 1788 was 1735, checked in by rwagner, 22 years ago
*** empty log message ***
File size: 2.3 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;
17class MRawRunHeader;
18class MTaskList;
19class MParList;
20
21struct outputpars;
22struct eventrecord;
23
24class MCT1ReadPreProc : public MRead
25{
26private:
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
66public:
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
Note: See TracBrowser for help on using the repository browser.