Logo ROOT  
Reference Guide
TTreeFormula Class Reference

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 now relies on a variety of TFormLeafInfo classes to handle the reading of the information. Here is the list of theses classes:

The following method are available from the TFormLeafInfo interface:

  • AddOffset(Int_t offset, TStreamerElement* element)
  • GetCounterValue(TLeaf* leaf) : return the size of the array pointed to.
  • GetObjectAddress(TLeafElement* leaf) : Returns the the location of the object pointed to.
  • GetMultiplicity() : Returns info on the variability of the number of elements
  • GetNdata(TLeaf* leaf) : Returns the number of elements
  • GetNdata() : Used by GetNdata(TLeaf* leaf)
  • GetValue(TLeaf *leaf, Int_t instance = 0) : Return the value
  • GetValuePointer(TLeaf *leaf, Int_t instance = 0) : Returns the address of the value
  • GetLocalValuePointer(TLeaf *leaf, Int_t instance = 0) : Returns the address of the value of 'this' LeafInfo
  • IsString()
  • ReadValue(char *where, Int_t instance = 0) : Internal function to interpret the location 'where'
  • Update() : react to the possible loading of a shared library.

Definition at line 58 of file TTreeFormula.h.

Classes

struct  RealInstanceCache
 

Public Member Functions

 TTreeFormula ()
 
 TTreeFormula (const char *name, const char *formula, TTree *tree)
 Normal TTree Formula Constuctor. More...
 
virtual ~TTreeFormula ()
 Tree Formula default destructor. More...
 
virtual Int_t DefinedVariable (TString &variable, Int_t &action)
 Check if name is in the list of Tree/Branch leaves. More...
 
virtual TClassEvalClass () const
 Evaluate the class of this treeformula. More...
 
template<typename T >
EvalInstance (Int_t i=0, const char *stringStack[]=0)
 Evaluate this treeformula. More...
 
virtual Double_t EvalInstance (Int_t i=0, const char *stringStack[]=0)
 
virtual Long64_t EvalInstance64 (Int_t i=0, const char *stringStack[]=0)
 
virtual LongDouble_t EvalInstanceLD (Int_t i=0, const char *stringStack[]=0)
 
virtual voidEvalObject (Int_t i=0)
 Evaluate this treeformula. More...
 
virtual const char * EvalStringInstance (Int_t i=0)
 Eval the instance as a string. More...
 
template<>
LongDouble_t GetConstant (Int_t k)
 
virtual TLeafGetLeaf (Int_t n) const
 Return leaf corresponding to serial number n. More...
 
TFormLeafInfoGetLeafInfo (Int_t code) const
 Return DataMember corresponding to code. More...
 
TTreeFormulaManagerGetManager () const
 
TMethodCallGetMethodCall (Int_t code) const
 Return methodcall corresponding to code. More...
 
virtual Int_t GetMultiplicity () const
 
virtual Int_t GetNcodes () const
 
virtual Int_t GetNdata ()
 Return number of available instances in the formula. More...
 
virtual TTreeGetTree () const
 
virtual Bool_t IsInteger (Bool_t fast=kTRUE) const
 Return TRUE if the formula corresponds to one single Tree leaf and this leaf is short, int or unsigned short, int When a leaf is of type integer or string, the generated histogram is forced to have an integer bin width. More...
 
Bool_t IsQuickLoad () const
 
virtual Bool_t IsString () const
 Return TRUE if the formula is a string. More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual char * PrintValue (Int_t mode, Int_t instance, const char *decform="9.9") const
 Return value of variable as a string. More...
 
virtual char * PrintValue (Int_t mode=0) const
 Return value of variable as a string. More...
 
virtual void ResetLoading ()
 Tell the formula that we are going to request a new entry. More...
 
virtual void SetAxis (TAxis *axis=0)
 Set the axis (in particular get the type). More...
 
void SetQuickLoad (Bool_t quick)
 
virtual void SetTree (TTree *tree)
 
virtual void UpdateFormulaLeaves ()
 This function is called TTreePlayer::UpdateFormulaLeaves, itself called by TChain::LoadTree when a new Tree is loaded. More...
 
- Public Member Functions inherited from ROOT::v5::TFormula
 TFormula ()
 Formula default constructor. More...
 
 TFormula (const char *name, const char *formula)
 Normal Formula constructor. More...
 
 TFormula (const TFormula &formula)
 Default constructor. More...
 
virtual ~TFormula ()
 Formula default destructor. More...
 
virtual void Analyze (const char *schain, Int_t &err, Int_t offset=0)
 Analyze a sub-expression in one formula. More...
 
virtual Bool_t AnalyzeFunction (TString &chaine, Int_t &err, Int_t offset=0)
 Check if the chain as function call. More...
 
virtual void Clear (Option_t *option="")
 Resets the objects. More...
 
virtual Int_t Compile (const char *expression="")
 Compile expression already stored in fTitle. More...
 
virtual void Copy (TObject &formula) const
 Copy this formula. More...
 
virtual char * DefinedString (Int_t code)
 Return address of string corresponding to special code. More...
 
virtual Double_t DefinedValue (Int_t code)
 Return value corresponding to special code. More...
 
virtual Int_t DefinedVariable (TString &variable, Int_t &action)
 Check if expression is in the list of defined variables. More...
 
virtual Double_t Eval (Double_t x, Double_t y=0, Double_t z=0, Double_t t=0) const
 Evaluate this formula. More...
 
virtual Double_t EvalPar (const Double_t *x, const Double_t *params=0)
 
virtual Double_t EvalParOld (const Double_t *x, const Double_t *params=0)
 Evaluate this formula. More...
 
virtual TString GetExpFormula (Option_t *option="") const
 Reconstruct the formula expression from the internal TFormula member variables. More...
 
