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

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