Timing
Last change
on this file since 34c28a9 was 77e9ae1, checked in by Pavel Demin <pavel-demin@…>, 6 years ago |
set Standard to Cpp03 in .clang-format
|
-
Property mode
set to
100644
|
File size:
957 bytes
|
Rev | Line | |
---|
[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] | 19 | class ExRootTreeReader: public TNamed
|
---|
[d7d2da3] | 20 | {
|
---|
[341014c] | 21 | public:
|
---|
[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);
|
---|
| 31 |
|
---|
| 32 | private:
|
---|
| 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 |
|
---|
[77e9ae1] | 38 | typedef std::map<TString, std::pair<TBranch *, TClonesArray *> > TBranchMap;
|
---|
[d7d2da3] | 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.