virtual const TObjectGetLinearPart (Int_t i)
 Return linear part. More...
 
virtual Int_t GetNdim () const
 
virtual Int_t GetNpar () const
 
virtual Int_t GetNumber () const
 
Double_t GetParameter (const char *name) const
 Return value of parameter named parName. More...
 
Double_t GetParameter (Int_t ipar) const
 Return value of parameter number ipar. More...
 
virtual Double_tGetParameters () const
 
virtual void GetParameters (Double_t *params)
 
virtual const char * GetParName (Int_t ipar) const
 Return name of one parameter. More...
 
virtual Int_t GetParNumber (const char *name) const
 Return parameter number by name. More...
 
virtual Bool_t IsLinear () const
 
virtual Bool_t IsNormalized () const
 
TFormulaoperator= (const TFormula &rhs)
 Operator =. More...
 
void Optimize ()
 MI include. More...
 
virtual void Print (Option_t *option="") const
 Dump this formula with its attributes. More...
 
virtual void ProcessLinear (TString &replaceformula)
 If the formula is for linear fitting, change the title to normal and fill the LinearParts array. More...
 
virtual void SetNumber (Int_t number)
 
virtual void SetParameter (const char *name, Double_t parvalue)
 Initialize parameter number ipar. More...
 
virtual void SetParameter (Int_t ipar, Double_t parvalue)
 Initialize parameter number ipar. More...
 
virtual void SetParameters (const Double_t *params)
 Initialize array of all parameters. More...
 
virtual void SetParameters (Double_t p0, Double_t p1, Double_t p2=0, Double_t p3=0, Double_t p4=0, Double_t p5=0, Double_t p6=0, Double_t p7=0, Double_t p8=0, Double_t p9=0, Double_t p10=0)
 Initialize up to 11 parameters All arguments except THE FIRST TWO are optional In case of a function with only one parameter, call this function with p1=0. More...
 
virtual void SetParName (Int_t ipar, const char *name)
 Set name of parameter number ipar. More...
 
virtual void SetParNames (const char *name0="p0", const char *name1="p1", const char *name2="p2", const char *name3="p3", const char *name4="p4", const char *name5="p5", const char *name6="p6", const char *name7="p7", const char *name8="p8", const char *name9="p9", const char *name10="p10")
 Set up to 11 parameter names. More...
 
void Streamer (TBuffer &b, const TClass *onfile_class)
 Stream a class object. More...
 
void Streamer (TBuffer &b, Int_t version, UInt_t start, UInt_t count, const TClass *onfile_class=0)
 specialized streamer function being able to read old TF1 versions as TF1Old in memory More...
 
virtual void Update ()
 
- Public Member Functions inherited from TNamed
 TNamed ()
 
 TNamed (const char *name, const char *title)
 
 TNamed (const TNamed &named)
 TNamed copy ctor. More...
 
 TNamed (const TString &name, const TString &title)
 
virtual ~TNamed ()
 TNamed destructor. More...
 
virtual void Clear (Option_t *option="")
 Set name and title to empty strings (""). More...
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare two TNamed objects. More...
 
virtual void Copy (TObject &named) const
 Copy this to obj. More...
 
virtual void FillBuffer (char *&buffer)
 Encode TNamed into output buffer. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual Bool_t IsSortable () const
 
virtual void ls (Option_t *option="") const
 List TNamed name and title. More...
 
TNamedoperator= (const TNamed &rhs)
 TNamed assignment operator. More...
 
virtual void Print (Option_t *option="") const
 Print TNamed name and title. More...
 
virtual void SetName (const char *name)
 Set the name of the TNamed. More...
 
virtual void SetNameTitle (const char *name, const char *title)
 Set all the TNamed parameters (name and title). More...
 
virtual void SetTitle (const char *title="")
 Set the title of the TNamed. More...
 
virtual Int_t Sizeof () const
 Return size of the TNamed part of the TObject. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Protected Types

enum  {
  kDirect , kDataMember , kMethod , kIndexOfEntry ,
  kEntries , kLength , kIteration , kLengthFunc ,
  kSum , kEntryList , kTreeMember , kIndexOfLocalEntry ,
  kMin , kMax , kLocalEntries
}
 
enum  {
  kAlias = 200 , kAliasString = 201 , kAlternate = 202 , kAlternateString = 203 ,
  kMinIf = 204 , kMaxIf = 205
}
 
enum  EStatusBits { kIsCharacter = BIT(12) , kMissingLeaf = BIT(15) , kIsInteger = BIT(17) , kNeedEntries = BIT(18) }
 
- Protected Types inherited from ROOT::v5::TFormula
enum  {
  kEnd = 0 , kAdd = 1 , kSubstract = 2 , kMultiply = 3 ,
  kDivide = 4 , kModulo = 5 , kcos = 10 , ksin = 11 ,
  ktan = 12 , kacos = 13 , kasin = 14 , katan = 15 ,
  katan2 = 16 , kfmod = 17 , kpow = 20 , ksq = 21 ,
  ksqrt = 22 , kstrstr = 23 , kmin = 24 , kmax = 25 ,
  klog = 30 , kexp = 31 , klog10 = 32 , kpi = 40 ,
  kabs = 41 , ksign = 42 , kint = 43 , kSignInv = 44 ,
  krndm = 50 , kAnd = 60 , kOr = 61 , kEqual = 62 ,
  kNotEqual = 63 , kLess = 64 , kGreater = 65 , kLessThan = 66 ,
  kGreaterThan = 67 , kNot = 68 , kcosh = 70 , ksinh = 71 ,
  ktanh = 72 , kacosh = 73 , kasinh = 74 , katanh = 75 ,
  kStringEqual = 76 , kStringNotEqual = 77 , kBitAnd = 78 , kBitOr = 79 ,
  kLeftShift = 80 , kRightShift = 81 , kJumpIf = 82 , kJump = 83 ,
  kexpo = 100 , kxexpo = 100 , kyexpo = 101 , kzexpo = 102 ,
  kxyexpo = 105 , kgaus = 110 , kxgaus = 110 , kygaus = 111 ,
  kzgaus = 112 , kxygaus = 115 , klandau = 120 , kxlandau = 120 ,
  kylandau = 121 , kzlandau = 122 , kxylandau = 125 , kpol = 130 ,
  kxpol = 130 , kypol = 131 , kzpol = 132 , kParameter = 140 ,
  kConstant = 141 , kBoolOptimize = 142 , kStringConst = 143 , kVariable = 144 ,
  kFunctionCall = 145 , kData = 146 , kUnary = 147 , kBinary = 148 ,
  kThree = 149 , kDefinedVariable = 150 , kDefinedString = 151 , kPlusD = 152 ,
  kPlusDD = 153 , kMultD = 154 , kMultDD = 155 , kBoolOptimizeOr = 156 ,
  kBoolOptimizeAnd = 157 , kBoolSet = 158 , kFDM = 159 , kFD0 = 160 ,
  kFD1 = 161 , kFD2 = 162 , kFD3 = 163
}
 
