source: trunk/MagicSoft/Mars/manalysisct1/MCT1ReadPreProc.h@ 5749

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