TTreeFormula


class description - source file - inheritance tree

class TTreeFormula : public TFormula


    public:
TTreeFormula TTreeFormula() TTreeFormula TTreeFormula(const char* name, const char* formula, TTree* tree) TTreeFormula TTreeFormula(TTreeFormula&) virtual void ~TTreeFormula() TClass* Class() virtual Int_t DefinedVariable(TString& variable) virtual Double_t EvalInstance(Int_t i = 0) virtual TLeaf* GetLeaf(Int_t n) TMethodCall* GetMethodCall(Int_t code) virtual Int_t GetMultiplicity() virtual Int_t GetNcodes() virtual Int_t GetNdata() virtual Float_t GetValueLeafObject(Int_t i, TLeafObject* leaf) virtual TClass* IsA() const virtual char* PrintValue(Int_t mode = 0) virtual void SetTree(TTree* tree) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b)

Data Members

protected:
TTree* fTree pointer to Tree Short_t fCodes[100] List of leaf numbers referenced in formula Int_t fNcodes Number of leaves referenced in formula Int_t fMultiplicity Number of array elements in leaves in case of a TClonesArray Int_t fInstance Instance number for GetValue Int_t fNindex Size of fIndex Int_t* fIndex array of instances numbers TObjArray fMethods List of leaf method calls public:
static const enum TObject:: kIsCharacter

Class Description

     A TreeFormula is used to pass a selection expression
     to the Tree drawing routine. See TTree::Draw

  A TreeFormula can contain any arithmetic expression including
  standard operators and mathematical functions separated by operators.
  Examples of valid expression:
          "x<y && sqrt(z)>3.2"


TTreeFormula(): TFormula()
*-*-*-*-*-*-*-*-*-*-*Tree Formula default constructor*-*-*-*-*-*-*-*-*-*
*-*                  ================================

TTreeFormula(const char *name,const char *expression, TTree *tree) :TFormula()
*-*-*-*-*-*-*-*-*-*-*Normal Tree Formula constructor*-*-*-*-*-*-*-*-*-*-*
*-*                  ===============================


~TTreeFormula()
*-*-*-*-*-*-*-*-*-*-*Tree Formula default destructor*-*-*-*-*-*-*-*-*-*-*
*-*                  =================================

Int_t DefinedVariable(TString &name)
*-*-*-*-*-*Check if name is in the list of Tree/Branch leaves*-*-*-*-*
*-*        ==================================================

   This member function redefines the function in TFormula
   If a leaf has a name corresponding to the argument name, then
   returns a new code.
   A TTreeFormula may contain more than one variable.
   For each variable referenced, the pointers to the corresponding
   branch and leaf is stored in the object arrays fBranches and fLeaves.

   name can be :
      - Leaf_Name (simple variable or data member of a ClonesArray)
      - Branch_Name.Leaf_Name
      - Branch_Name.Method_Name


Double_t EvalInstance(Int_t instance)
*-*-*-*-*-*-*-*-*-*-*Evaluate this treeformula*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  =========================


TLeaf* GetLeaf(Int_t n)
*-*-*-*-*-*-*-*Return leaf corresponding to serial number n*-*-*-*-*-*
*-*            ============================================


TMethodCall* GetMethodCall(Int_t code)
*-*-*-*-*-*-*-*Return methodcall corresponding to code*-*-*-*-*-*
*-*            =======================================

  function called by TLeafObject::GetValue
  with the value of fIndex computed in TTreeFormula::DefinedVariable

Int_t GetNdata()
*-*-*-*-*-*-*-*Return number of data words in the leaf*-*-*-*-*-*-*-*
*-*            =======================================


Float_t GetValueLeafObject(Int_t i, TLeafObject *leaf)
*-*-*-*-*-*-*-*Return result of a leafobject method*-*-*-*-*-*-*-*
*-*            ====================================


char* PrintValue(Int_t mode)
*-*-*-*-*-*-*-*Return value of variable as a string*-*-*-*-*-*-*-*
*-*            ====================================

      mode = -2 : Print line with ***
      mode = -1 : Print column names
      mode = 0  : Print column values

void Streamer(TBuffer &R__b)
 Stream an object of class TTreeFormula.



Inline Functions


               Int_t GetMultiplicity()
               Int_t GetNcodes()
                void SetTree(TTree* tree)
             TClass* Class()
             TClass* IsA() const
                void ShowMembers(TMemberInspector& insp, char* parent)
        TTreeFormula TTreeFormula(TTreeFormula&)


Author: Rene Brun 19/01/96
Last update: 2.23/11 12/01/2000 10.48.45 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.