typedef Double_t(TObject::* TFuncG) (const Double_t *, const Double_t *) const
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 

Protected Member Functions

 TTreeFormula (const char *name, const char *formula, TTree *tree, const std::vector< std::string > &aliases)
 Cache accelerating the GetRealInstance function. More...
 
Bool_t BranchHasMethod (TLeaf *leaf, TBranch *branch, const char *method, const char *params, Long64_t readentry) const
 Return the leaf (if any) of the tree with contains an object of a class having a method which has the name provided in the argument. More...
 
void Convert (UInt_t fromVersion)
 
Int_t DefineAlternate (const char *expression)
 This method check for treat the case where expression contains $Atl and load up both fAliases and fExpr. More...
 
void DefineDimensions (Int_t code, Int_t size, TFormLeafInfoMultiVarDim *info, Int_t &virt_dim)
 This method is used internally to decode the dimensions of the variables. More...
 
virtual TClassEvalClass (Int_t oper) const
 Evaluate the class of the operation oper. More...
 
Int_t FindLeafForExpression (const char *expression, TLeaf *&leaf, TString &leftover, Bool_t &final, UInt_t &paran_level, TObjArray &castqueue, std::vector< std::string > &aliasUsed, Bool_t &useLeafCollectionObject, const char *fullExpression)
 Look for the leaf corresponding to the start of expression. More...
 
TLeafGetLeafWithDatamember (const char *topchoice, const char *nextchice, Long64_t readentry) const
 Return the leaf (if any) which contains an object containing a data member which has the name provided in the arguments. More...
 
Int_t GetRealInstance (Int_t instance, Int_t codeindex)
 Now let calculate what physical instance we really need. More...
 
virtual Double_t GetValueFromMethod (Int_t i, TLeaf *leaf) const
 Return result of a leafobject method. More...
 
virtual voidGetValuePointerFromMethod (Int_t i, TLeaf *leaf) const
 Return result of a leafobject method. More...
 
void Init (const char *name, const char *formula)
 Initialiation called from the constructors. More...
 
virtual Bool_t IsLeafInteger (Int_t code) const
 Return TRUE if the leaf corresponding to code is short, int or unsigned short, int When a leaf is of type integer, the generated histogram is forced to have an integer bin width. More...
 
virtual Bool_t IsLeafString (Int_t code) const
 Return TRUE if the leaf or data member corresponding to code is a string. More...
 
virtual Bool_t IsString (Int_t oper) const
 Return true if the expression at the index 'oper' is to be treated as as string. More...
 
void LoadBranches ()
 Make sure that all the branches have been loaded properly. More...
 
Bool_t LoadCurrentDim ()
 Calculate the actual dimension for the current entry. More...
 
Int_t ParseWithLeaf (TLeaf *leaf, const char *expression, Bool_t final, UInt_t paran_level, TObjArray &castqueue, Bool_t useLeafCollectionObject, const char *fullExpression)
 Decompose 'expression' as pointing to something inside the leaf Returns: More...
 
Int_t RegisterDimensions (const char *size, Int_t code)
 This method is used internally to decode the dimensions of the variables. More...
 
Int_t RegisterDimensions (Int_t code, Int_t size, TFormLeafInfoMultiVarDim *multidim=0)
 This method stores the dimension information for later usage. More...
 
Int_t RegisterDimensions (Int_t code, TBranchElement *branch)
 This method is used internally to decode the dimensions of the variables. More...
 
Int_t RegisterDimensions (Int_t code, TFormLeafInfo *info, TFormLeafInfo *maininfo, Bool_t useCollectionObject)
 This method is used internally to decode the dimensions of the variables. More...
 
Int_t RegisterDimensions (Int_t code, TLeaf *leaf)
 This method is used internally to decode the dimensions of the variables. More...
 
void ResetDimensions ()
 Populate the TTreeFormulaManager with the dimension information. More...
 
virtual Bool_t StringToNumber (Int_t code)
 Try to 'demote' a string into an array bytes. More...
 
virtual Bool_t SwitchToFormLeafInfo (Int_t code)
 Convert the underlying lookup method from the direct technique (dereferencing the address held by the branch) to the method using TFormLeafInfo. More...
 
- Protected Member Functions inherited from ROOT::v5::TFormula
virtual Bool_t CheckOperands (Int_t leftoperand, Int_t rightoperartion, Int_t &err)
 Check whether the operands at 'leftoper' and 'oper-1' are compatible with the operation at 'oper'. More...
 
virtual Bool_t CheckOperands (Int_t operation, Int_t &err)
 Check whether the operand at 'oper-1' is compatible with the operation at 'oper'. More...
 
