| Line |  | 
|---|
| 1 | #ifndef MREADTREE_H | 
|---|
| 2 | #define MREADTREE_H | 
|---|
| 3 |  | 
|---|
| 4 | #ifndef MTASK_H | 
|---|
| 5 | #include "MTask.h" | 
|---|
| 6 | #endif | 
|---|
| 7 |  | 
|---|
| 8 | class TFile; | 
|---|
| 9 | class TChain; | 
|---|
| 10 | class TArrayC; | 
|---|
| 11 |  | 
|---|
| 12 | class MReadTree : public MTask | 
|---|
| 13 | { | 
|---|
| 14 | private: | 
|---|
| 15 | TFile   *fFile;       // Pointer to file | 
|---|
| 16 | TChain  *fChain;      // Pointer to tree | 
|---|
| 17 |  | 
|---|
| 18 | TArrayC *fVetoList;   // List of Branches which are not allowed to get enabled | 
|---|
| 19 |  | 
|---|
| 20 | UInt_t   fNumEntry;   // Number of actual entry | 
|---|
| 21 | UInt_t   fNumEntries; // Number of Events in Tree | 
|---|
| 22 |  | 
|---|
| 23 | Bool_t   fLeafEnabled; // Flag whether UseLeaf is called the first time or not | 
|---|
| 24 |  | 
|---|
| 25 | Bool_t HasVeto(const char *name) const; | 
|---|
| 26 |  | 
|---|
| 27 | public: | 
|---|
| 28 | MReadTree(const char *treename, const char *filename=NULL, const char *name=NULL, const char *title=NULL); | 
|---|
| 29 | ~MReadTree(); | 
|---|
| 30 |  | 
|---|
| 31 | Bool_t PreProcess(MParList *pList); | 
|---|
| 32 | Bool_t Process(); | 
|---|
| 33 |  | 
|---|
| 34 | Int_t AddFile(const char *fname); | 
|---|
| 35 | void  VetoBranch(const char *name); | 
|---|
| 36 |  | 
|---|
| 37 | void UseLeaf(const char *name); | 
|---|
| 38 |  | 
|---|
| 39 | Bool_t GetEvent(); | 
|---|
| 40 |  | 
|---|
| 41 | Bool_t DecEventNum(UInt_t dec=1); // decrease number of event (position in tree) | 
|---|
| 42 | Bool_t IncEventNum(UInt_t inc=1); // increase number of event (position in tree) | 
|---|
| 43 | Bool_t SetEventNum(UInt_t nr);    // set number of event (position in tree) | 
|---|
| 44 |  | 
|---|
| 45 | UInt_t GetEventNum() const { return fNumEntry;   } | 
|---|
| 46 | UInt_t GetEntries() const  { return fNumEntries; } | 
|---|
| 47 |  | 
|---|
| 48 | ClassDef(MReadTree, 0)      // Reads one tree | 
|---|
| 49 | }; | 
|---|
| 50 |  | 
|---|
| 51 | #endif | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.