Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootTreeReader.h@ d612dec

Last change on this file since d612dec was dc883b4, checked in by Pavel Demin <pavel.demin@…>, 4 years ago

add info to TreeWriter

  • Property mode set to 100644
File size: 995 bytes
Line 
1#ifndef ExRootTreeReader_h
2#define ExRootTreeReader_h
3
4/** \class ExRootTreeReader
5 *
6 * Class simplifying access to ROOT tree branches
7 *
8 * \author P. Demin - UCL, Louvain-la-Neuve
9 *
10 */
11
12#include "TChain.h"
13#include "TFile.h"
14#include "TNamed.h"
15#include "TROOT.h"
16
17#include <map>
18
19class ExRootTreeReader: public TNamed
20{
21public:
22 ExRootTreeReader(TTree *tree = 0);
23 ~ExRootTreeReader();
24
25 void SetTree(TTree *tree) { fChain = tree; }
26
27 Long64_t GetEntries() const { return fChain ? static_cast<Long64_t>(fChain->GetEntries()) : 0; }
28 Bool_t ReadEntry(Long64_t entry);
29
30 TClonesArray *UseBranch(const char *branchName);
31 Double_t GetInfo(const char *name);
32
33private:
34 Bool_t Notify();
35
36 TTree *fChain; //! pointer to the analyzed TTree or TChain
37 Int_t fCurrentTree; //! current Tree number in a TChain
38
39 typedef std::map<TString, std::pair<TBranch *, TClonesArray *> > TBranchMap;
40
41 TBranchMap fBranchMap; //!
42
43 ClassDef(ExRootTreeReader, 1)
44};
45
46#endif // ExRootTreeReader_h
Note: See TracBrowser for help on using the repository browser.