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

Last change on this file since 1888 was 1888, checked in by wittek, 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
12#include <TRandom3.h>
13
14class TList;
15class MTime;
16class MMcEvt;
17class MMcTrig;
18class MGeomCam;
19class MSrcPosCam;
20class MCerPhotEvt;
21class MPedestalCam;
22class MBlindPixels;
23class MRawRunHeader;
24class MTaskList;
25class MParList;
26class MParameterD;
27
28struct outputpars;
29struct eventrecord;
30
31class MCT1ReadPreProc : public MRead
32{
33private:
34 ifstream *fIn; // the inputfile
35 TList *fFileNames; // Array which stores the \0-terminated filenames
36
37 MGeomCam *fGeom; // camera geometry
38 MCerPhotEvt *fNphot; // the data container for all data.
39 MPedestalCam *fPedest; // ct1 pedestals
40 MTime *fTime; // event time
41 MMcEvt *fMcEvt; // monte carlo data container for MC files
42 MMcTrig *fMcTrig; // mc data container for trigger information
43 MSrcPosCam *fSrcPos; // source position in the camera
44 MBlindPixels *fBlinds; // Array holding blind pixels
45 MRawRunHeader *fRawRunHeader; // raw run header
46 MParList *fParList; // parameter list
47 MParameterD *fHourAngle; // hour angle [deg]
48 MParameterD *fThetaOrig; // original zenith angle [rad]
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 TRandom3 ran3;
61
62 Bool_t OpenNextFile();
63
64 Int_t GetNumEvents(const TString name) const;
65 Bool_t CheckHeader(const TString fname) const;
66
67 void ReadPedestals();
68 Int_t ReadRunHeader();
69 Int_t ReadRunFooter();
70 Bool_t CheckFilePosition();
71 void ProcessRunHeader(const struct outputpars &outpars);
72 void ProcessEvent(const struct eventrecord &event);
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 Bool_t SmearTheta(MParList *plist, Float_t *theta, Float_t *thetasmeared);
90
91 ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
92};
93
94#endif
95
96
97
Note: See TracBrowser for help on using the repository browser.