106 auto res =
br->GetEntry(
entry);
120 std::istringstream
iss(str);
122 return iss >> std::noskipws >> number &&
iss.eof();
145 fDidBooleanOptimization(
false), fDimensionSetup(nullptr)
177 fDidBooleanOptimization(
false), fDimensionSetup(nullptr)
186 const std::vector<std::string>&
aliases)
188 fDidBooleanOptimization(
false), fDimensionSetup(nullptr), fAliasesUsed(
aliases)
233 Warning(
"TTreeFormula",
"Too many items in expression:%s",expression);
243 if (!
leafc)
continue;
291 Error(
"TTreeFormula",
292 "Index %d for dimension #%d in %s is too high (max is %d)",
423 const char * current;
432 if (current[0] !=
'[') current--;
448 current = (
char*)
strstr( current,
"[" );
462 return (
size==-1) ? 1 : 0;
486 if (
elem->GetArrayDim()>0) {
488 ndim =
elem->GetArrayDim();
534 }
else if (
c &&
c->GetReferenceProxy() &&
c->GetReferenceProxy()->HasCounter() ) {
537 }
else if (
elem->GetArrayDim()>0) {
539 ndim =
elem->GetArrayDim();
565 }
while (current<ndim);
613 const char *bname =
leaf->GetBranch()->GetName();
647 if (
branch->GetBranchCount2()) {
649 if (!
branch->GetBranchCount()) {
651 "Noticed an incorrect in-memory TBranchElement object (%s).\nIt has a BranchCount2 but no BranchCount!\nThe result might be incorrect!",
659 "Already in kDataMember mode when handling multiple variable dimensions");
680 static const char *
altfunc =
"Alt$(";
681 static const char *
minfunc =
"MinIf$(";
682 static const char *
maxfunc =
"MaxIf$(";
687 && expression[
strlen(expression)-1]==
')' ) {
692 && expression[
strlen(expression)-1]==
')' ) {
697 && expression[
strlen(expression)-1]==
')' ) {
709 for(
unsigned int i=start;i<
strlen(expression);++i) {
710 switch (expression[i]) {
711 case '(':
paran++;
break;
712 case ')':
paran--;
break;
713 case '"': instr = instr ? 0 : 1;
break;
714 case '[':
brack++;
break;
715 case ']':
brack--;
break;
717 if (expression[i]==
',' &&
paran==0 && instr==0 &&
brack==0) {
718 part1 = full( start, i-start );
719 part2 = full( i+1, full.Length() -1 - (i+1) );
730 if (
alternate->GetManager()->GetMultiplicity() != 0 ) {
731 Error(
"DefineAlternate",
"The 2nd arguments in %s can not be an array (%s,%d)!",
733 alternate->GetManager()->GetMultiplicity());
740 Error(
"DefineAlternate",
741 "The 2nd arguments in %s has to return the same type as the 1st argument (string)!",
747 Error(
"DefineAlternate",
748 "The 2nd arguments in %s has to return the same type as the 1st argument (numerical type)!",
757 Error(
"DefineAlternate",
758 "The arguments of %s can not be strings!",
812 if (
br->GetInfo() == nullptr ) {
813 Error(
"ParseWithLeaf",
"Missing StreamerInfo for %s. We will be unable to read!",
824 if (
mom->GetInfo()==
nullptr) {
825 Error(
"ParseWithLeaf",
"Missing StreamerInfo for %s."
826 " We will be unable to read!",
830 if ((
mom->GetType()) < -1 && !
mom->GetAddress()) {
831 Error(
"ParseWithLeaf",
"Address not set when the type of the branch is negative for for %s. We will be unable to read!",
mom->GetName());
844 const char*
alias =
nullptr;
862 Error(
"TTreeFormula",
863 "Length of leafname (%d) exceeds maximum allowed by the buffer (%d), formula will be truncated.",
875 if (
leaf->GetBranch()!=
leaf->GetBranch()->GetMother()) {
953 cl =
element->GetClassPointer();
958 cl =
info->GetClass();
965 if (cl &&
branchEl->GetBranchCount()) {
971 "Missing TStreamerElement in object in TClonesArray section");
1004 }
else if (
branchEl->GetType()==41) {
1009 Warning(
"ParseWithLeaf",
"Missing TStreamerElement in object in Collection section");
1015 if ( count->
GetID() >= 0 ) {
1056 }
else if (
branchEl->GetType()==3) {
1129 &&
elemCl->GetCollectionProxy()->GetValueClass()
1130 &&
elemCl->GetCollectionProxy()->GetValueClass()->GetCollectionProxy()) {
1143 elemCl->GetCollectionProxy()->GetValueClass(),
1149 cl =
elemCl->GetCollectionProxy()->GetValueClass();
1163 &&
elemCl->GetCollectionProxy()->GetValueClass()==
nullptr
1164 &&
elemCl->GetCollectionProxy()->GetType()>0) {
1191 }
else if (!
element->IsaPointer()) {
1211 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1221 Error(
"ParseWithLeaf",
"Failed to access class type of reference target (%s)",
element->GetName());
1229 Error(
"ParseWithLeaf",
"Found a numerical leaf but the name has trailing characters: \"%s\"",
subExpression);
1292 if ( !
casted->InheritsFrom(cl) ) {
1293 Error(
"ParseWithLeaf",
"%s does not inherit from %s. Casting not possible!",
1319 for (i=0, current = &(
work[0]); i<=
nchname;i++ ) {
1321 if (right[i] ==
'(') {
1324 *current++ = right[i++];
1325 }
while(right[i]!=
')' && right[i]);
1326 *current++ = right[i];
1330 *params = 0; params++;
1331 }
else params = (
char *)
")";
1333 Error(
"ParseWithLeaf",
"Can not call '%s' with a class",
work);
1337 Error(
"ParseWithLeaf",
"Class probably unavailable:%s",cl->
GetName());
1348 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d",
lres);
1355 || !
leaf->IsOnTerminalBranch());
1386 || !
leaf->IsOnTerminalBranch());
1409 Warning(
"ParseWithLeaf",
"Can not call method on content of %s in %s\n",
1416 Error(
"ParseWithLeaf",
1417 "Could not discover the TClass corresponding to (%s)!",
1428 || !
leaf->IsOnTerminalBranch());
1437 Error(
"ParseWithLeaf",
1438 "Can not call method %s on class without dictionary (%s)!",
1445 if (!
method->GetMethod()) {
1446 Error(
"ParseWithLeaf",
"Unknown method:%s in %s",right,cl->
GetName());
1449 switch(
method->ReturnType()) {
1471 Error(
"DefineVariable",
"Method %s from %s has an impossible return type %d",
1486 current = &(
work[0]);
1494 Warning(
"ParseWithLeaf",
"TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection %s.",
1519 }
else if (right[i] ==
')') {
1537 current = &(
work[0]);
1544 }
else if (i > 0 && (right[i] ==
'.' || right[i] ==
'[' || right[i] ==
'\0') ) {
1574 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1592 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d",
eres);
1612 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1638 if (
clbranch->GetListOfBranches()->GetLast()>=0) {
1640 Error(
"ParseWithLeaf",
"Unimplemented usage of ClonesArray");
1651 "TClonesArray object was not retrievable for %s!",
1677 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1710 Error(
"ParseWithLeaf",
"Could you not find the inner class for %s with coll type = %d",
1714 Warning(
"ParseWithLeaf",
"No data member in content of %s in %s\n",
1722 if (
leaf)
leaf->GetBranch()->Print();
1723 Warning(
"ParseWithLeaf",
"Missing class for %s!",
name.Data());
1742 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1771 }
else if (
curelem->GetClassPointer() &&
curelem->GetClassPointer()->GetCollectionProxy()) {
1777 curelem->GetClassPointer()->GetCollectionProxy()->GetValueClass();
1783 Warning(
"ParseWithLeaf",
"TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection %s.",
1833 bool object =
false;
1834 bool pointer =
false;
1866 Error(
"ParseWithLeaf",
1867 "%s is a datamember of %s BUT is not yet of a supported type (%d)",
1872 Error(
"ParseWithLeaf",
1873 "%s is a datamember of %s BUT is not of a unknown type (%d)",
1880 ||
element->GetClassPointer()->GetCollectionProxy() ) )
1898 &&
element->GetClassPointer()->GetCollectionProxy()) {
1902 Warning(
"ParseWithLeaf",
"TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection %s.",
1922 if (
element->GetClassPointer()->GetCollectionProxy()->GetValueClass()==
nullptr) {
1924 element->GetClassPointer()->GetCollectionProxy());
1935 if (
valueCl!=
nullptr &&
valueCl->GetCollectionProxy()!=
nullptr) {
1952 if (
elemCl->GetCollectionProxy() &&
1953 elemCl->GetCollectionProxy()->GetValueClass()==
nullptr) {
1963 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1979 }
else if (pointer) {
1991 if (cl)
Error(
"ParseWithLeaf",
"%s is not a datamember of %s",
work,cl->
GetName());
2008 if ( right[i] !=
'\0' ) {
2015 if (
inf->IsReference() ) {
2024 cl =
refInfo->GetValueClass(ptr);
2026 Error(
"ParseWithLeaf",
"Failed to access class type of reference target (%s)",
element->GetName());
2032 Error(
"ParseWithLeaf",
"Failed to access class type of reference target (%s)",
element->GetName());
2037 cl =
element->GetClassPointer();
2041 current = &(
work[0]);
2054 *current++ = right[i];
2075 if (!last)
return action;
2103 if (!last)
return action;
2251 const char *
cname = expression;
2252 char first[
kMaxLen]; first[0] =
'\0';
2253 char second[
kMaxLen*2]; second[0] =
'\0';
2254 char right[
kMaxLen*2]; right[0] =
'\0';
2256 char left[
kMaxLen]; left[0] =
'\0';
2269 for (i=0, current = &(
work[0]); i<=
nchname && !
final;i++ ) {
2271 *current++ =
cname[i];
2273 if (
cname[i] ==
'(') {
2276 if (current==
work+1) {
2291 if (
cname[i] ==
')') {
2308 current = &(
work[0]);
2314 current = &(
work[0]);
2316 Warning(
"FindLeafForExpression",
2317 "Casting to primary types like \"%s\" is not supported yet",
cast_name.Data());
2326 *params = 0; params++;
2359 Error(
"FindLeafForExpression",
2360 "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
2361 "\tbecause \"%s\" is used [recursively] in its own definition!",
2371 Error(
"FindLeafForExpression",
2372 "The substitution of the alias \"%s\" by \"%s\" failed.",left,
aliasValue);
2398 current = &(
work[0]);
2486 current = &(
work[0]);
2494 if (
leaf==
nullptr) {
2505 current = &(
work[0]);
2517 current = &(
work[0]);
2528 if (
leaf &&
leaf->IsOnTerminalBranch()) {
2534 current = &(
work[0]);
2543 if (
leaf->IsOnTerminalBranch()) {
2551 current = &(
work[0]);
2554 }
else if (
cname[i] ==
'.') {
2566 current = &(
work[0]);
2573 Error(
"FindLeafForExpression",
"Unexpected control flow!");
2633 current = &(
work[0]);
2672 if (!
leaf)
return -1;
2674 final =
leaf->IsOnTerminalBranch();
2681 if (
leaf==
nullptr && left[0]!=0) {
2692 Error(
"FindLeafForExpression",
2693 "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
2694 "\tbecause \"%s\" is used [recursively] in its own definition!",
2704 Error(
"FindLeafForExpression",
2705 "The substitution of the alias \"%s\" by \"%s\" failed.",left,
aliasValue);
2756 if (!
fTree)
return -1;
2760 Error(
"TTreeFormula",
"The length of the variable name (%d) exceeds the maximum allowed (%d)",
name.Length(),
kMaxLen);
2765 if (
name ==
"Entry$") {
2771 if (
name ==
"LocalEntry$") {
2777 if (
name ==
"Entries$") {
2785 if (
name ==
"LocalEntries$") {
2793 if (
name ==
"Iteration$") {
2799 if (
name ==
"Length$") {
2805 static const char *
lenfunc =
"Length$(";
2818 static const char *
minfunc =
"Min$(";
2831 static const char *
maxfunc =
"Max$(";
2844 static const char *
sumfunc =
"Sum$(";
2864 if (res<0)
return res;
2881 for(i=0,k=0; i<
cnamelen; ++i, ++k) {
2882 if (
cname[i] ==
'[') {
2908 if (res<0)
return res;
2910 if (!
leaf && res!=2) {
2919 Error(
"DefinedVariable",
2920 "The substitution of the alias \"%s\" by \"%s\" failed\n"\
2921 "\tbecause \"%s\" is recursively used in its own definition!",
2943 Error(
"DefinedVariable",
2944 "The substitution of the alias \"%s\" by \"%s\" failed.",
cname,
aliasValue);
2967 Error(
"Compile",
" Bad numerical expression : \"%s\"",
thisAlias.Data());
2969 Error(
"Compile",
" Part of the Variable \"%s\" exists but some of it is not accessible or useable",
thisAlias.Data());
2972 Error(
"DefinedVariable",
2973 "The substitution of the alias \"%s\" by \"%s\" failed.",
cname,
aliasValue);
2982 if (
leaf || res==2) {
2985 Error(
"DefinedVariable",
"the branch \"%s\" has to be enabled to be used",
leaf->GetBranch()->GetName());
2994 char *current = &(
dims[0] );
3001 if (current[0] ==
']') {
3013 char *end = (
char*)(
varindex.Data());
3035 current = (
char*)
strstr( current,
"[" );
3043 if (res<0)
return res;
3051 if (
gcut->GetObjectX()) {
3053 gcut->SetObjectX(
nullptr);
3055 if (
gcut->GetObjectY()) {
3057 gcut->SetObjectY(
nullptr);
3082 if (
x[
i2] < min) min =
x[
i2];
3083 if (
x[
i2] > max) max =
x[
i2];
3088 formula +=
gcut->GetVarX();
3090 formula +=
gcut->GetVarX();
3102 Error(
"DefinedVariable",
"Found a TCutG without leaf information (%s)",
3146 leafcur->GetBranch()->GetListOfBranches()->Last()==
nullptr) {
3148 cl =
lobj->GetClass();
3151 if (
lElem->IsOnTerminalBranch()) {
3174 Error(
"GetLeafWithDatamember",
"Branch could not be loaded:%d", res);
3259 Error(
"GetLeafWithDatamember",
"Branch could not be loaded:%d", res);
3277 else if (
curelem->GetClassPointer() &&
curelem->GetClassPointer()->GetCollectionProxy()) {
3282 sub_cl =
sub_cl->GetCollectionProxy()->GetValueClass();
3325 cl =
lobj->GetClass();
3331 }
else if (
type > 60) {
3337 cl =
element->GetClassPointer();
3359 Error(
"BranchHasMethod",
"Branch could not be loaded:%d", res);
3369 if (
bc ==
bc->GetMother()) {
3386 Error(
"BranchHasMethod",
"Branch could not be loaded:%d",
cres);
3398 Error(
"BranchHasMethod",
"A TClonesArray was stored in a branch type no yet support (i.e. neither TBranchObject nor TBranchElement): %s",
branch->IsA()->GetName());
3471 Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
3504 Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
3594 for (
Int_t dim = 1; dim < max_dim; dim++) {
3614 Error(
"EvalInstance",
"Index %s is out of bound (%d/%d) in formula %s",
3647 Error(
"EvalInstance",
"Index %s is of out bound (%d/%d) in formula %s",
3694 if (
info==
nullptr || !
info->IsCompiled()) {
3699 if (
elem==
nullptr) {
3703 return elem->GetClass();
3714 if (!obj)
return nullptr;
3718 default:
return nullptr;
3755 leaf->GetBranch()->GetTree()->GetReadEntry(),
3758 Error(
"EvalObject",
"Branch could not be loaded:%d", res);
3769 Warning(
"EvalObject",
"Not yet implement for kDirect and arrays (for %s).\nPlease contact the developers",
GetName());
3771 return leaf->GetValuePointer();
3776 default:
return nullptr;
3801 Error(
"EvalStringInstance",
"Branch could not be loaded:%d", res);
3809 return (
char*)
leaf->GetValuePointer();
3820#define TT_EVAL_INIT \
3821 TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(0); \
3823 const Int_t real_instance = GetRealInstance(instance,0); \
3825 if (instance==0) fNeedLoading = true; \
3826 if (real_instance>=fNdata[0]) return TMath::SignalingNaN(); \
3832 if (fNeedLoading) { \
3833 fNeedLoading = false; \
3834 TBranch *br = leaf->GetBranch(); \
3835 if (br && br->GetTree()) { \
3836 Long64_t tEntry = br->GetTree()->GetReadEntry(); \
3837 auto lres = R__LoadBranch(br, tEntry, fQuickLoad); \
3839 Error("TTreeFormula::TT_EVAL_INIT", \
3840 "Could not read entry (%lld) of leaf (%s), r=(%d).", tEntry, leaf->GetName(), lres);\
3842 Error("TTreeFormula::TT_EVAL_INIT", \
3843 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3851 if (fLookupType[0]==kDirect) { \
3852 label = (char*)leaf->GetValuePointer(); \
3854 label = (char*)GetLeafInfo(0)->GetValuePointer(leaf,instance); \
3856 Int_t bin = fAxis->FindBin(label); \
3860#define TREE_EVAL_INIT \
3861 const Int_t real_instance = GetRealInstance(instance,0); \
3863 if (real_instance>=fNdata[0]) return TMath::SignalingNaN(); \
3869 label = (char*)GetLeafInfo(0)->GetValuePointer((TLeaf*)0x0,instance); \
3870 Int_t bin = fAxis->FindBin(label); \
3874#define TT_EVAL_INIT_LOOP \
3875 TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(code); \
3878 const Int_t real_instance = GetRealInstance(instance,code); \
3881 TBranch *branch = (TBranch*)fBranches.UncheckedAt(code); \
3883 if (branch->GetTree()) { \
3884 Long64_t tEntry = branch->GetTree()->GetReadEntry(); \
3885 auto lres = R__LoadBranch(branch, tEntry, fQuickLoad); \
3887 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3888 "Could not read entry (%lld) of leaf (%s), r=(%d).", tEntry, leaf->GetName(), lres);\
3891 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3892 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3894 } else if (fDidBooleanOptimization) { \
3895 branch = leaf->GetBranch(); \
3896 if (branch && branch->GetTree()) { \
3897 Long64_t tEntry = branch->GetTree()->GetReadEntry(); \
3898 if (branch->GetReadEntry() != tEntry) branch->GetEntry(tEntry); \
3900 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3901 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3908 if (fDidBooleanOptimization) { \
3909 TBranch *br = leaf->GetBranch(); \
3910 if (br->GetTree()) { \
3911 Long64_t tEntry = br->GetTree()->GetReadEntry(); \
3912 if (br->GetReadEntry() != tEntry) br->GetEntry(tEntry); \
3914 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3915 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3919 if (real_instance>=fNdata[code]) return TMath::SignalingNaN();
3921#define TREE_EVAL_INIT_LOOP \
3923 const Int_t real_instance = GetRealInstance(instance,code); \
3925 if (real_instance>=fNdata[code]) return TMath::SignalingNaN();
3931 for (
int i=0; i<
len; ++i) res +=
sum->EvalInstance<T>(i);
3939 res =
arr->EvalInstance<T>(0);
3940 for (
int i=1; i<
len; ++i) {
3941 T val =
arr->EvalInstance<T>(i);
3954 res =
arr->EvalInstance<T>(0);
3955 for (
int i=1; i<
len; ++i) {
3956 T val =
arr->EvalInstance(i);
3972 condval = condition->EvalInstance<T>(i);
3980 arr->EvalInstance<T>(0);
3983 res =
arr->EvalInstance<T>(i-1);
3984 for (; i<
len; ++i) {
3985 condval = condition->EvalInstance<T>(i);
3987 T val =
arr->EvalInstance<T>(i);
4004 condval = condition->EvalInstance<T>(i);
4012 arr->EvalInstance<T>(0);
4015 res =
arr->EvalInstance<T>(i-1);
4016 for (; i<
len; ++i) {
4017 condval = condition->EvalInstance<T>(i);
4019 T val =
arr->EvalInstance<T>(i);
4222 case kAdd : pos--;
tab[pos-1] +=
tab[pos];
continue;
4226 else tab[pos-1] /=
tab[pos];
4262 case ksq :
tab[pos-1] =
tab[pos-1]*
tab[pos-1];
continue;
4269 case kmin : pos--;
tab[pos-1] = std::min(
tab[pos-1],
tab[pos]);
continue;
4270 case kmax : pos--;
tab[pos-1] = std::max(
tab[pos-1],
tab[pos]);
continue;
4273 else {
tab[pos-1] = 0;}
4276 if (
dexp < -700) {
tab[pos-1] = 0;
continue;}
4281 else {
tab[pos-1] = 0;}
4287 case ksign :
if (
tab[pos-1] < 0)
tab[pos-1] = -1;
else tab[pos-1] = 1;
4293 case kAnd : pos--;
if (
tab[pos-1]!=0 &&
tab[pos]!=0)
tab[pos-1]=1;
4296 case kOr : pos--;
if (
tab[pos-1]!=0 ||
tab[pos]!=0)
tab[pos-1]=1;
4300 case kEqual : pos--;
tab[pos-1] = (
tab[pos-1] ==
tab[pos]) ? 1 : 0;
continue;
4302 case kLess : pos--;
tab[pos-1] = (
tab[pos-1] <
tab[pos]) ? 1 : 0;
continue;
4306 case kNot :
tab[pos-1] = (
tab[pos-1] != 0) ? 0 : 1;
continue;
4350 int op = param % 10;
4352 if (
op == 1 && (!
tab[pos-1]) ) {
4361 }
else if (
op == 2 &&
tab[pos-1] ) {
4383 int fno = param / 1000;
4384 int nargs = param % 1000;
4417 switch (lookupType) {
4439 default:
tab[pos++] = 0;
continue;
4481 tab[pos] = param; pos++;
4501 tab[pos] = param; pos++;
4510 tab[pos] = param; pos++;
4526 tab[pos] = param; pos++;
4570 Error(
"EvalInstance",
"Branch could not be loaded:%d", res);
4582 Error(
"EvalInstance",
"Branch could not be loaded:%d", res);
4608template double TTreeFormula::EvalInstance<double> (
int,
char const**);
4609template long double TTreeFormula::EvalInstance<long double> (
int,
char const**);
4610template long long TTreeFormula::EvalInstance<long long> (
int,
char const**);
4676 Warning(
"GetValueFromMethod",
"No streamer info for branch %s.",
branch->GetName());
4680 char* address =
branch->GetObject();
4684 char* address =
branch->GetObject();
4736 Warning(
"GetValuePointerFromMethod",
"No streamer info for branch %s.",
branch->GetName());
4740 char* address =
branch->GetObject();
4744 char* address =
branch->GetObject();
4795 return subform->IsInteger(
false);
4802 if (
fNoper > 1)
return false;
4807 return subform->IsInteger(
false);
4861 if (
fAxis)
return true;
4868 return info->IsInteger();
4872 if (!
strcmp(
leaf->GetTypeName(),
"Int_t"))
return true;
4873 if (!
strcmp(
leaf->GetTypeName(),
"Short_t"))
return true;
4874 if (!
strcmp(
leaf->GetTypeName(),
"UInt_t"))
return true;
4875 if (!
strcmp(
leaf->GetTypeName(),
"UShort_t"))
return true;
4876 if (!
strcmp(
leaf->GetTypeName(),
"Bool_t"))
return true;
4877 if (!
strcmp(
leaf->GetTypeName(),
"Char_t"))
return true;
4878 if (!
strcmp(
leaf->GetTypeName(),
"UChar_t"))
return true;
4879 if (!
strcmp(
leaf->GetTypeName(),
"Long64_t"))
return true;
4880 if (!
strcmp(
leaf->GetTypeName(),
"ULong64_t"))
return true;
4881 if (!
strcmp(
leaf->GetTypeName(),
"string"))
return true;
4916 return info->IsString();
4923 if (
leaf->GetLenStatic() > 1)
return true;
4927 if (
leaf->GetLeafCount()) {
4941 if (
bid < 0)
return false;
4942 if (
br->GetInfo()==
nullptr || !
br->GetInfo()->IsCompiled()) {
4975 return info->IsString();
5011 }
else if (
mode == -1) {
5013 }
else if (
mode == 0) {
5016 const char * val =
nullptr;
5029 Error(
"PrintValue",
"Branch could not be loaded:%d", res);
5032 val = (
const char*)
leaf->GetValuePointer();
5055 char *
expo =
nullptr;
5121 char *start =
expo - off;
5154 for(
UInt_t dim=0; dim<max_dim ;++dim) {
5164 for(
Int_t k=0; k <=
n; ++k) {
5187 if (!axis) {
fAxis =
nullptr;
return;}
5212 if (
R__b.IsReading()) {
5306 if (
fx)
fx->UpdateFormulaLeaves();
5307 if (
fy)
fy->UpdateFormulaLeaves();
5323 subform->UpdateFormulaLeaves();
5337 subform->UpdateFormulaLeaves();
5407 switch(
subform->GetMultiplicity()) {
5437 if (!
gcut)
continue;
5442 switch(
fx->GetMultiplicity()) {
5450 switch(
fy->GetMultiplicity()) {
5467 if (!
leaf)
continue;
5476 if (
leaf->GetLeafCount()) {
5538 for (i=0; i<
fNoper ; ++i) {
5540 if (
leaf==
nullptr)
continue;
5546 Error(
"LoadBranches",
"Branch could not be loaded:%d", res);
5554 for (
Int_t dim = 0; dim < max_dim; ++dim) {
5568 if (
fCodes[i] < 0)
continue;
5597 if (
tleaf->GetReadEntry() < 0) {
5606 if (
leaf->GetLeafCount()) {
5618 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5635 if (
branch->GetAddress() ==
nullptr) {
5648 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5680 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5733 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5761 for(
int z=0; z<
size; ++z) {
5782 }
else if (
leafinfo->GetMultiplicity()==-1) {
5788 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5865 for (
int k=0; k<
fNoper; k++) {
5907 if (!
leaf)
return false;
5912 if (
br->GetType()==31) {
5925 }
else if (
br->GetType()==41) {
5930 if ( count->
GetID() >= 0 ) {
5953 }
else if (
br->GetID()<0) {
static Roo_reg_AGKInteg1D instance
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
long Longptr_t
Integer large enough to hold a pointer (platform-dependent)
short Version_t
Class version identifier (short)
char Char_t
Character 1 byte (char)
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
long double LongDouble_t
Long Double (not portable)
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
const Int_t kDoNotProcess
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char cname
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TRandom * gRandom
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
const_iterator begin() const
const_iterator end() const
void Set(Int_t n) override
Set size of this array to n ints.
const Int_t * GetArray() const
void AddAt(Int_t c, Int_t i)
Add Int_t c at position i. Check for out of bounds.
Class to manage histogram axis.
virtual Int_t FindBin(Double_t x)
Find bin number corresponding to abscissa x.
A Branch for the case of an object.
const char * GetClassName() const override
Return the name of the user class whose content is stored in this branch, if any.
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
A Branch for the case of an object.
A TTree is a list of TBranches.
Buffer base class used for serializing objects.
TClassRef is used to implement a permanent reference to a TClass object.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t HasDataMemberInfo() const
ClassInfo_t * GetClassInfo() const
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0, Bool_t isTransient=kFALSE) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
TVirtualRefProxy * GetReferenceProxy() const
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
An array of clone (identical) objects.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
A small helper class to help in keeping track of the array dimensions encountered in the analysis of ...
TDimensionInfo(Int_t code, Int_t oper, Int_t size, TFormLeafInfoMultiVarDim *multiDim)
~TDimensionInfo() override
TFormLeafInfoMultiVarDim * fMultiDim
Describe directory structure in memory.
A List of entry numbers in a TTree or TChain.
virtual Int_t Contains(Long64_t entry, TTree *tree=nullptr)
A TLeaf for the general case when using the branches created via a TStreamerInfo (i....
A TLeaf for a general object derived from TObject.
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
Method or function calling interface.
static const EReturnType kLong
static const EReturnType kString
static const EReturnType kOther
static const EReturnType kDouble
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Int_t GetEntriesFast() const
void AddAt(TObject *obj, Int_t idx) override
Add object at position ids.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
void Streamer(TBuffer &) override
Stream all objects in the array to or from the I/O buffer.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
Int_t GetLast() const override
Return index of last object in array.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Execute(const char *method, const char *params, Int_t *error=nullptr)
Execute method on this object with the given parameter string, e.g.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Double_t Rndm() override
Machine independent random number generator.
const char * GetCountName() const
Describe one element (data member) to be Streamed.
Describes a persistent version of a class.
TStreamerElement * GetElement(Int_t id) const override
static constexpr Ssiz_t kNPOS
const char * Data() const
A TTree represents a columnar dataset.
virtual TBranch * FindBranch(const char *name)
Return the branch that correspond to the path 'branchname', which can include the name of the tree or...
virtual TIterator * GetIteratorOnAllLeaves(bool dir=kIterForward)
Creates a new iterator that will go through all the leaves on the tree itself and its friend.
virtual Long64_t GetEntries() const
virtual TLeaf * GetLeaf(const char *branchname, const char *leafname)
Return pointer to the 1st Leaf named name in any Branch of this Tree or any branch in the list of fri...
virtual Long64_t GetReadEntry() const
virtual TObjArray * GetListOfBranches()
virtual TTree * GetTree() const
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual Int_t GetTreeNumber() const
virtual TLeaf * FindLeaf(const char *name)
Find first leaf containing searchname.
virtual const char * GetFriendAlias(TTree *) const
If the 'tree' is a friend, this method returns its alias name.
virtual EDataType GetType() const =0
If the value type is a fundamental data type, return its type (see enumeration EDataType).
virtual TClass * GetValueClass() const =0
If the value type is a user-defined class, return a pointer to the TClass representing the value type...
virtual Bool_t HasCounter() const =0
virtual TObjArray * GetElements() const =0
RVec< PromoteTypes< T0, T1 > > fmod(const T0 &x, const RVec< T1 > &v)
Namespace for new ROOT classes and functions.
Double_t CosH(Double_t)
Returns the hyperbolic cosine of x.
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Double_t ASin(Double_t)
Returns the principal value of the arc sine of x, expressed in radians.
Double_t Exp(Double_t x)
Returns the base-e exponential function of x, which is e raised to the power x.
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Double_t ASinH(Double_t)
Returns the area hyperbolic sine of x.
Double_t TanH(Double_t)
Returns the hyperbolic tangent of x.
Double_t ACosH(Double_t)
Returns the nonnegative area hyperbolic cosine of x.
Double_t ATan2(Double_t y, Double_t x)
Returns the principal value of the arc tangent of y/x, expressed in radians.
Double_t Log(Double_t x)
Returns the natural logarithm of x.
Double_t Sqrt(Double_t x)
Returns the square root of x.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.
Double_t SignalingNaN()
Returns a signaling NaN as defined by IEEE 754](http://en.wikipedia.org/wiki/NaN#Signaling_NaN).
Double_t Tan(Double_t)
Returns the tangent of an angle of x radians.
Double_t ATanH(Double_t)
Returns the area hyperbolic tangent of x.
Double_t Log10(Double_t x)
Returns the common (base-10) logarithm of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.
Double_t SinH(Double_t)
Returns the hyperbolic sine of `x.
static uint64_t sum(uint64_t i)