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

Last change on this file since 2149 was 2132, checked in by wittek, 22 years ago
*** empty log message ***
File size: 2.7 KB
Line 
1#ifndef MARS_MCT1ReadPreProc
2#define MARS_MCT1ReadPreProc
3
4#ifndef ROOT_TArrayF
5#include <TArrayF.h>
6#endif
7
8#ifndef MARS_MRead
9#include "MRead.h"
10#endif
11
12class TList;
13class MTime;
14class MMcEvt;
15class MMcTrig;
16class MGeomCam;
17class MSrcPosCam;
18class MCerPhotEvt;
19class MPedestalCam;
20class MBlindPixels;
21class MRawRunHeader;
22class MTaskList;
23class MParList;
24class MParameterD;
25class MBinning;
26
27struct outputpars;
28struct eventrecord;
29
30class MCT1ReadPreProc : public MRead
31{
32private:
33 ifstream *fIn; // the inputfile
34 TList *fFileNames; // Array which stores the \0-terminated filenames
35
36 MGeomCam *fGeom; // camera geometry
37 MCerPhotEvt *fNphot; // the data container for all data.
38 MPedestalCam *fPedest; // ct1 pedestals
39 MTime *fTime; // event time
40 MMcEvt *fMcEvt; // monte carlo data container for MC files
41 MMcTrig *fMcTrig; // mc data container for trigger information
42 MSrcPosCam *fSrcPos; // source position in the camera
43 MBlindPixels *fBlinds; // Array holding blind pixels
44 MRawRunHeader *fRawRunHeader; // raw run header
45 MParList *fParList; // parameter list
46 MParameterD *fHourAngle; // hour angle [deg]
47 MParameterD *fThetaOrig; // original zenith angle [rad]
48 MBinning *fBinningT; // Theta binning for the smearing
49
50 Bool_t fIsMcFile; // Flag whether current run is a MC run
51
52 UInt_t fNumFile;
53 UInt_t fNumEvents; // number of events counted in all runs in all files
54 UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
55 UInt_t fNumRuns; // number of processed runs of all files
56 UInt_t fEntries; // entries of all files succesfully added
57 UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
58
59 TArrayF fPedRMS;
60
61 Bool_t OpenNextFile();
62
63 Int_t GetNumEvents(const TString name) const;
64 Bool_t CheckHeader(const TString fname) const;
65
66 void ReadPedestals();
67 Int_t ReadRunHeader();
68 Int_t ReadRunFooter();
69 Bool_t CheckFilePosition();
70 void ProcessRunHeader(const struct outputpars &outpars);
71 Bool_t ProcessEvent(const struct eventrecord &event);
72
73 Double_t SmearTheta(Double_t theta);
74 Double_t DiscreteTheta(Double_t theta);
75
76 Bool_t PreProcess(MParList *pList);
77 Bool_t Process();
78 Bool_t PostProcess();
79
80 Bool_t Rewind();
81
82public:
83 MCT1ReadPreProc(const char *filename=NULL,
84 const char *name=NULL,
85 const char *title=NULL);
86
87 ~MCT1ReadPreProc();
88
89 void AddFile(const char *fname);
90
91 UInt_t GetEntries() { return fEntries; }
92
93 ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
94};
95
96#endif
97
98
99
Note: See TracBrowser for help on using the repository browser.