source: trunk/MagicSoft/Mars/mraw/MRawFileRead.h@ 7392

Last change on this file since 7392 was 6500, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 1.2 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 ifstream *fIn; //! input stream (file to read from)
20
21 MParList *fParList; //! tasklist to call ReInit from
22
23 UInt_t fInterleave;
24
25 Int_t OpenNextFile(Bool_t print=kTRUE);
26 Bool_t CalcNumTotalEvents();
27
28 Int_t PreProcess(MParList *pList);
29 Int_t Process();
30 Int_t PostProcess();
31
32public:
33 MRawFileRead(const char *filename=NULL, const char *name=NULL, const char *title=NULL);
34 ~MRawFileRead();
35
36 static Byte_t IsFileValid(const char *name);
37
38 void SetInterleave(UInt_t i) { fInterleave = i; }
39
40 TString GetFullFileName() const;
41
42 Int_t AddFile(const char *fname, Int_t entries=-1);
43 Bool_t Rewind();
44 UInt_t GetEntries() { return fNumTotalEvents/fInterleave; }
45
46 ClassDef(MRawFileRead, 0) // Task to read the raw data binary file
47};
48
49#endif
Note: See TracBrowser for help on using the repository browser.