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

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