source: trunk/MagicSoft/Mars/mfileio/MReadReports.h@ 8433

Last change on this file since 8433 was 7115, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef MARS_MReadReports
2#define MARS_MReadReports
3
4#ifndef MARS_MRead
5#include "MRead.h"
6#endif
7
8#ifndef ROOT_TArrayL
9#include <TArrayL.h>
10#endif
11
12class TChain;
13class MTime;
14class MTaskList;
15class MReadTree;
16
17class MReadReports : public MRead
18{
19public:
20 enum Type_t {
21 kStandard,
22 kMaster,
23 kRequired
24 };
25
26private:
27 MTaskList *fTrees; // Hold the trees which are scheduled for reading
28 TList *fChains; // Hold TChains to read the times in advance
29
30 TArrayL fPosEntry; // Store the position in each tree/chain
31 TArrayL fPosTree; // Number of Tree in file.
32
33 Bool_t fEnableAutoScheme;
34 Int_t fNumRequired;
35 //Bool_t fFirstReInit;
36
37 void ForceRequired();
38 MTime** GetTime(TChain *c) const;
39 Int_t FindNextTime();
40 Int_t FindNextRequired();
41 Int_t FindNext() { return fNumRequired==0 ? FindNextTime() : FindNextRequired(); }
42
43 UInt_t GetEntries();
44 TString GetFullFileName() const;
45
46 //Bool_t ReInit(MParList *plist);
47 Int_t PreProcess(MParList *plist);
48 Int_t Process();
49 Int_t PostProcess();
50
51 enum {
52 kHasMaster = BIT(14),
53 kIsRequired = BIT(22),
54 kIsProcessed = BIT(23)
55 };
56
57public:
58 MReadReports();
59 ~MReadReports();
60
61 void AddTree(const char *tree, const char *time=NULL, Type_t master=kStandard);
62 void AddTree(const char *tree, Type_t master)
63 {
64 AddTree(tree, NULL, master);
65 }
66 Int_t AddFile(const char *fname, Int_t entries=-1);
67 void AddToBranchList(const char *name);
68
69 void PrintStatistics(const Int_t lvl=0, Bool_t title=kFALSE, Double_t time=0) const;
70
71 void EnableAutoScheme(Bool_t e=kTRUE) { fEnableAutoScheme = e; } // Must be called BEFORE AddTree!
72
73 MReadTree *GetReader(const char *tree) const;
74
75 ClassDef(MReadReports, 0) // Reads events and reports from a root file ordered in time
76};
77
78#endif
Note: See TracBrowser for help on using the repository browser.