void ClearFormula (Option_t *option="")
 Resets the objects. More...
 
virtual void Convert (UInt_t fromVersion)
 
Double_t EvalParFast (const Double_t *x, const Double_t *params)
 Evaluate this formula. More...
 
Double_t EvalPrimitive (const Double_t *x, const Double_t *params)
 Evaluate primitive formula. More...
 
Double_t EvalPrimitive0 (const Double_t *x, const Double_t *params)
 Evaluate primitive formula. More...
 
Double_t EvalPrimitive1 (const Double_t *x, const Double_t *params)
 Evaluate primitive formula. More...
 
Double_t EvalPrimitive2 (const Double_t *x, const Double_t *params)
 Evaluate primitive formula. More...
 
Double_t EvalPrimitive3 (const Double_t *x, const Double_t *params)
 Evaluate primitive formula. More...
 
Double_t EvalPrimitive4 (const Double_t *x, const Double_t *params)
 Evaluate primitive formula. More...
 
Short_t GetAction (Int_t code) const
 
Short_t GetActionOptimized (Int_t code) const
 
Int_t GetActionParam (Int_t code) const
 
Int_t GetActionParamOptimized (Int_t code) const
 
Int_tGetOper () const
 
Int_tGetOperOptimized () const
 
virtual Bool_t IsString (Int_t oper) const
 Return true if the expression at the index 'oper' has to be treated as a string. More...
 
void MakePrimitive (const char *expr, Int_t pos)
 MakePrimitive find TFormulaPrimitive replacement for some operands. More...
 
Int_t PreCompile ()
 pointer to optimal function More...
 
void SetAction (Int_t code, Int_t value, Int_t param=0)
 
void SetActionOptimized (Int_t code, Int_t value, Int_t param=0)
 
virtual Bool_t StringToNumber (Int_t code)
 Try to 'demote' a string into an array bytes. More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Protected Attributes

TObjArray fAliases
 List of TCutG and TEntryList used in the formula. More...
 
std::vector< std::string > fAliasesUsed
 list of dimension setups, for delayed creation of the dimension information. More...
 
TAxisfAxis
 
TObjArray fBranches
 
Int_t fCodes [kMAXCODES]
 pointer to Tree More...
 
LongDouble_tfConstLD
 List of aliases used during the parsing of the expression. More...
 
Int_t fCumulSizes [kMAXCODES][kMAXFORMDIM]
 
TObjArray fDataMembers
 List of leaf used in this formula. More...
 
Bool_t fDidBooleanOptimization
 pointer to histogram axis if this is a string More...
 
TListfDimensionSetup
 The dimension coordinator. More...
 
TObjArray fExternalCuts
 List of leaf method calls. More...
 
Int_t fFixedSizes [kMAXCODES][kMAXFORMDIM]
 
Bool_t fHasCast
 
UChar_t fHasMultipleVarDim [kMAXCODES]
 
Int_t fIndexes [kMAXCODES][kMAXFORMDIM]
 
TObjArray fLeafNames
 List of TTreeFormula for each alias used. More...
 
TObjArray fLeaves
 
Int_tfLookupType
 
TTreeFormulaManagerfManager
 True if we executed one boolean optimization since the last time instance number 0 was evaluated. More...
 
TObjArray fMethods
 List of leaf data members. More...
 
Int_t fMultiplicity
 
Int_t fNcodes
 This caches the physical number of element in the leaf or data member. More...
 
Int_t fNdata [kMAXCODES]
 
Int_t fNdimensions [kMAXCODES]
 If true, the current entry has not been loaded yet. More...
 
Bool_t fNeedLoading
 If true, branch GetEntry is only called when the entry number changes. More...
 
Int_t fNindex
 
Bool_t fQuickLoad
 List of branches to read. Similar to fLeaves but duplicates are zeroed out. More...
 
RealInstanceCache fRealInstanceCache
 local version of fConsts able to store bigger numbers More...
 
TTreefTree
 
TTreeFormulafVarIndexes [kMAXCODES][kMAXFORMDIM]
 
- Protected Attributes inherited from ROOT::v5::TFormula
TBits fAlreadyFound
 
Double_tfConst
 
TStringfExpr
 
TStringfExprOptimized
 Number of operators after optimization. More...
 
TObjArray fFunctions
 
TObjArray fLinearParts
 
TStringfNames
 
Int_t fNconst
 
Int_t fNdim
 
Int_t fNoper
 
Int_t fNOperOptimized
 cache for information More...
 
Int_t fNpar
 
Int_t fNstring
 
Int_t fNumber
 
Int_t fNval
 
TOperOffsetfOperOffset
 [fNOperOptimized] List of operators. (See documentation for changes made at version 7) More...
 
Int_tfOperOptimized
 [fNOperOptimized] List of expressions More...
 
TFuncG fOptimal
 [fNPar] predefined function More...
 
Double_tfParams
 
TFormulaPrimitive ** fPredefined
 [fNOperOptimized] Offsets of operrands More...
 
- Protected Attributes inherited from TNamed
TString fName
 
TString fTitle
 

Private Member Functions

 TTreeFormula (const TTreeFormula &)=delete
 
template<typename T >
GetConstant (Int_t k)
 
TTreeFormulaoperator= (const TTreeFormula &)=delete
 

Friends

class TTreeFormulaManager
 

Additional Inherited Members

- Public Types inherited from ROOT::v5::TFormula
enum  { kNotGlobal = BIT(10) , kNormalized = BIT(14) , kLinear = BIT(16) }
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Static Public Member Functions inherited from ROOT::v5::TFormula
static void GetMaxima (Int_t &maxop, Int_t &maxpar, Int_t &maxconst)
 static function to get the maximum value of 3 parameters -maxop : maximum number of operations -maxpar : maximum number of parameters -maxconst : maximum number of constants More...
 
static void SetMaxima (Int_t maxop=1000, Int_t maxpar=1000, Int_t maxconst=1000)
 static function to set the maximum value of 3 parameters More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

#include <TTreeFormula.h>

Inheritance diagram for TTreeFormula:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kDirect 
kDataMember 
kMethod 
kIndexOfEntry 
kEntries 
kLength 
kIteration 
kLengthFunc 
kSum 
kEntryList 
kTreeMember 
kIndexOfLocalEntry 
kMin 
kMax 
kLocalEntries 

Definition at line 69 of file TTreeFormula.h.

◆ anonymous enum

anonymous enum
protected
Enumerator
kAlias 
kAliasString 
kAlternate 
kAlternateString 
kMinIf 
kMaxIf 

Definition at line 78 of file TTreeFormula.h.

◆ EStatusBits

enum TTreeFormula::EStatusBits
protected
Enumerator
kIsCharacter 
kMissingLeaf 
kIsInteger 
kNeedEntries 

Definition at line 63 of file TTreeFormula.h.

Constructor & Destructor Documentation

◆ TTreeFormula() [1/4]

TTreeFormula::TTreeFormula ( const char *  name,
const char *  formula,
TTree tree,
const std::vector< std::string > &  aliases 
)
protected

Cache accelerating the GetRealInstance function.

Constructor used during the expansion of an alias.

Definition at line 166 of file TTreeFormula.cxx.

◆ TTreeFormula() [2/4]

TTreeFormula::TTreeFormula ( const TTreeFormula )
privatedelete

◆ TTreeFormula() [3/4]

TTreeFormula::TTreeFormula ( )

Definition at line 123 of file TTreeFormula.cxx.

◆ TTreeFormula() [4/4]

TTreeFormula::TTreeFormula ( const char *  name,
const char *  formula,
TTree tree 
)

Normal TTree Formula Constuctor.

Definition at line 156 of file TTreeFormula.cxx.

◆ ~TTreeFormula()

TTreeFormula::~TTreeFormula ( )
virtual

Tree Formula default destructor.

Definition at line 323 of file TTreeFormula.cxx.

Member Function Documentation

◆ BranchHasMethod()

Bool_t TTreeFormula::BranchHasMethod ( TLeaf leaf,
TBranch branch,
const char *  method,
const char *  params,
Long64_t  readentry 
) const
protected

Return the leaf (if any) of the tree with contains an object of a class having a method which has the name provided in the argument.

Definition at line 3219 of file TTreeFormula.cxx.

◆ Convert()

void TTreeFormula::Convert ( UInt_t  fromVersion)
protectedvirtual

Reimplemented from ROOT::v5::TFormula.

Definition at line 5618 of file TTreeFormula.cxx.

◆ DefineAlternate()

Int_t TTreeFormula::DefineAlternate ( const char *  expression)
protected

This method check for treat the case where expression contains $Atl and load up both fAliases and fExpr.

We return:

  • -1 in case of failure
  • 0 in case we did not find $Alt
  • the action number in case of success.

Definition at line 656 of file TTreeFormula.cxx.

◆ DefineDimensions()

void TTreeFormula::DefineDimensions ( Int_t  code,
Int_t  size,
TFormLeafInfoMultiVarDim info,
Int_t virt_dim 
)
protected

This method is used internally to decode the dimensions of the variables.

Definition at line 355 of file TTreeFormula.cxx.

◆ DefinedVariable()

Int_t TTreeFormula::DefinedVariable ( TString name,
Int_t action 
)
virtual

Check if name is in the list of Tree/Branch leaves.

This member function redefines the function in ROOT::v5::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]
  • Branch_Name.Leaf_Name[index1]
  • Branch_Name.Leaf_Name[][index2]
  • Branch_Name.Leaf_Name[index1][index2]

New additions:

  • Branch_Name.Leaf_Name[OtherLeaf_Name]
  • Branch_Name.Datamember_Name
  • '.' can be replaced by '->'

    and

  • Branch_Name[index1].Leaf_Name[index2]
  • Leaf_name[index].Action().OtherAction(param)
  • Leaf_name[index].Action()[val].OtherAction(param)

The expected returns values are

  • -2 : the name has been recognized but won't be usable
  • -1 : the name has not been recognized
  • >=0 : the name has been recognized, return the internal code for this name.

Reimplemented from ROOT::v5::TFormula.

Definition at line 2677 of file TTreeFormula.cxx.

◆ EvalClass() [1/2]

TClass * TTreeFormula::EvalClass ( ) const
virtual

Evaluate the class of this treeformula.

If the 'value' of this formula is a simple pointer to an object, this function returns the TClass corresponding to its type.

Definition at line 3573 of file TTreeFormula.cxx.

◆ EvalClass() [2/2]

TClass * TTreeFormula::EvalClass ( Int_t  oper) const
protectedvirtual

Evaluate the class of the operation oper.

If the 'value' in the requested operation is a simple pointer to an object, this function returns the TClass corresponding to its type.

Definition at line 3586 of file TTreeFormula.cxx.

◆ EvalInstance() [1/2]

template<typename T >
T TTreeFormula::EvalInstance ( Int_t  i = 0,
const char *  stringStack[] = 0 
)

Evaluate this treeformula.

Definition at line 3929 of file TTreeFormula.cxx.

◆ EvalInstance() [2/2]

virtual Double_t TTreeFormula::EvalInstance ( Int_t  i = 0,
const char *  stringStack[] = 0 
)
inlinevirtual

Definition at line 181 of file TTreeFormula.h.

◆ EvalInstance64()

virtual Long64_t TTreeFormula::EvalInstance64 ( Int_t  i = 0,
const char *  stringStack[] = 0 
)
inlinevirtual

Definition at line 182 of file TTreeFormula.h.

