Last change
on this file since 12704 was 11447, checked in by tbretz, 13 years ago |
Added virtual function to initialize reading event data.
|
File size:
1.5 KB
|
Line | |
---|
1 | #ifndef MARS_MRawFileRead
|
---|
2 | #define MARS_MRawFileRead
|
---|
3 |
|
---|
4 | #ifndef MARS_MRawRead
|
---|
5 | #include "MRawRead.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TList;
|
---|
9 | class MTaskList;
|
---|
10 |
|
---|
11 | class MRawFileRead : public MRawRead
|
---|
12 | {
|
---|
13 | private:
|
---|
14 | TList *fFileNames; // list of file names
|
---|
15 | UInt_t fNumFile; //! number of next file
|
---|
16 | UInt_t fNumEvents; //! input stream (file to read from)
|
---|
17 | UInt_t fNumTotalEvents; //! total number of events in all files
|
---|
18 |
|
---|
19 | istream *fIn; //! input stream (file to read from)
|
---|
20 |
|
---|
21 | MParList *fParList; //! tasklist to call ReInit from
|
---|
22 |
|
---|
23 | UInt_t fInterleave;
|
---|
24 |
|
---|
25 | Bool_t fForce;
|
---|
26 |
|
---|
27 | virtual istream *OpenFile(const char *filename);
|
---|
28 | virtual Bool_t ReadRunHeader(istream &fin);
|
---|
29 | virtual Bool_t InitReadData(istream &fin) { return kTRUE; }
|
---|
30 |
|
---|
31 | Int_t OpenNextFile(Bool_t print=kTRUE);
|
---|
32 | Bool_t CalcNumTotalEvents();
|
---|
33 |
|
---|
34 | Int_t PreProcess(MParList *pList);
|
---|
35 | Int_t Process();
|
---|
36 | Int_t PostProcess();
|
---|
37 |
|
---|
38 | public:
|
---|
39 | MRawFileRead(const char *filename=NULL, const char *name=NULL, const char *title=NULL);
|
---|
40 | ~MRawFileRead();
|
---|
41 |
|
---|
42 | static Byte_t IsFileValid(const char *name);
|
---|
43 |
|
---|
44 | void SetInterleave(UInt_t i) { fInterleave = i; }
|
---|
45 | void SetForce(Bool_t b=kTRUE) { fForce=b; }
|
---|
46 |
|
---|
47 | TString GetFullFileName() const;
|
---|
48 |
|
---|
49 | Int_t AddFile(const char *fname, Int_t entries=-1);
|
---|
50 | Bool_t Rewind();
|
---|
51 | UInt_t GetEntries() { return fNumTotalEvents/fInterleave; }
|
---|
52 |
|
---|
53 | ClassDef(MRawFileRead, 0) // Task to read the raw data binary file
|
---|
54 | };
|
---|
55 |
|
---|
56 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.