source: trunk/Mars/mreport/MReportFileRead.h@ 10316

Last change on this file since 10316 was 8963, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.5 KB
Line 
1#ifndef MARS_MReportFileRead
2#define MARS_MReportFileRead
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7#ifndef MARS_MTime
8#include "MTime.h"
9#endif
10
11class THashTable;
12
13class MTime;
14class MReport;
15class MReportHelp;
16
17class MReportFileRead : public MTask
18{
19private:
20 TString fFileName; // Name of the input file
21
22 THashTable *fList; // List of possible reports to be interpreted
23
24 MTime fStart; // Time range which should be read from file
25 MTime fStop; // Time range which should be read from file
26
27 Long_t fNumLine; // line counter
28
29 Int_t fVersion; // File format version
30
31 enum { kHasNoHeader = BIT(14) };
32
33 Int_t PreProcess(MParList *pList);
34 Int_t Process();
35 Int_t PostProcess();
36
37 virtual Int_t CheckFileHeader() { return 0; }
38 MReport *GetReport(const TString &str) const;
39 MReport *GetReport(MReportHelp *help) const;
40 MReportHelp *GetReportHelp(const TString &str) const;
41
42protected:
43 ifstream *fIn; //! buffered input stream (file to read from)
44 void SetVersion(Int_t v) { fVersion = v; }
45
46public:
47 MReportFileRead(const char *filename, const char *name=NULL, const char *title=NULL);
48 ~MReportFileRead();
49
50 void SetHasNoHeader() { SetBit(kHasNoHeader); }
51 void SetTimeStart(const MTime &tm) { fStart = tm; }
52 void SetTimeStop(const MTime &tm) { fStop = tm; }
53
54 Bool_t AddToList(const char *name) const;
55
56 ClassDef(MReportFileRead, 0)// Task to read general report file
57};
58
59#endif
Note: See TracBrowser for help on using the repository browser.