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

Last change on this file since 1840 was 1809, checked in by wittek, 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 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
69public:
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
Note: See TracBrowser for help on using the repository browser.