Fork me on GitHub

source: git/external/ExRootAnalysis/ExRootTreeReader.h@ 6519cfb

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 6519cfb was d7d2da3, checked in by pavel <pavel@…>, 12 years ago

move branches/ModularDelphes to trunk

  • Property mode set to 100644
File size: 1019 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 * $Date: 2008-06-04 13:57:27 $
9 * $Revision: 1.1 $
10 *
11 *
12 * \author P. Demin - UCL, Louvain-la-Neuve
13 *
14 */
15
16#include "TROOT.h"
17#include "TNamed.h"
18#include "TChain.h"
19#include "TFile.h"
20
21#include <map>
22
23class ExRootTreeReader : public TNamed
24{
25public :
26
27 ExRootTreeReader(TTree *tree = 0);
28 ~ExRootTreeReader();
29
30 void SetTree(TTree *tree) { fChain = tree; }
31
32 Long64_t GetEntries() const { return fChain ? static_cast<Long64_t>(fChain->GetEntries()) : 0; }
33 Bool_t ReadEntry(Long64_t entry);
34
35 TClonesArray *UseBranch(const char *branchName);
36
37private:
38
39 Bool_t Notify();
40
41 TTree *fChain; //! pointer to the analyzed TTree or TChain
42 Int_t fCurrentTree; //! current Tree number in a TChain
43
44 typedef std::map<TString, std::pair<TBranch*, TClonesArray*> > TBranchMap;
45
46 TBranchMap fBranchMap; //!
47
48 ClassDef(ExRootTreeReader, 1)
49};
50
51#endif // ExRootTreeReader_h
Note: See TracBrowser for help on using the repository browser.