source: trunk/Mars/mraw/MRawFileRead.h@ 15062

Last change on this file since 15062 was 14449, checked in by tbretz, 12 years ago
Added some missing std::
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
8class TList;
9class MTaskList;
10
11class MRawFileRead : public MRawRead
12{
13private:
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 std::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 std::istream *OpenFile(const char *filename);
28 virtual Bool_t ReadRunHeader(std::istream &fin);
29 virtual Bool_t InitReadData(std::istream &fin) { return kTRUE; }
30
31 Int_t OpenNextFile(Bool_t print=kTRUE);
32 Bool_t CalcNumTotalEvents();
33
34protected:
35 Int_t PreProcess(MParList *pList);
36 Int_t Process();
37 Int_t PostProcess();
38
39public:
40 MRawFileRead(const char *filename=NULL, const char *name=NULL, const char *title=NULL);
41 ~MRawFileRead();
42
43 static Byte_t IsFileValid(const char *name);
44
45 void SetInterleave(UInt_t i) { fInterleave = i; }
46 void SetForce(Bool_t b=kTRUE) { fForce=b; }
47
48 TString GetFullFileName() const;
49
50 Int_t AddFile(const char *fname, Int_t entries=-1);
51 Bool_t Rewind();
52 UInt_t GetEntries() { return fNumTotalEvents/fInterleave; }
53
54 ClassDef(MRawFileRead, 0) // Task to read the raw data binary file
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.