source: trunk/Mars/mfileio/MReadFiles.h@ 17048

Last change on this file since 17048 was 11553, checked in by tbretz, 13 years ago
Replaced MZlib with izstream
File size: 1.3 KB
Line 
1#ifndef MARS_MReadFiles
2#define MARS_MReadFiles
3
4#ifndef MARS_MRead
5#include "MRead.h"
6#endif
7
8class izstream;
9
10class MReadFiles : public MRead
11{
12private:
13 TList fFileNames; // Array which stores the \0-terminated filenames
14
15 TString fFileName; // Currently open file
16
17 UInt_t fNumFile; // File number in sequence
18 UInt_t fNumLine; // Line number in file
19
20 MParList *fParList; //! Parlist for reinitialization
21
22 virtual Bool_t AnalyzeHeader(MParList &plist)=0;
23 virtual Bool_t ReadHeader()=0;
24 virtual Int_t ReadEvent()=0;
25
26protected:
27 izstream *fIn; // the inputfile
28
29 // MReadFiles
30 Bool_t ReadLine(TString &line);
31
32 UInt_t GetNumLine() const { return fNumLine; }
33
34 Bool_t OpenNextFile(Int_t num=-1);
35 Bool_t CheckFile(TString name) const;
36
37 // MTask
38 Int_t PreProcess(MParList *pList);
39 Int_t Process();
40 Int_t PostProcess();
41
42public:
43 MReadFiles(const char *filename=NULL, const char *name=NULL,
44 const char *title=NULL);
45 ~MReadFiles();
46
47 Int_t AddFile(const char *fname, int i=0);
48
49 Bool_t Rewind();
50 void Close();
51 TString GetFullFileName() const { return fFileName; }
52
53 ClassDef(MReadFiles, 0) // Base class to read a chain of files
54};
55
56#endif
Note: See TracBrowser for help on using the repository browser.