Fork me on GitHub

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

Last change on this file since a09b75f 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
RevLine 
[d7d2da3]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"
[341014c]14#include "TNamed.h"
15#include "TROOT.h"
[d7d2da3]16
17#include <map>
18
[341014c]19class ExRootTreeReader: public TNamed
[d7d2da3]20{
[341014c]21public:
[d7d2da3]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);
[dc883b4]31 Double_t GetInfo(const char *name);
[d7d2da3]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
[77e9ae1]39 typedef std::map<TString, std::pair<TBranch *, TClonesArray *> > TBranchMap;
[d7d2da3]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.