Fork me on GitHub

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

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

include statements have been cleaned

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