Fork me on GitHub

source: svn/trunk/Utilities/ExRootAnalysis/interface/ExRootTreeReader.h@ 746

Last change on this file since 746 was 276, checked in by Xavier Rouby, 16 years ago

cleaning the headers

File size: 932 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: 2009-02-16 12:17:46 $
9 * $Revision: 1.3 $
10 *
11 *
12 * \author S. Ovyn - UCL, Louvain-la-Neuve
13 *
14 */
15
16#include "TROOT.h"
17#include "TTree.h"
18#include "TString.h"
19
20#include <map>
21
22class ExRootTreeReader
23{
24public :
25
26 ExRootTreeReader(TTree *tree);
27 ~ExRootTreeReader();
28
29 Long64_t GetEntries() const { return fChain ? static_cast<Long64_t>(fChain->GetEntries()) : 0; }
30 Bool_t ReadEntry(Long64_t entry);
31
32 TClonesArray *UseBranch(const TString &branchName);
33
34private:
35
36 void Init();
37 void Notify();
38
39 TTree *fChain; // pointer to the analyzed TTree or TChain
40 Int_t fCurrentTree; // current Tree number in a TChain
41
42 Bool_t fIsInitDone;
43
44 typedef std::map<TString, std::pair<TBranch*, TClonesArray*> > TBranchMap;
45
46 TBranchMap fBranchMap;
47};
48
49#endif // ExRootTreeReader_h
Note: See TracBrowser for help on using the repository browser.