◆ EvalInstanceLD()

virtual LongDouble_t TTreeFormula::EvalInstanceLD ( Int_t  i = 0,
const char *  stringStack[] = 0 
)
inlinevirtual

Definition at line 183 of file TTreeFormula.h.

◆ EvalObject()

void * TTreeFormula::EvalObject ( Int_t  i = 0)
virtual

Evaluate this treeformula.

Return the address of the object pointed to by the formula. Return 0 if the formula is not a single object The object type can be retrieved using by call EvalClass();

Definition at line 3635 of file TTreeFormula.cxx.

◆ EvalStringInstance()

const char * TTreeFormula::EvalStringInstance ( Int_t  i = 0)
virtual

Eval the instance as a string.

Definition at line 3686 of file TTreeFormula.cxx.

◆ FindLeafForExpression()

Int_t TTreeFormula::FindLeafForExpression ( const char *  expression,
TLeaf *&  leaf,
TString leftover,
Bool_t final,
UInt_t paran_level,
TObjArray castqueue,
std::vector< std::string > &  aliasUsed,
Bool_t useLeafCollectionObject,
const char *  fullExpression 
)
protected

Look for the leaf corresponding to the start of expression.

It returns the corresponding leaf if any. It also modify the following arguments:

  • leftover: contain from expression that was not used to determine the leaf
  • final:
    • paran_level: number of un-matched open parenthesis
    • cast_queue: list of cast to be done
    • aliases: list of aliases used
  • Return <0 in case of failure
  • Return 0 if a leaf has been found
  • Return 2 if info about the TTree itself has been requested.

Definition at line 2167 of file TTreeFormula.cxx.

◆ GetConstant() [1/2]

template<typename T >
T TTreeFormula::GetConstant ( Int_t  k)
inlineprivate

Definition at line 3902 of file TTreeFormula.cxx.

◆ GetConstant() [2/2]

template<>
Long64_t TTreeFormula::GetConstant ( Int_t  k)
inline

Definition at line 3903 of file TTreeFormula.cxx.

◆ GetLeaf()

TLeaf * TTreeFormula::GetLeaf ( Int_t  n) const
virtual

Return leaf corresponding to serial number n.

Definition at line 4417 of file TTreeFormula.cxx.

◆ GetLeafInfo()

TFormLeafInfo * TTreeFormula::GetLeafInfo ( Int_t  code) const

Return DataMember corresponding to code.

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

Definition at line 4408 of file TTreeFormula.cxx.

◆ GetLeafWithDatamember()

TLeaf * TTreeFormula::GetLeafWithDatamember ( const char *  topchoice,
const char *  nextchice,
Long64_t  readentry 
) const
protected

Return the leaf (if any) which contains an object containing a data member which has the name provided in the arguments.

Definition at line 3053 of file TTreeFormula.cxx.

◆ GetManager()

TTreeFormulaManager * TTreeFormula::GetManager ( ) const
inline

Definition at line 189 of file TTreeFormula.h.

◆ GetMethodCall()

TMethodCall * TTreeFormula::GetMethodCall ( Int_t  code) const

Return methodcall corresponding to code.

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

Definition at line 4428 of file TTreeFormula.cxx.

◆ GetMultiplicity()

virtual Int_t TTreeFormula::GetMultiplicity ( ) const
inlinevirtual

Definition at line 191 of file TTreeFormula.h.

◆ GetNcodes()

virtual Int_t TTreeFormula::GetNcodes ( ) const
inlinevirtual

Definition at line 193 of file TTreeFormula.h.

◆ GetNdata()

Int_t TTreeFormula::GetNdata ( )
virtual

Return number of available instances in the formula.

Definition at line 4437 of file TTreeFormula.cxx.

◆ GetRealInstance()

Int_t TTreeFormula::GetRealInstance ( Int_t  instance,
Int_t  codeindex 
)
protected

Now let calculate what physical instance we really need.

Some redundant code is used to speed up the cases where they are no dimensions.

We know that instance is less that fCumulUsedSize[0] so we can skip the modulo when virt_dim is 0.

Definition at line 3338 of file TTreeFormula.cxx.

◆ GetTree()

virtual TTree * TTreeFormula::GetTree ( ) const
inlinevirtual

Definition at line 210 of file TTreeFormula.h.

◆ GetValueFromMethod()

Double_t TTreeFormula::GetValueFromMethod ( Int_t  i,
TLeaf leaf 
) const
protectedvirtual

Return result of a leafobject method.

Definition at line 4445 of file TTreeFormula.cxx.

◆ GetValuePointerFromMethod()

void * TTreeFormula::GetValuePointerFromMethod ( Int_t  i,
TLeaf leaf 
) const
protectedvirtual

Return result of a leafobject method.

Definition at line 4506 of file TTreeFormula.cxx.

◆ Init()

void TTreeFormula::Init ( const char *  name,
const char *  formula 
)
protected

Initialiation called from the constructors.

Definition at line 177 of file TTreeFormula.cxx.

◆ IsInteger()

Bool_t TTreeFormula::IsInteger ( Bool_t  fast = kTRUE) const
virtual

Return TRUE if the formula corresponds to one single Tree leaf and this leaf is short, int or unsigned short, int When a leaf is of type integer or string, the generated histogram is forced to have an integer bin width.

Definition at line 4575 of file TTreeFormula.cxx.

◆ IsLeafInteger()

Bool_t TTreeFormula::IsLeafInteger ( Int_t  code) const
protectedvirtual

Return TRUE if the leaf corresponding to code is short, int or unsigned short, int When a leaf is of type integer, the generated histogram is forced to have an integer bin width.

Definition at line 4630 of file TTreeFormula.cxx.

◆ IsLeafString()

Bool_t TTreeFormula::IsLeafString ( Int_t  code) const
protectedvirtual

