Hi Gene, Since you do not mention of which version you are talking about, I guess that you must be using a very old version of the Root system! TTreeFormula derives from TFormula and redefines the function DefinedVariable. The Root version number is now 2.22/10. But TTreeFormula has been implemented already a few years ago and not many changes applied. It is true that in the release notes of version 1.02, I had a typo mentionning wrongly TTree::DefinedVariable instead of TTreeFormula::DefinedVariable. Rene Brun > > 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