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

Last change on this file since 1935 was 1899, checked in by tbretz, 21 years ago
*** empty log message ***
File size: 2.6 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 fNumEvents; // number of events counted in all runs in all files
53 UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
54 UInt_t fNumRuns; // number of processed runs of all files
55 UInt_t fEntries; // entries of all files succesfully added
56 UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
57
58 TArrayF fPedRMS;
59
60 Bool_t OpenNextFile();
61
62 Int_t GetNumEvents(const TString name) const;
63 Bool_t CheckHeader(const TString fname) const;
64
65 void ReadPedestals();
66 Int_t ReadRunHeader();
67 Int_t ReadRunFooter();
68 Bool_t CheckFilePosition();
69 void ProcessRunHeader(const struct outputpars &outpars);
70 void ProcessEvent(const struct eventrecord &event);
71
72 Double_t SmearTheta(Double_t theta);
73
74 Bool_t PreProcess(MParList *pList);
75 Bool_t Process();
76 Bool_t PostProcess();
77
78public:
79 MCT1ReadPreProc(const char *filename=NULL,
80 const char *name=NULL,
81 const char *title=NULL);
82
83 ~MCT1ReadPreProc();
84
85 void AddFile(const char *fname);
86
87 UInt_t GetEntries() { return fEntries; }
88
89 ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
90};
91
92#endif
93
94
95
Note: See TracBrowser for help on using the repository browser.