TTreeFormula
class description - source file - inheritance tree
protected:
void DefineDimensions(const char* size, Int_t code, Int_t& virt_dim)
public:
TTreeFormula TTreeFormula()
TTreeFormula TTreeFormula(const char* name, const char* formula, TTree* tree)
TTreeFormula TTreeFormula(TTreeFormula&)
virtual void ~TTreeFormula()
static TClass* Class()
virtual Int_t DefinedVariable(TString& variable)
virtual Double_t EvalInstance(Int_t i = 0) const
virtual TLeaf* GetLeaf(Int_t n) const
TMethodCall* GetMethodCall(Int_t code) const
virtual Int_t GetMultiplicity() const
virtual Int_t GetNcodes() const
virtual Int_t GetNdata() const
virtual Double_t GetValueLeafObject(Int_t i, TLeafObject* leaf) const
virtual TClass* IsA() const
virtual char* PrintValue(Int_t mode = 0) const
virtual void SetTree(TTree* tree)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
TTree* fTree ! pointer to Tree
Short_t fCodes[200] 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 [fNindex]array of instances numbers
TObjArray fMethods List of leaf method calls
Int_t fNdimensions[200] Number of array dimensions in each leaf
Int_t fCumulSize[200][5] Accumulated size of lower dimensions for each leaf
Int_t fCumulUsedSize[6] Accumulated size of lower dimensions as seen for this formula
Int_t fIndexes[200][5] Index of array selected by user for each leaf
public:
static const enum TObject:: kIsCharacter
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*-*-*-*-*-*-*-*-*-*-*
*-* =================================
void DefineDimensions(const char *info, Int_t code, Int_t& virt_dim)
We assume that there are NO white spaces in the info string
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
- Leaf_Name[index]
- Branch_Name.Leaf_Name[index]
I want to support, with Leaf_Name a 1D array data member.
- Branch_Name.Leaf_Name[index1]
- Branch_Name.Leaf_Name[][index2]
- Branch_Name.Leaf_Name[index1][index2]
Double_t EvalInstance(Int_t instance) const
*-*-*-*-*-*-*-*-*-*-*Evaluate this treeformula*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =========================
TLeaf* GetLeaf(Int_t n) const
*-*-*-*-*-*-*-*Return leaf corresponding to serial number n*-*-*-*-*-*
*-* ============================================
TMethodCall* GetMethodCall(Int_t code) const
*-*-*-*-*-*-*-*Return methodcall corresponding to code*-*-*-*-*-*
*-* =======================================
function called by TLeafObject::GetValue
with the value of fIndex computed in TTreeFormula::DefinedVariable
Int_t GetNdata() const
*-*-*-*-*-*-*-*Return number of data words in the leaf*-*-*-*-*-*-*-*
*-*-*-*-*-*-*-*Changed to Return number of available instances in the formula*-*-*-*-*-*-*-*
*-* =======================================
Double_t GetValueLeafObject(Int_t i, TLeafObject *leaf) const
*-*-*-*-*-*-*-*Return result of a leafobject method*-*-*-*-*-*-*-*
*-* ====================================
char* PrintValue(Int_t mode) const
*-*-*-*-*-*-*-*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() const
Int_t GetNcodes() const
void SetTree(TTree* tree)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
TTreeFormula TTreeFormula(TTreeFormula&)
Author: Rene Brun 19/01/96
Last update: root/treeplayer:$Name: $:$Id: TTreeFormula.cxx,v 1.21 2000/12/13 15:13:57 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
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.