#include <TreeReader.h>
Definition at line 29 of file TreeReader.h.
◆ TreeReader() [1/2]
| TreeReader::TreeReader |
( |
| ) |
|
◆ ~TreeReader()
| TreeReader::~TreeReader |
( |
| ) |
|
|
virtual |
Definition at line 36 of file TreeReader.cxx.
37{
39}
std::map< std::string, TTreeFormula * > m_formulae
◆ TreeReader() [2/2]
| TreeReader::TreeReader |
( |
TTree * | n | ) |
|
◆ GetEntries()
| int TreeReader::GetEntries |
( |
| ) |
|
|
inline |
◆ GetEntry()
| int TreeReader::GetEntry |
( |
int | entry = -1 | ) |
|
Definition at line 102 of file TreeReader.cxx.
104{
105
106
107
111 {
112 int entryNumber =
m_tree->GetEntryNumber(entry);
113 if (entryNumber < 0) return 0;
114 Long64_t localEntry =
m_tree->LoadTree(entryNumber);
115 if (localEntry < 0) return 0;
118 {
119 int I =
static_cast<TChain*
>(
m_tree)->GetTreeNumber();
121 {
123
124 std::map<std::string, TTreeFormula*>::iterator itr =
m_formulae.begin();
125 std::map<std::string, TTreeFormula*>::iterator itrE=
m_formulae.end();
127 for(;itr!=itrE;++itr)
128 {
129 if(itr->second!=dummy) itr->second->Notify();
130 }
131 }
132 }
133 return 1;
134 }
135 return 0;
136}
◆ GetTree()
| TTree * TreeReader::GetTree |
( |
| ) |
|
|
inline |
◆ GetVariable()
| double TreeReader::GetVariable |
( |
const char * | c, |
|
|
int | entry = -2 ) |
Definition at line 69 of file TreeReader.cxx.
71{
72
73
77 if(!f)
78 {
79 f =
new TTreeFormula(c,c,
m_tree);
80 f->SetQuickLoad(kTRUE);
81
82
84 {
87 std::cout <<
"in [TreeReader] : " <<
s <<
" is not valid -> return 0" << std::endl;
88 }
89
91 }
93 int valid =
f->GetNdata() ;
94 if(!valid) return 0;
95
96
97 return f->EvalInstance(0);
98}
int GetEntry(int entry=-1)
◆ Restart()
| void TreeReader::Restart |
( |
| ) |
|
|
inline |
◆ SetTree()
| void TreeReader::SetTree |
( |
TTree * | n | ) |
|
Definition at line 53 of file TreeReader.cxx.
55{
56
57 if(!n) return;
58
63 m_isChain = (
n->IsA() == TClass::GetClass(
"TChain"));
66}
◆ m_currentEntry
| int TreeReader::m_currentEntry = 0 |
|
private |
◆ m_currentTree
| int TreeReader::m_currentTree = 0 |
|
private |
◆ m_entries
| int TreeReader::m_entries |
|
private |
◆ m_formulae
| std::map<std::string, TTreeFormula*> TreeReader::m_formulae |
|
private |
◆ m_isChain
| bool TreeReader::m_isChain = false |
|
private |
◆ m_tree
| TTree* TreeReader::m_tree |
|
private |
The documentation for this class was generated from the following files: