Go to the documentation of this file.
4 #ifndef tools_rroot_tree
5 #define tools_rroot_tree
16 static const std::string s_v(
"TTree");
23 static const std::string s_v(
"tools::rroot::tree");
31 static const std::string s_v(
"TTree");
45 mem::increment(
s_class().c_str());
50 mem::decrement(
s_class().c_str());
77 if(!(*it)->find_entry(
m_file,a_entry,n))
return false;
84 void dump(std::ostream& a_out,
const std::string& a_spaces =
"",
const std::string& a_indent =
" "){
101 return id_cast<branch,branch_element>(*b);
121 a_out <<
"======> EVENT:" << a_entry << std::endl;
123 if(!(*it)->show(a_out,
m_file,a_entry))
return false;
152 {
short color,style,width;
161 if(!a_buffer.
read(dummy_int))
return false;
162 if(!a_buffer.
read(dummy_int))
return false;
163 {
int fMaxVirtualSize;
164 if(!a_buffer.
read(fMaxVirtualSize))
return false;}
166 if(!a_buffer.
read(v))
return false;
169 if(!a_buffer.
read(v))
return false;
173 if(!a_buffer.
read(v))
return false;
177 if(!a_buffer.
read(fAutoSave))
return false;}
178 if(!a_buffer.
read(dummy_int))
return false;
182 if(!a_buffer.
read(v))
return false;
185 if(!a_buffer.
read(v))
return false;
189 if(!a_buffer.
read(v))
return false;
193 if(!a_buffer.
read(v))
return false;
198 if(!a_buffer.
read(dummy_int))
return false;
199 if(!a_buffer.
read(dummy_int))
return false;
200 if(!a_buffer.
read(dummy_int))
return false;
201 if(!a_buffer.
read(dummy_int))
return false;
203 {
int fMaxVirtualSize;
204 if(!a_buffer.
read(fMaxVirtualSize))
return false;}
206 if(!a_buffer.
read(fAutoSave))
return false;}
207 if(!a_buffer.
read(dummy_int))
return false;
214 if(!a_buffer.
read(v))
return false;
217 if(!a_buffer.
read(v))
return false;
221 if(!a_buffer.
read(v))
return false;
225 if(!a_buffer.
read(v))
return false;
228 if(!a_buffer.
read(dummy_double))
return false;
229 if(!a_buffer.
read(dummy_int))
return false;
230 if(!a_buffer.
read(dummy_int))
return false;
231 if(!a_buffer.
read(dummy_int))
return false;
232 if(!a_buffer.
read(dummy_int))
return false;
234 {
int fMaxVirtualSize;
235 if(!a_buffer.
read(fMaxVirtualSize))
return false;}
237 if(!a_buffer.
read(fAutoSave))
return false;}
238 if(!a_buffer.
read(dummy_int))
return false;
246 if(!a_buffer.
read(v))
return false;
249 if(!a_buffer.
read(v))
return false;
253 if(!a_buffer.
read(v))
return false;
257 if(!a_buffer.
read(v))
return false;
261 if(!a_buffer.
read(dummy_int64))
return false;
264 if(!a_buffer.
read(dummy_double))
return false;
266 if(!a_buffer.
read(dummy_int))
return false;
267 if(!a_buffer.
read(dummy_int))
return false;
268 if(!a_buffer.
read(dummy_int))
return false;
271 if(!a_buffer.
read(dummy_int))
return false;
275 if(!a_buffer.
read(fNClusterRange))
return false;
278 if(!a_buffer.
read(dummy_int64))
return false;
279 if(!a_buffer.
read(dummy_int64))
return false;
281 if(!a_buffer.
read(fMaxVirtualSize))
return false;}
283 if(!a_buffer.
read(fAutoSave))
return false;}
285 if(!a_buffer.
read(dummy_int64))
return false;
287 if(!a_buffer.
read(dummy_int64))
return false;
289 int64* fClusterRangeEnd = 0;
290 if(!fixed_array_stream<int64>(a_buffer,fNClusterRange,fClusterRangeEnd))
return false;
291 delete [] fClusterRangeEnd;
292 int64* fClusterSize = 0;
293 if(!fixed_array_stream<int64>(a_buffer,fNClusterRange,fClusterSize))
return false;
294 delete [] fClusterSize;
296 if(!_dummy.
stream(a_buffer)) {
297 m_out <<
"tools::rroot::tree::stream : can't read (dummy) TIOFeatures." << std::endl;
310 m_out <<
"tools::rroot::tree::stream : "
311 <<
"can't read branches."
327 m_out <<
"tools::rroot::tree::stream : "
328 <<
"can't read leaves."
337 m_out <<
"tools::rroot::tree::stream : "
338 <<
"can't read fAliases."
345 {std::vector<double> v;
346 if(!Array_stream<double>(a_buffer,v))
return false;}
349 if(!Array_stream<int>(a_buffer,v))
return false;}
354 m_out <<
"tools::rroot::tree::stream : "
355 <<
"can't read fTreeIndex."
364 m_out <<
"tools::rroot::tree::stream : "
365 <<
"can't read fFriends."
374 m_out <<
"tools::rroot::tree::stream : "
375 <<
"can't read fUserInfo."
381 m_out <<
"tools::rroot::tree::stream : "
382 <<
"can't read fBranchRef."
394 const std::vector<branch*>& a_bs,
395 const std::string& a_spaces =
"",
396 const std::string& a_indent =
" "){
398 if(
branch_element* be = safe_cast<branch,branch_element>(*(*it))) {
400 <<
"branch_element :"
401 <<
" name=" <<
sout((*it)->name())
402 <<
" title=" <<
sout((*it)->title())
403 <<
" entry_number=" << be->entry_number()
404 <<
" ref_cls=" <<
sout(be->class_name())
405 <<
" (type=" << be->type()
406 <<
",id=" << be->id()
407 <<
",stype=" << be->streamer_type()
413 <<
" name=" <<
sout((*it)->name())
414 <<
" title=" <<
sout((*it)->title())
415 <<
" entry_number=" << (*it)->entry_number()
420 {
const std::vector<base_leaf*>& lvs = (*it)->leaves();
422 a_out << a_spaces << a_indent
424 <<
" name=" <<
sout((*itl)->name())
425 <<
" title=" <<
sout((*itl)->title())
426 <<
" cls=" <<
sout((*itl)->s_cls())
430 _dump_branches(a_out,(*it)->branches(),a_spaces+a_indent,a_indent);
434 static branch*
_find_branch(
const std::vector<branch*>& a_bs,
const std::string& a_name,
bool a_recursive) {
436 if(
rcmp((*it)->name(),a_name))
return *it;
445 static base_leaf*
_find_leaf(
const std::vector<branch*>& a_bs,
const std::string& a_name,
bool a_recursive) {
448 if(
rcmp((*itl)->name(),a_name))
return *itl;
458 static void _find_leaves(
const std::vector<branch*>& a_bs,std::vector<base_leaf*>& a_leaves) {
465 static void _find_branches(
const std::vector<branch*>& a_bs,std::vector<branch*>& a_branches){
467 a_branches.push_back(*it);
#define tools_vforit(a__T, a__v, a__it)
#define tools_vforcit(a__T, a__v, a__it)