Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TTreeFormula.cxx File Reference
#include "TROOT.h"
#include "TTreeFormula.h"
#include "TList.h"
#include "TTree.h"
#include "TBuffer.h"
#include "TBranch.h"
#include "TBranchObject.h"
#include "TBranchElement.h"
#include "TClonesArray.h"
#include "TLeafB.h"
#include "TLeafC.h"
#include "TLeafElement.h"
#include "TLeafObject.h"
#include "TMethodCall.h"
#include "TCutG.h"
#include "TRandom.h"
#include "TInterpreter.h"
#include "TDataType.h"
#include "TStreamerInfo.h"
#include "TStreamerElement.h"
#include "TArrayI.h"
#include "TAxis.h"
#include "TError.h"
#include "TVirtualCollectionProxy.h"
#include "TString.h"
#include "TMath.h"
#include "TVirtualRefProxy.h"
#include "TTreeFormulaManager.h"
#include "TFormLeafInfo.h"
#include "TMethod.h"
#include "TFormLeafInfoReference.h"
#include "strlcpy.h"
#include "snprintf.h"
#include "TEntryList.h"
#include <cctype>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <typeinfo>
#include <algorithm>
#include <sstream>
Include dependency graph for TTreeFormula.cxx:

Classes

class  TDimensionInfo
 A small helper class to help in keeping track of the array dimensions encountered in the analysis of the expression. More...
 

Macros

#define TREE_EVAL_INIT
 
#define TREE_EVAL_INIT_LOOP
 
#define TT_EVAL_INIT
 
#define TT_EVAL_INIT_LOOP
 

Functions

template<typename T >
FindMax (TTreeFormula *arr)
 
template<typename T >
FindMax (TTreeFormula *arr, TTreeFormula *condition)
 
template<typename T >
FindMin (TTreeFormula *arr)
 
template<typename T >
FindMin (TTreeFormula *arr, TTreeFormula *condition)
 
bool IsNumberConstant (const std::string &str)
 Helper function checking if a string contains a literal number.
 
static void R__LoadBranch (TBranch *br, Long64_t entry, bool quickLoad)
 
template<typename T >
Summing (TTreeFormula *sum)
 

Variables

const Int_t kMaxLen = 2048
 

Macro Definition Documentation

◆ TREE_EVAL_INIT

#define TREE_EVAL_INIT
Value:
const Int_t real_instance = GetRealInstance(instance,0); \
if (real_instance>=fNdata[0]) return TMath::SignalingNaN(); \
if (fAxis) { \
char * label; \
/* This portion is a duplicate (for speed reason) of the code \
located in the main for loop at "a tree string" (and in EvalStringInstance) */ \
label = (char*)GetLeafInfo(0)->GetValuePointer((TLeaf*)0x0,instance); \
Int_t bin = fAxis->FindBin(label); \
return bin-0.5; \
}
static Roo_reg_AGKInteg1D instance
int Int_t
Definition RtypesCore.h:45
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
Definition TLeaf.h:57
Double_t SignalingNaN()
Returns a signaling NaN as defined by IEEE 754](http://en.wikipedia.org/wiki/NaN#Signaling_NaN).
Definition TMath.h:916

Definition at line 3790 of file TTreeFormula.cxx.

◆ TREE_EVAL_INIT_LOOP

#define TREE_EVAL_INIT_LOOP
Value:
/* Now let calculate what physical instance we really need. */ \
const Int_t real_instance = GetRealInstance(instance,code); \
if (real_instance>=fNdata[code]) return TMath::SignalingNaN();

Definition at line 3844 of file TTreeFormula.cxx.

◆ TT_EVAL_INIT

#define TT_EVAL_INIT

Definition at line 3756 of file TTreeFormula.cxx.

◆ TT_EVAL_INIT_LOOP

#define TT_EVAL_INIT_LOOP

Definition at line 3803 of file TTreeFormula.cxx.

Function Documentation

◆ FindMax() [1/2]

template<typename T >
T FindMax ( TTreeFormula * arr)

Definition at line 3873 of file TTreeFormula.cxx.

◆ FindMax() [2/2]

template<typename T >
T FindMax ( TTreeFormula * arr,
TTreeFormula * condition )

Definition at line 3920 of file TTreeFormula.cxx.

◆ FindMin() [1/2]

template<typename T >
T FindMin ( TTreeFormula * arr)

Definition at line 3858 of file TTreeFormula.cxx.

◆ FindMin() [2/2]

template<typename T >
T FindMin ( TTreeFormula * arr,
TTreeFormula * condition )

Definition at line 3888 of file TTreeFormula.cxx.

◆ IsNumberConstant()

bool IsNumberConstant ( const std::string & str)

Helper function checking if a string contains a literal number.

Whitespaces are not allowed as part of a valid number-string

Returns
true if it can be converted to a valid number (floating or integer), false otherwise.

Definition at line 113 of file TTreeFormula.cxx.

◆ R__LoadBranch()

static void R__LoadBranch ( TBranch * br,
Long64_t entry,
bool quickLoad )
inlinestatic

Definition at line 100 of file TTreeFormula.cxx.

◆ Summing()

template<typename T >
T Summing ( TTreeFormula * sum)

Definition at line 3851 of file TTreeFormula.cxx.

Variable Documentation

◆ kMaxLen

const Int_t kMaxLen = 2048

Definition at line 56 of file TTreeFormula.cxx.