TFormula: DefinedVariable()

From: Gene Van Buren (genevb@rcf.rhic.bnl.gov)
Date: Thu Aug 05 1999 - 17:31:52 MEST


Hi there,

I'm trying to use the TFormula class. I understand that one must
define a derived class if one wants to add variables that the TFormula
can understand. So I defined a derived class, and made my own
DefinedVariable() member function with the same prototype as in
TFormula (which is claimed to be virtual). However, when I instantiate
the derived formula class, it goes through Compile() and Analyze() of
the TFormula class, where it then calls _its_own_ DefinedVariable()
member function instead of mine. I know that TTreeFormula also inherits
from TFormula, and the TFormula source code even says that DefinedVariable()
gets overloaded in TTreeFormula - but the source code for TTreeFormula
shows _no_ definition of DefinedVarable()! What makes it even more
confusing is that the release notes even talk about the changes to
TTreeFormula::DefinedVariable() and even TTree::DefinedVariable(), the
latter of which shouldn't even exist! Does anyone know what's going on?

-Gene Van Buren



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:37 MET