hi there,
in ROOT 5.28.00(a) it seems that one can do the following:
void MyClass::init_branches(TTree *t)
{
TBranch *b = t->GetBranch("some_br_name");
if (!b) { panic(); }
b->SetAddress(&this->m_some_var);
b->SetStatus(1);
}
that's great b/c it doesn't clutter the class MyClass with all the TBranch* data members.
but it seems it only works for a TTree or TChain with only 1 file. (otherwise, the content of m_some_var is just the default c-tor value.)
so, is the above piece of code meant to be working ? or am I missing
some mandatory snippet of code ?
(or should I just bite the bullet and still stick all of these TBranch*
data members ?)
-s
-- #########################################Received on Wed Mar 09 2011 - 14:25:11 CET
# Dr. Sebastien Binet
# Laboratoire de l'Accelerateur Lineaire
# Universite Paris-Sud XI
# Batiment 200
# 91898 Orsay
#########################################
- application/pgp-signature attachment: stored
This archive was generated by hypermail 2.2.0 : Wed Mar 09 2011 - 17:50:01 CET