source: trunk/MagicSoft/Mars/mbase/MReadTree.h@ 1028

Last change on this file since 1028 was 1020, checked in by tbretz, 23 years ago
*** empty log message ***
File size: 1.6 KB
Line 
1#ifndef MARS_MReadTree
2#define MARS_MReadTree
3
4#ifndef MARS_MTask
5#include "MTask.h"
6#endif
7
8class TChain;
9class TGProgressBar;
10
11class MReadTree : public MTask
12{
13private:
14 TChain *fChain; // Pointer to tree
15
16 UInt_t fNumEntry; // Number of actual entry
17 UInt_t fNumEntries; // Number of Events in Tree
18
19 Bool_t fBranchChoosing; // Flag for branch choosing method
20 Bool_t fAutoEnable; // Flag for auto enabeling scheme
21
22 TOrdCollection *fVetoList; // List of Branches which are not allowed to get enabled
23
24 TGProgressBar *fProgress; // Possible display of status
25
26 void EnableBranches(MParList *plist);
27 void EnableBranchChoosing();
28
29public:
30 MReadTree(const char *treename, const char *filename=NULL, const char *name=NULL, const char *title=NULL);
31 ~MReadTree();
32
33 Bool_t PreProcess(MParList *pList);
34 Bool_t Process();
35
36 void SetProgressBar(TGProgressBar *bar) { fProgress = bar; }
37
38 Int_t AddFile(const char *fname);
39 void VetoBranch(const char *name);
40
41 void EnableBranch(const char *name);
42
43 Bool_t GetEvent();
44
45 Bool_t DecEventNum(UInt_t dec=1); // decrease number of event (position in tree)
46 Bool_t IncEventNum(UInt_t inc=1); // increase number of event (position in tree)
47 Bool_t SetEventNum(UInt_t nr); // set number of event (position in tree)
48
49 UInt_t GetEventNum() const { return fNumEntry; }
50 UInt_t GetEntries() const { return fNumEntries; }
51
52 void DisableAutoScheme() { fAutoEnable = kFALSE; }
53
54 ClassDef(MReadTree, 0) // Reads one tree
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.