Return TRUE if the leaf or data member corresponding to code is a string.

Definition at line 4700 of file TTreeFormula.cxx.

◆ IsQuickLoad()

Bool_t TTreeFormula::IsQuickLoad ( ) const
inline

Definition at line 201 of file TTreeFormula.h.

◆ IsString() [1/2]

Bool_t TTreeFormula::IsString ( ) const
virtual

Return TRUE if the formula is a string.

Definition at line 4678 of file TTreeFormula.cxx.

◆ IsString() [2/2]

Bool_t TTreeFormula::IsString ( Int_t  oper) const
protectedvirtual

Return true if the expression at the index 'oper' is to be treated as as string.

Reimplemented from ROOT::v5::TFormula.

Definition at line 4688 of file TTreeFormula.cxx.

◆ LoadBranches()

void TTreeFormula::LoadBranches ( )
protected

Make sure that all the branches have been loaded properly.

Definition at line 5321 of file TTreeFormula.cxx.

◆ LoadCurrentDim()

Bool_t TTreeFormula::LoadCurrentDim ( )
protected

Calculate the actual dimension for the current entry.

Definition at line 5345 of file TTreeFormula.cxx.

◆ Notify()

virtual Bool_t TTreeFormula::Notify ( )
inlinevirtual

This method must be overridden to handle object notification.

Reimplemented from TObject.

Definition at line 203 of file TTreeFormula.h.

◆ operator=()

TTreeFormula & TTreeFormula::operator= ( const TTreeFormula )
privatedelete

◆ ParseWithLeaf()

Int_t TTreeFormula::ParseWithLeaf ( TLeaf leaf,
const char *  subExpression,
Bool_t  final,
UInt_t  paran_level,
TObjArray castqueue,
Bool_t  useLeafCollectionObject,
const char *  fullExpression 
)
protected

Decompose 'expression' as pointing to something inside the leaf Returns:

  • -2 Error: some information is missing (message already printed)
  • -1 Error: Syntax is incorrect (message already printed)
  • 0
  • >0 the value returns is the action code.

Definition at line 763 of file TTreeFormula.cxx.

◆ PrintValue() [1/2]

char * TTreeFormula::PrintValue ( Int_t  mode,
Int_t  instance,
const char *  decform = "9.9" 
) const
virtual

Return value of variable as a string.

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

    decform contains the requested format (with the same convention as printf).

Definition at line 4792 of file TTreeFormula.cxx.

◆ PrintValue() [2/2]

char * TTreeFormula::PrintValue ( Int_t  mode = 0) const
virtual

Return value of variable as a string.

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

Definition at line 4778 of file TTreeFormula.cxx.

◆ RegisterDimensions() [1/5]

Int_t TTreeFormula::RegisterDimensions ( const char *  size,
Int_t  code 
)
protected

This method is used internally to decode the dimensions of the variables.

Definition at line 401 of file TTreeFormula.cxx.

◆ RegisterDimensions() [2/5]

Int_t TTreeFormula::RegisterDimensions ( Int_t  code,
Int_t  size,
TFormLeafInfoMultiVarDim multidim = 0 
)
protected

This method stores the dimension information for later usage.

Definition at line 438 of file TTreeFormula.cxx.

◆ RegisterDimensions() [3/5]

Int_t TTreeFormula::RegisterDimensions ( Int_t  code,
TBranchElement branch 
)
protected

This method is used internally to decode the dimensions of the variables.

Definition at line 554 of file TTreeFormula.cxx.

◆ RegisterDimensions() [4/5]

Int_t TTreeFormula::RegisterDimensions ( Int_t  code,
TFormLeafInfo info,
TFormLeafInfo maininfo,
Bool_t  useCollectionObject 
)
protected

This method is used internally to decode the dimensions of the variables.

Definition at line 449 of file TTreeFormula.cxx.

◆ RegisterDimensions() [5/5]

Int_t TTreeFormula::RegisterDimensions ( Int_t  code,
TLeaf leaf 
)
protected

This method is used internally to decode the dimensions of the variables.

Definition at line 582 of file TTreeFormula.cxx.

◆ ResetDimensions()

void TTreeFormula::ResetDimensions ( )
protected

Populate the TTreeFormulaManager with the dimension information.

Definition at line 5139 of file TTreeFormula.cxx.

◆ ResetLoading()

void TTreeFormula::ResetLoading ( )
virtual

Tell the formula that we are going to request a new entry.

Definition at line 4933 of file TTreeFormula.cxx.

◆ SetAxis()

void TTreeFormula::SetAxis ( TAxis axis = 0)
virtual

Set the axis (in particular get the type).

Definition at line 4971 of file TTreeFormula.cxx.

◆ SetQuickLoad()

void TTreeFormula::SetQuickLoad ( Bool_t  quick)
inline

Definition at line 207 of file TTreeFormula.h.

◆ SetTree()

virtual void TTreeFormula::SetTree ( TTree tree)
inlinevirtual

Definition at line 208 of file TTreeFormula.h.

◆ StringToNumber()

Bool_t TTreeFormula::StringToNumber ( Int_t  oper)
protectedvirtual

Try to 'demote' a string into an array bytes.

If this is not possible, return false.

Reimplemented from ROOT::v5::TFormula.

Definition at line 5030 of file TTreeFormula.cxx.

◆ SwitchToFormLeafInfo()

Bool_t TTreeFormula::SwitchToFormLeafInfo ( Int_t  code)
protectedvirtual

Convert the underlying lookup method from the direct technique (dereferencing the address held by the branch) to the method using TFormLeafInfo.

This is in particular usefull in the case where we need to append an additional TFormLeafInfo (for example to call a method). Return false if the switch was unsuccessfull (basically in the case of an old style split tree).

Definition at line 5666 of file TTreeFormula.cxx.

