Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootTreeReader.h@ 77e9ae1

ImprovedOutputFile Timing llp
Last change on this file since 77e9ae1 was 77e9ae1, checked in by Pavel Demin <pavel-demin@…>, 5 years ago

set Standard to Cpp03 in .clang-format

  • Property mode set to 100644
File size: 957 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
32private:
33 Bool_t Notify();
34
35 TTree *fChain; //! pointer to the analyzed TTree or TChain
36 Int_t fCurrentTree; //! current Tree number in a TChain
37
38 typedef std::map<TString, std::pair<TBranch *, TClonesArray *> > TBranchMap;
39
40 TBranchMap fBranchMap; //!
41
42 ClassDef(ExRootTreeReader, 1)
43};
44
45#endif // ExRootTreeReader_h
Note: See TracBrowser for help on using the repository browser.