TTreeFormula now relies on a variety of TFormLeafInfo classes to handle the reading of the information. Here is the list of theses classes: TFormLeafInfo TFormLeafInfoDirect TFormLeafInfoNumerical TFormLeafInfoClones TFormLeafInfoCollection TFormLeafInfoPointer TFormLeafInfoMethod TFormLeafInfoMultiVarDim TFormLeafInfoMultiVarDimDirect TFormLeafInfoCast 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.
TTreeFormula() | |
TTreeFormula(const char* name, const char* formula, TTree* tree) | |
virtual | ~TTreeFormula() |
void | TObject::AbstractMethod(const char* method) const |
virtual void | TFormula::Analyze(const char* schain, Int_t& err, Int_t offset = 0) |
virtual Bool_t | TFormula::AnalyzeFunction(TString& chaine, Int_t& err, Int_t offset = 0) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TFormula::Clear(Option_t* option = "") |
virtual TObject* | TNamed::Clone(const char* newname = "") const |
virtual Int_t | TNamed::Compare(const TObject* obj) const |
virtual Int_t | TFormula::Compile(const char* expression = "") |
virtual void | TFormula::Copy(TObject& formula) const |
virtual char* | TFormula::DefinedString(Int_t code) |
virtual Double_t | TFormula::DefinedValue(Int_t code) |
virtual Int_t | DefinedVariable(TString& variable, Int_t& action) |
virtual void | TObject::Delete(Option_t* option = "")MENU |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() constMENU |
virtual TObject* | TObject::DrawClone(Option_t* option = "") constMENU |
virtual void | TObject::Dump() constMENU |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual Double_t | TFormula::Eval(Double_t x, Double_t y = 0, Double_t z = 0, Double_t t = 0) const |
virtual TClass* | EvalClass() const |
virtual Double_t | EvalInstance(Int_t i = 0, const char** stringStack = 0) |
virtual void* | EvalObject(Int_t i = 0) |
virtual Double_t | TFormula::EvalPar(const Double_t* x, const Double_t* params = 0) |
virtual Double_t | TFormula::EvalParOld(const Double_t* x, const Double_t* params = 0) |
virtual const char* | EvalStringInstance(Int_t i = 0) |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
virtual void | TNamed::FillBuffer(char*& buffer) |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
virtual TString | TFormula::GetExpFormula(Option_t* option = "") const |
virtual const char* | TObject::GetIconName() const |
virtual TLeaf* | GetLeaf(Int_t n) const |
TFormLeafInfo* | GetLeafInfo(Int_t code) const |
virtual const TObject* | TFormula::GetLinearPart(Int_t i) |
TTreeFormulaManager* | GetManager() const |
TMethodCall* | GetMethodCall(Int_t code) const |
virtual Int_t | GetMultiplicity() const |
virtual const char* | TNamed::GetName() const |
virtual Int_t | GetNcodes() const |
virtual Int_t | GetNdata() |
virtual Int_t | TFormula::GetNdim() const |
virtual Int_t | TFormula::GetNpar() const |
virtual Int_t | TFormula::GetNumber() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
Double_t | TFormula::GetParameter(Int_t ipar) const |
Double_t | TFormula::GetParameter(const char* name) const |
virtual Double_t* | TFormula::GetParameters() const |
virtual void | TFormula::GetParameters(Double_t* params) |
virtual const char* | TFormula::GetParName(Int_t ipar) const |
virtual Int_t | TFormula::GetParNumber(const char* name) const |
virtual const char* | TNamed::GetTitle() const |
virtual TTree* | GetTree() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TNamed::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() constMENU |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
virtual Bool_t | IsInteger(Bool_t fast = kTRUE) const |
virtual Bool_t | TFormula::IsLinear() |
virtual Bool_t | TFormula::IsNormalized() |
Bool_t | TObject::IsOnHeap() const |
Bool_t | IsQuickLoad() const |
virtual Bool_t | TNamed::IsSortable() const |
virtual Bool_t | IsString() const |
Bool_t | TObject::IsZombie() const |
virtual void | TNamed::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
void | TFormula::Optimize() |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TFormula::Print(Option_t* option = "") constMENU |
virtual char* | PrintValue(Int_t mode = 0) const |
virtual char* | PrintValue(Int_t mode, Int_t instance, const char* decform = "9.9") const |
virtual void | TFormula::ProcessLinear(TString& replaceformula) |
virtual Int_t | TObject::Read(const char* name) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | ResetLoading() |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU |
virtual void | TObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "") |
virtual void | SetAxis(TAxis* axis = 0) |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "")MENU |
static void | TObject::SetDtorOnly(void* obj) |
static void | TFormula::SetMaxima(Int_t maxop = 1000, Int_t maxpar = 1000, Int_t maxconst = 1000) |
virtual void | TNamed::SetName(const char* name)MENU |
virtual void | TNamed::SetNameTitle(const char* name, const char* title) |
virtual void | TFormula::SetNumber(Int_t number) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TFormula::SetParameter(const char* name, Double_t parvalue) |
virtual void | TFormula::SetParameter(Int_t ipar, Double_t parvalue) |
virtual void | TFormula::SetParameters(const Double_t* params) |
virtual void | TFormula::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)MENU |
virtual void | TFormula::SetParName(Int_t ipar, const char* name) |
virtual void | TFormula::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")MENU |
void | SetQuickLoad(Bool_t quick) |
virtual void | TNamed::SetTitle(const char* title = "")MENU |
virtual void | SetTree(TTree* tree) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual Int_t | TNamed::Sizeof() const |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
virtual void | TFormula::Update() |
virtual void | UpdateFormulaLeaves() |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const |
TTreeFormula(const char* name, const char* formula, TTree* tree, const vector<std::string>& aliases) | |
Bool_t | BranchHasMethod(TLeaf* leaf, TBranch* branch, const char* method, const char* params, Long64_t readentry) const |
void | TFormula::ClearFormula(Option_t* option = "") |
virtual void | Convert(UInt_t fromVersion) |
Int_t | DefineAlternate(const char* expression) |
void | DefineDimensions(Int_t code, Int_t size, TFormLeafInfoMultiVarDim* info, Int_t& virt_dim) |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
virtual TClass* | EvalClass(Int_t oper) const |
Double_t | TFormula::EvalParFast(const Double_t* x, const Double_t* params) |
Double_t | TFormula::EvalPrimitive(const Double_t* x, const Double_t* params) |
Double_t | TFormula::EvalPrimitive0(const Double_t* x, const Double_t* params) |
Double_t | TFormula::EvalPrimitive1(const Double_t* x, const Double_t* params) |
Double_t | TFormula::EvalPrimitive2(const Double_t* x, const Double_t* params) |
Double_t | TFormula::EvalPrimitive3(const Double_t* x, const Double_t* params) |
Double_t | TFormula::EvalPrimitive4(const Double_t* x, const Double_t* params) |
Int_t | FindLeafForExpression(const char* expression, TLeaf*& leaf, TString& leftover, Bool_t& final, UInt_t& paran_level, TObjArray& castqueue, vector<std::string>& aliasUsed, Bool_t& useLeafCollectionObject, const char* fullExpression) |
Short_t | TFormula::GetAction(Int_t code) const |
Short_t | TFormula::GetActionOptimized(Int_t code) const |
Int_t | TFormula::GetActionParam(Int_t code) const |
Int_t | TFormula::GetActionParamOptimized(Int_t code) const |
TLeaf* | GetLeafWithDatamember(const char* topchoice, const char* nextchice, Long64_t readentry) const |
Int_t* | TFormula::GetOper() const |
Int_t* | TFormula::GetOperOptimized() const |
Int_t | GetRealInstance(Int_t instance, Int_t codeindex) |
virtual Double_t | GetValueFromMethod(Int_t i, TLeaf* leaf) const |
virtual void* | GetValuePointerFromMethod(Int_t i, TLeaf* leaf) const |
void | Init(const char* name, const char* formula) |
virtual Bool_t | IsLeafInteger(Int_t code) const |
virtual Bool_t | IsLeafString(Int_t code) const |
virtual Bool_t | IsString(Int_t oper) const |
void | LoadBranches() |
Bool_t | LoadCurrentDim() |
void | TFormula::MakePrimitive(const char* expr, Int_t pos) |
void | TObject::MakeZombie() |
Int_t | ParseWithLeaf(TLeaf* leaf, const char* expression, Bool_t final, UInt_t paran_level, TObjArray& castqueue, Bool_t useLeafCollectionObject, const char* fullExpression) |
Int_t | TFormula::PreCompile() |
Int_t | RegisterDimensions(Int_t code, TBranchElement* branch) |
Int_t | RegisterDimensions(Int_t code, TLeaf* leaf) |
Int_t | RegisterDimensions(const char* size, Int_t code) |
Int_t | RegisterDimensions(Int_t code, Int_t size, TFormLeafInfoMultiVarDim* multidim = 0) |
Int_t | RegisterDimensions(Int_t code, TFormLeafInfo* info, TFormLeafInfo* maininfo, Bool_t useCollectionObject) |
void | ResetDimensions() |
void | TFormula::SetAction(Int_t code, Int_t value, Int_t param = 0) |
void | TFormula::SetActionOptimized(Int_t code, Int_t value, Int_t param = 0) |
virtual Bool_t | SwitchToFormLeafInfo(Int_t code) |
TTreeFormula(const TTreeFormula&) | |
TTreeFormula& | operator=(const TTreeFormula&) |
G__p2memfunc | TFormula::fOptimal | !pointer to optimal function |
TObjArray | fAliases | ! List of TTreeFormula for each alias used. |
vector<std::string> | fAliasesUsed | ! List of aliases used during the parsing of the expression. |
TBits | TFormula::fAlreadyFound | ! cache for information |
TAxis* | fAxis | ! pointer to histogram axis if this is a string |
TObjArray | fBranches | ! List of branches to read. Similar to fLeaces but duplicates are zeroed out. |
Short_t | fCodes[500] | List of leaf numbers referenced in formula |
Double_t* | TFormula::fConst | [fNconst] Array of fNconst formula constants |
Int_t | fCumulSizes[500][5] | Accumulated sizes of lower dimensions for each leaf after variable dimensions has been calculated |
TObjArray | fDataMembers | ! List of leaf data members |
Bool_t | fDidBooleanOptimization | ! True if we executed one boolean optimization since the last time instance number 0 was evaluated |
TList* | fDimensionSetup | ! list of dimension setups, for delayed creation of the dimension information. |
TString* | TFormula::fExpr | [fNoper] List of expressions |
TString* | TFormula::fExprOptimized | ![fNOperOptimized] List of expressions |
TObjArray | fExternalCuts | ! List of TCutG and TEntryList used in the formula |
Int_t | fFixedSizes[500][5] | Physical sizes of lower dimensions for each leaf |
TObjArray | TFormula::fFunctions | Array of function calls to make |
Bool_t | fHasCast | Record whether the formula contain a cast operation or not |
UChar_t | fHasMultipleVarDim[500] | True if the corresponding variable is an array with more than one variable dimension. |
Int_t | fIndexes[500][5] | Index of array selected by user for each leaf |
TObjArray | fLeafNames | List of TNamed describing leaves |
TObjArray | fLeaves | ! List of leaf used in this formula. |
TObjArray | TFormula::fLinearParts | ! Linear parts if the formula is linear (contains '|') |
Int_t* | fLookupType | [fNindex] array indicating how each leaf should be looked-up |
TTreeFormulaManager* | fManager | ! The dimension coordinator. |
TObjArray | fMethods | ! List of leaf method calls |
Int_t | fMultiplicity | Indicator of the variability of the formula |
Int_t | TFormula::fNOperOptimized | !Number of operators after optimization |
TString | TNamed::fName | object identifier |
TString* | TFormula::fNames | [fNpar] Array of parameter names |
Int_t | fNcodes | Number of leaves referenced in formula |
Int_t | TFormula::fNconst | Number of constants |
Int_t | fNdata[500] | ! This caches the physical number of element in the leaf or datamember. |
Int_t | TFormula::fNdim | Dimension of function (1=1-Dim, 2=2-Dim,etc) |
Int_t | fNdimensions[500] | Number of array dimensions in each leaf |
Bool_t | fNeedLoading | ! If true, the current entry has not been loaded yet. |
Int_t | fNindex | Size of fIndex |
Int_t | TFormula::fNoper | Number of operators |
Int_t | TFormula::fNpar | Number of parameters |
Int_t | TFormula::fNstring | Number of different constants character strings |
Int_t | TFormula::fNumber | formula number identifier |
Int_t | TFormula::fNval | Number of different variables in expression |
TOperOffset* | TFormula::fOperOffset | ![fNOperOptimized] Offsets of operrands |
Int_t* | TFormula::fOperOptimized | ![fNOperOptimized] List of operators. (See documentation for changes made at version 7) |
Double_t* | TFormula::fParams | [fNpar] Array of fNpar parameters |
TFormulaPrimitive** | TFormula::fPredefined | ![fNPar] predefined function |
Bool_t | fQuickLoad | ! If true, branch GetEntry is only called when the entry number changes. |
TString | TNamed::fTitle | object title |
TTree* | fTree | ! pointer to Tree |
TTreeFormula* | fVarIndexes[500][5] | Pointer to a variable index. |
Constructor used during the expansion of an alias
This method is used internally to decode the dimensions of the variables
This method is used internally to decode the dimensions of the variables
This method stores the dimension information for later usage.
This method is used internally to decode the dimensions of the variables
This method is used internally to decode the dimensions of the variables
This method is used internally to decode the dimensions of the variables
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.
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.
-*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] - 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.
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.
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.
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.
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.
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();
Evaluate this treeformula*-*-*-*- *-* =========================
-*-*Return DataMember corresponding to code *-* ======================================= function called by TLeafObject::GetValue with the value of fLookupType computed in TTreeFormula::DefinedVariable
-*-*Return leaf corresponding to serial number n *-* ============================================
-*-*Return methodcall corresponding to code *-* ======================================= function called by TLeafObject::GetValue with the value of fLookupType computed in TTreeFormula::DefinedVariable
*-*Return number of available instances in the formula *-* ===================================================
return TRUE if the leaf or data member corresponding to code is a string
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.
Convert the fOper of a TTTreeFormula version fromVersion to the current in memory version
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).