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

Last change on this file since 1849 was 1849, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.4 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;
24
25struct outputpars;
26struct eventrecord;
27
28class MCT1ReadPreProc : public MRead
29{
30private:
31 ifstream *fIn; // the inputfile
32 TList *fFileNames; // Array which stores the \0-terminated filenames
33
34 MGeomCam *fGeom; // camera geometry
35 MCerPhotEvt *fNphot; // the data container for all data.
36 MPedestalCam *fPedest; // ct1 pedestals
37 MTime *fTime; // event time
38 MMcEvt *fMcEvt; // monte carlo data container for MC files
39 MMcTrig *fMcTrig; // mc data container for trigger information
40 MSrcPosCam *fSrcPos; // source position in the camera
41 MBlindPixels *fBlinds; // Array holding blind pixels
42 MRawRunHeader *fRawRunHeader; // raw run header
43 MParList *fParList; // parameter list
44
45 Bool_t fIsMcFile; // Flag whether current run is a MC run
46
47 UInt_t fNumEvents; // number of events counted in all runs in all files
48 UInt_t fNumEventsInRun; // number of events in the counted in th ecurrent run
49 UInt_t fNumRuns; // number of processed runs of all files
50 UInt_t fEntries; // entries of all files succesfully added
51 UInt_t fNumFilterEvts; // number of events mentioned in the runs footers
52
53 TArrayF fPedRMS;
54
55
56 Bool_t OpenNextFile();
57
58 Int_t GetNumEvents(const TString name) const;
59 Bool_t CheckHeader(const TString fname) const;
60
61 void ReadPedestals();
62 Int_t ReadRunHeader();
63 Int_t ReadRunFooter();
64 Bool_t CheckFilePosition();
65 void ProcessRunHeader(const struct outputpars &outpars);
66 void ProcessEvent(const struct eventrecord &event);
67
68 Bool_t PreProcess(MParList *pList);
69 Bool_t Process();
70 Bool_t PostProcess();
71
72public:
73 MCT1ReadPreProc(const char *filename=NULL,
74 const char *name=NULL,
75 const char *title=NULL);
76
77 ~MCT1ReadPreProc();
78
79 void AddFile(const char *fname);
80
81 UInt_t GetEntries() { return fEntries; }
82
83 ClassDef(MCT1ReadPreProc, 0) // Reads the CT1 preproc data file
84};
85
86#endif
87
Note: See TracBrowser for help on using the repository browser.