◆ UpdateFormulaLeaves()

void TTreeFormula::UpdateFormulaLeaves ( )
virtual

This function is called TTreePlayer::UpdateFormulaLeaves, itself called by TChain::LoadTree when a new Tree is loaded.

Because Trees in a TChain may have a different list of leaves, one must update the leaves numbers in the TTreeFormula used by the TreePlayer.

A safer alternative would be to recompile the whole thing .... However currently compile HAS TO be called from the constructor!

Definition at line 5059 of file TTreeFormula.cxx.

Friends And Related Function Documentation

◆ TTreeFormulaManager

friend class TTreeFormulaManager
friend

Definition at line 60 of file TTreeFormula.h.

Member Data Documentation

◆ fAliases

TObjArray TTreeFormula::fAliases
protected

List of TCutG and TEntryList used in the formula.

Definition at line 107 of file TTreeFormula.h.

◆ fAliasesUsed

std::vector<std::string> TTreeFormula::fAliasesUsed
protected

list of dimension setups, for delayed creation of the dimension information.

Definition at line 128 of file TTreeFormula.h.

◆ fAxis

TAxis* TTreeFormula::fAxis
protected

Definition at line 122 of file TTreeFormula.h.

◆ fBranches

TObjArray TTreeFormula::fBranches
protected

Definition at line 109 of file TTreeFormula.h.

◆ fCodes

Int_t TTreeFormula::fCodes[kMAXCODES]
protected

pointer to Tree

Definition at line 96 of file TTreeFormula.h.

◆ fConstLD

LongDouble_t* TTreeFormula::fConstLD
protected

List of aliases used during the parsing of the expression.

Definition at line 130 of file TTreeFormula.h.

◆ fCumulSizes

Int_t TTreeFormula::fCumulSizes[kMAXCODES][kMAXFORMDIM]
protected

Definition at line 118 of file TTreeFormula.h.

◆ fDataMembers

TObjArray TTreeFormula::fDataMembers
protected

List of leaf used in this formula.

Definition at line 104 of file TTreeFormula.h.

◆ fDidBooleanOptimization

Bool_t TTreeFormula::fDidBooleanOptimization
protected

pointer to histogram axis if this is a string

Definition at line 123 of file TTreeFormula.h.

◆ fDimensionSetup

TList* TTreeFormula::fDimensionSetup
protected

The dimension coordinator.

Definition at line 127 of file TTreeFormula.h.

◆ fExternalCuts

TObjArray TTreeFormula::fExternalCuts
protected

List of leaf method calls.

Definition at line 106 of file TTreeFormula.h.

◆ fFixedSizes

Int_t TTreeFormula::fFixedSizes[kMAXCODES][kMAXFORMDIM]
protected

Definition at line 114 of file TTreeFormula.h.

◆ fHasCast

Bool_t TTreeFormula::fHasCast
protected

Definition at line 99 of file TTreeFormula.h.

◆ fHasMultipleVarDim

UChar_t TTreeFormula::fHasMultipleVarDim[kMAXCODES]
protected

Definition at line 115 of file TTreeFormula.h.

◆ fIndexes

Int_t TTreeFormula::fIndexes[kMAXCODES][kMAXFORMDIM]
protected

Definition at line 119 of file TTreeFormula.h.

◆ fLeafNames

TObjArray TTreeFormula::fLeafNames
protected

List of TTreeFormula for each alias used.

Definition at line 108 of file TTreeFormula.h.

◆ fLeaves

TObjArray TTreeFormula::fLeaves
protected

Definition at line 103 of file TTreeFormula.h.

◆ fLookupType

Int_t* TTreeFormula::fLookupType
protected

Definition at line 102 of file TTreeFormula.h.

◆ fManager

TTreeFormulaManager* TTreeFormula::fManager
protected

True if we executed one boolean optimization since the last time instance number 0 was evaluated.

Definition at line 124 of file TTreeFormula.h.

◆ fMethods

TObjArray TTreeFormula::fMethods
protected

List of leaf data members.

Definition at line 105 of file TTreeFormula.h.

◆ fMultiplicity

Int_t TTreeFormula::fMultiplicity
protected

Definition at line 100 of file TTreeFormula.h.

◆ fNcodes

Int_t TTreeFormula::fNcodes
protected

This caches the physical number of element in the leaf or data member.

Definition at line 98 of file TTreeFormula.h.

◆ fNdata

Int_t TTreeFormula::fNdata[kMAXCODES]
protected

Definition at line 97 of file TTreeFormula.h.

◆ fNdimensions

Int_t TTreeFormula::fNdimensions[kMAXCODES]
protected

If true, the current entry has not been loaded yet.

Definition at line 113 of file TTreeFormula.h.

◆ fNeedLoading

Bool_t TTreeFormula::fNeedLoading
protected

If true, branch GetEntry is only called when the entry number changes.

Definition at line 111 of file TTreeFormula.h.

◆ fNindex

Int_t TTreeFormula::fNindex
protected

Definition at line 101 of file TTreeFormula.h.

◆ fQuickLoad

Bool_t TTreeFormula::fQuickLoad
protected

List of branches to read. Similar to fLeaves but duplicates are zeroed out.

Definition at line 110 of file TTreeFormula.h.

◆ fRealInstanceCache

RealInstanceCache TTreeFormula::fRealInstanceCache
protected

local version of fConsts able to store bigger numbers

Definition at line 132 of file TTreeFormula.h.

◆ fTree

TTree* TTreeFormula::fTree
protected

Definition at line 95 of file TTreeFormula.h.

◆ fVarIndexes

TTreeFormula* TTreeFormula::fVarIndexes[kMAXCODES][kMAXFORMDIM]
protected

Definition at line 120 of file TTreeFormula.h.

Libraries for TTreeFormula:
[legend]

The documentation for this class was generated from the following files: