105 auto res =
br->GetEntry(
entry);
119 std::istringstream
iss(str);
121 return iss >> std::noskipws >> number &&
iss.eof();
144 fDidBooleanOptimization(
false), fDimensionSetup(nullptr)
176 fDidBooleanOptimization(
false), fDimensionSetup(nullptr)
185 const std::vector<std::string>&
aliases)
187 fDidBooleanOptimization(
false), fDimensionSetup(nullptr), fAliasesUsed(
aliases)
232 Warning(
"TTreeFormula",
"Too many items in expression:%s",expression);
242 if (!
leafc)
continue;
290 Error(
"TTreeFormula",
291 "Index %d for dimension #%d in %s is too high (max is %d)",
422 const char * current;
431 if (current[0] !=
'[') current--;
447 current = (
char*)
strstr( current,
"[" );
461 return (
size==-1) ? 1 : 0;
485 if (
elem->GetArrayDim()>0) {
487 ndim =
elem->GetArrayDim();
533 }
else if (
c &&
c->GetReferenceProxy() &&
c->GetReferenceProxy()->HasCounter() ) {
536 }
else if (
elem->GetArrayDim()>0) {
538 ndim =
elem->GetArrayDim();
564 }
while (current<ndim);
612 const char *bname =
leaf->GetBranch()->GetName();
646 if (
branch->GetBranchCount2()) {
648 if (!
branch->GetBranchCount()) {
650 "Noticed an incorrect in-memory TBranchElement object (%s).\nIt has a BranchCount2 but no BranchCount!\nThe result might be incorrect!",
658 "Already in kDataMember mode when handling multiple variable dimensions");
679 static const char *
altfunc =
"Alt$(";
680 static const char *
minfunc =
"MinIf$(";
681 static const char *
maxfunc =
"MaxIf$(";
686 && expression[
strlen(expression)-1]==
')' ) {
691 && expression[
strlen(expression)-1]==
')' ) {
696 && expression[
strlen(expression)-1]==
')' ) {
708 for(
unsigned int i=start;i<
strlen(expression);++i) {
709 switch (expression[i]) {
710 case '(':
paran++;
break;
711 case ')':
paran--;
break;
713 case '[':
brack++;
break;
714 case ']':
brack--;
break;
717 part1 = full( start, i-start );
718 part2 = full( i+1, full.Length() -1 - (i+1) );
729 if (
alternate->GetManager()->GetMultiplicity() != 0 ) {
730 Error(
"DefineAlternate",
"The 2nd arguments in %s can not be an array (%s,%d)!",
732 alternate->GetManager()->GetMultiplicity());
739 Error(
"DefineAlternate",
740 "The 2nd arguments in %s has to return the same type as the 1st argument (string)!",
746 Error(
"DefineAlternate",
747 "The 2nd arguments in %s has to return the same type as the 1st argument (numerical type)!",
756 Error(
"DefineAlternate",
757 "The arguments of %s can not be strings!",
791 char scratch[
kMaxLen]; scratch[0] =
'\0';
811 if (
br->GetInfo() == nullptr ) {
812 Error(
"ParseWithLeaf",
"Missing StreamerInfo for %s. We will be unable to read!",
823 if (
mom->GetInfo()==
nullptr) {
824 Error(
"ParseWithLeaf",
"Missing StreamerInfo for %s."
825 " We will be unable to read!",
829 if ((
mom->GetType()) < -1 && !
mom->GetAddress()) {
830 Error(
"ParseWithLeaf",
"Address not set when the type of the branch is negative for for %s. We will be unable to read!",
mom->GetName());
843 const char*
alias =
nullptr;
861 Error(
"TTreeFormula",
862 "Length of leafname (%d) exceeds maximum allowed by the buffer (%d), formula will be truncated.",
874 if (
leaf->GetBranch()!=
leaf->GetBranch()->GetMother()) {
952 cl =
element->GetClassPointer();
957 cl =
info->GetClass();
964 if (cl &&
branchEl->GetBranchCount()) {
970 "Missing TStreamerElement in object in TClonesArray section");
1003 }
else if (
branchEl->GetType()==41) {
1008 Warning(
"ParseWithLeaf",
"Missing TStreamerElement in object in Collection section");
1014 if ( count->
GetID() >= 0 ) {
1055 }
else if (
branchEl->GetType()==3) {
1128 &&
elemCl->GetCollectionProxy()->GetValueClass()
1129 &&
elemCl->GetCollectionProxy()->GetValueClass()->GetCollectionProxy()) {
1142 elemCl->GetCollectionProxy()->GetValueClass(),
1148 cl =
elemCl->GetCollectionProxy()->GetValueClass();
1162 &&
elemCl->GetCollectionProxy()->GetValueClass()==
nullptr
1163 &&
elemCl->GetCollectionProxy()->GetType()>0) {
1190 }
else if (!
element->IsaPointer()) {
1210 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1220 Error(
"ParseWithLeaf",
"Failed to access class type of reference target (%s)",
element->GetName());
1228 Error(
"ParseWithLeaf",
"Found a numerical leaf but the name has trailing characters: \"%s\"",
subExpression);
1291 if ( !
casted->InheritsFrom(cl) ) {
1292 Error(
"ParseWithLeaf",
"%s does not inherit from %s. Casting not possible!",
1318 for (i=0, current = &(
work[0]); i<=
nchname;i++ ) {
1320 if (right[i] ==
'(') {
1323 *current++ = right[i++];
1324 }
while(right[i]!=
')' && right[i]);
1325 *current++ = right[i];
1329 *params = 0; params++;
1330 }
else params = (
char *)
")";
1332 Error(
"ParseWithLeaf",
"Can not call '%s' with a class",
work);
1336 Error(
"ParseWithLeaf",
"Class probably unavailable:%s",cl->
GetName());
1347 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d",
lres);
1354 || !
leaf->IsOnTerminalBranch());
1385 || !
leaf->IsOnTerminalBranch());
1408 Warning(
"ParseWithLeaf",
"Can not call method on content of %s in %s\n",
1415 Error(
"ParseWithLeaf",
1416 "Could not discover the TClass corresponding to (%s)!",
1427 || !
leaf->IsOnTerminalBranch());
1436 Error(
"ParseWithLeaf",
1437 "Can not call method %s on class without dictionary (%s)!",
1444 if (!
method->GetMethod()) {
1445 Error(
"ParseWithLeaf",
"Unknown method:%s in %s",right,cl->
GetName());
1448 switch(
method->ReturnType()) {
1470 Error(
"DefineVariable",
"Method %s from %s has an impossible return type %d",
1485 current = &(
work[0]);
1493 Warning(
"ParseWithLeaf",
"TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection %s.",
1518 }
else if (right[i] ==
')') {
1536 current = &(
work[0]);
1543 }
else if (i > 0 && (right[i] ==
'.' || right[i] ==
'[' || right[i] ==
'\0') ) {
1573 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1591 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d",
eres);
1611 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1637 if (
clbranch->GetListOfBranches()->GetLast()>=0) {
1639 Error(
"ParseWithLeaf",
"Unimplemented usage of ClonesArray");
1650 "TClonesArray object was not retrievable for %s!",
1676 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1709 Error(
"ParseWithLeaf",
"Could you not find the inner class for %s with coll type = %d",
1713 Warning(
"ParseWithLeaf",
"No data member in content of %s in %s\n",
1721 if (
leaf)
leaf->GetBranch()->Print();
1722 Warning(
"ParseWithLeaf",
"Missing class for %s!",
name.Data());
1741 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1770 }
else if (
curelem->GetClassPointer() &&
curelem->GetClassPointer()->GetCollectionProxy()) {
1776 curelem->GetClassPointer()->GetCollectionProxy()->GetValueClass();
1782 Warning(
"ParseWithLeaf",
"TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection %s.",
1832 bool object =
false;
1833 bool pointer =
false;
1865 Error(
"ParseWithLeaf",
1866 "%s is a datamember of %s BUT is not yet of a supported type (%d)",
1871 Error(
"ParseWithLeaf",
1872 "%s is a datamember of %s BUT is not of a unknown type (%d)",
1879 ||
element->GetClassPointer()->GetCollectionProxy() ) )
1897 &&
element->GetClassPointer()->GetCollectionProxy()) {
1901 Warning(
"ParseWithLeaf",
"TTreeFormula support only 2 level of variables size collections. Assuming '@' notation for the collection %s.",
1921 if (
element->GetClassPointer()->GetCollectionProxy()->GetValueClass()==
nullptr) {
1923 element->GetClassPointer()->GetCollectionProxy());
1934 if (
valueCl!=
nullptr &&
valueCl->GetCollectionProxy()!=
nullptr) {
1951 if (
elemCl->GetCollectionProxy() &&
1952 elemCl->GetCollectionProxy()->GetValueClass()==
nullptr) {
1962 Error(
"ParseWithLeaf",
"Branch could not be loaded:%d", res);
1978 }
else if (pointer) {
1990 if (cl)
Error(
"ParseWithLeaf",
"%s is not a datamember of %s",
work,cl->
GetName());
2007 if ( right[i] !=
'\0' ) {
2014 if (
inf->IsReference() ) {
2023 cl =
refInfo->GetValueClass(ptr);
2025 Error(
"ParseWithLeaf",
"Failed to access class type of reference target (%s)",
element->GetName());
2031 Error(
"ParseWithLeaf",
"Failed to access class type of reference target (%s)",
element->GetName());
2036 cl =
element->GetClassPointer();
2040 current = &(
work[0]);
2053 *current++ = right[i];
2074 if (!last)
return action;
2102 if (!last)
return action;
2250 const char *
cname = expression;
2251 char first[
kMaxLen]; first[0] =
'\0';
2252 char second[
kMaxLen*2]; second[0] =
'\0';
2253 char right[
kMaxLen*2]; right[0] =
'\0';
2255 char left[
kMaxLen]; left[0] =
'\0';
2268 for (i=0, current = &(
work[0]); i<=
nchname && !
final;i++ ) {
2270 *current++ =
cname[i];
2272 if (
cname[i] ==
'(') {
2275 if (current==
work+1) {
2290 if (
cname[i] ==
')') {
2307 current = &(
work[0]);
2313 current = &(
work[0]);
2315 Warning(
"FindLeafForExpression",
2316 "Casting to primary types like \"%s\" is not supported yet",
cast_name.Data());
2325 *params = 0; params++;
2358 Error(
"FindLeafForExpression",
2359 "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
2360 "\tbecause \"%s\" is used [recursively] in its own definition!",
2370 Error(
"FindLeafForExpression",
2371 "The substitution of the alias \"%s\" by \"%s\" failed.",left,
aliasValue);
2397 current = &(
work[0]);
2485 current = &(
work[0]);
2493 if (
leaf==
nullptr) {
2504 current = &(
work[0]);
2516 current = &(
work[0]);
2527 if (
leaf &&
leaf->IsOnTerminalBranch()) {
2533 current = &(
work[0]);
2542 if (
leaf->IsOnTerminalBranch()) {
2550 current = &(
work[0]);
2553 }
else if (
cname[i] ==
'.') {
2565 current = &(
work[0]);
2572 Error(
"FindLeafForExpression",
"Unexpected control flow!");
2632 current = &(
work[0]);
2671 if (!
leaf)
return -1;
2673 final =
leaf->IsOnTerminalBranch();
2680 if (
leaf==
nullptr && left[0]!=0) {
2691 Error(
"FindLeafForExpression",
2692 "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
2693 "\tbecause \"%s\" is used [recursively] in its own definition!",
2703 Error(
"FindLeafForExpression",
2704 "The substitution of the alias \"%s\" by \"%s\" failed.",left,
aliasValue);
2755 if (!
fTree)
return -1;
2759 Error(
"TTreeFormula",
"The length of the variable name (%d) exceeds the maximum allowed (%d)",
name.Length(),
kMaxLen);
2764 if (
name ==
"Entry$") {
2770 if (
name ==
"LocalEntry$") {
2776 if (
name ==
"Entries$") {
2784 if (
name ==
"LocalEntries$") {
2792 if (
name ==
"Iteration$") {
2798 if (
name ==
"Length$") {
2804 static const char *
lenfunc =
"Length$(";
2817 static const char *
minfunc =
"Min$(";
2830 static const char *
maxfunc =
"Max$(";
2843 static const char *
sumfunc =
"Sum$(";
2863 if (res<0)
return res;
2871 char dims[
kMaxLen]; dims[0] =
'\0';
2880 for(i=0,k=0; i<
cnamelen; ++i, ++k) {
2881 if (
cname[i] ==
'[') {
2907 if (res<0)
return res;
2909 if (!
leaf && res!=2) {
2918 Error(
"DefinedVariable",
2919 "The substitution of the alias \"%s\" by \"%s\" failed\n"\
2920 "\tbecause \"%s\" is recursively used in its own definition!",
2942 Error(
"DefinedVariable",
2943 "The substitution of the alias \"%s\" by \"%s\" failed.",
cname,
aliasValue);
2966 Error(
"Compile",
" Bad numerical expression : \"%s\"",
thisAlias.Data());
2968 Error(
"Compile",
" Part of the Variable \"%s\" exists but some of it is not accessible or useable",
thisAlias.Data());
2971 Error(
"DefinedVariable",
2972 "The substitution of the alias \"%s\" by \"%s\" failed.",
cname,
aliasValue);
2981 if (
leaf || res==2) {
2984 Error(
"DefinedVariable",
"the branch \"%s\" has to be enabled to be used",
leaf->GetBranch()->GetName());
2993 char *current = &( dims[0] );
3000 if (current[0] ==
']') {
3012 char *end = (
char*)(
varindex.Data());
3034 current = (
char*)
strstr( current,
"[" );
3042 if (res<0)
return res;
3050 if (
gcut->GetObjectX()) {
3052 gcut->SetObjectX(
nullptr);
3054 if (
gcut->GetObjectY()) {
3056 gcut->SetObjectY(
nullptr);
3081 if (
x[
i2] < min) min =
x[
i2];
3082 if (
x[
i2] > max) max =
x[
i2];
3101 Error(
"DefinedVariable",
"Found a TCutG without leaf information (%s)",
3145 leafcur->GetBranch()->GetListOfBranches()->Last()==
nullptr) {
3147 cl =
lobj->GetClass();
3150 if (
lElem->IsOnTerminalBranch()) {
3173 Error(
"GetLeafWithDatamember",
"Branch could not be loaded:%d", res);
3258 Error(
"GetLeafWithDatamember",
"Branch could not be loaded:%d", res);
3276 else if (
curelem->GetClassPointer() &&
curelem->GetClassPointer()->GetCollectionProxy()) {
3281 sub_cl =
sub_cl->GetCollectionProxy()->GetValueClass();
3324 cl =
lobj->GetClass();
3330 }
else if (
type > 60) {
3336 cl =
element->GetClassPointer();
3358 Error(
"BranchHasMethod",
"Branch could not be loaded:%d", res);
3368 if (
bc ==
bc->GetMother()) {
3385 Error(
"BranchHasMethod",
"Branch could not be loaded:%d",
cres);
3397 Error(
"BranchHasMethod",
"A TClonesArray was stored in a branch type no yet support (i.e. neither TBranchObject nor TBranchElement): %s",
branch->IsA()->GetName());
3470 Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
3503 Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
3593 for (
Int_t dim = 1; dim < max_dim; dim++) {
3613 Error(
"EvalInstance",
"Index %s is out of bound (%d/%d) in formula %s",
3646 Error(
"EvalInstance",
"Index %s is of out bound (%d/%d) in formula %s",
3693 if (
info==
nullptr || !
info->IsCompiled()) {
3698 if (
elem==
nullptr) {
3702 return elem->GetClass();
3713 if (!obj)
return nullptr;
3717 default:
return nullptr;
3754 leaf->GetBranch()->GetTree()->GetReadEntry(),
3757 Error(
"EvalObject",
"Branch could not be loaded:%d", res);
3768 Warning(
"EvalObject",
"Not yet implement for kDirect and arrays (for %s).\nPlease contact the developers",
GetName());
3770 return leaf->GetValuePointer();
3775 default:
return nullptr;
3800 Error(
"EvalStringInstance",
"Branch could not be loaded:%d", res);
3808 return (
char*)
leaf->GetValuePointer();
3819#define TT_EVAL_INIT \
3820 TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(0); \
3822 const Int_t real_instance = GetRealInstance(instance,0); \
3824 if (instance==0) fNeedLoading = true; \
3825 if (real_instance>=fNdata[0]) return TMath::SignalingNaN(); \
3831 if (fNeedLoading) { \
3832 fNeedLoading = false; \
3833 TBranch *br = leaf->GetBranch(); \
3834 if (br && br->GetTree()) { \
3835 Long64_t tEntry = br->GetTree()->GetReadEntry(); \
3836 auto lres = R__LoadBranch(br, tEntry, fQuickLoad); \
3838 Error("TTreeFormula::TT_EVAL_INIT", \
3839 "Could not read entry (%lld) of leaf (%s), r=(%d).", tEntry, leaf->GetName(), lres);\
3841 Error("TTreeFormula::TT_EVAL_INIT", \
3842 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3850 if (fLookupType[0]==kDirect) { \
3851 label = (char*)leaf->GetValuePointer(); \
3853 label = (char*)GetLeafInfo(0)->GetValuePointer(leaf,instance); \
3855 Int_t bin = fAxis->FindBin(label); \
3859#define TREE_EVAL_INIT \
3860 const Int_t real_instance = GetRealInstance(instance,0); \
3862 if (real_instance>=fNdata[0]) return TMath::SignalingNaN(); \
3868 label = (char*)GetLeafInfo(0)->GetValuePointer((TLeaf*)0x0,instance); \
3869 Int_t bin = fAxis->FindBin(label); \
3873#define TT_EVAL_INIT_LOOP \
3874 TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(code); \
3877 const Int_t real_instance = GetRealInstance(instance,code); \
3880 TBranch *branch = (TBranch*)fBranches.UncheckedAt(code); \
3882 if (branch->GetTree()) { \
3883 Long64_t tEntry = branch->GetTree()->GetReadEntry(); \
3884 auto lres = R__LoadBranch(branch, tEntry, fQuickLoad); \
3886 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3887 "Could not read entry (%lld) of leaf (%s), r=(%d).", tEntry, leaf->GetName(), lres);\
3890 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3891 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3893 } else if (fDidBooleanOptimization) { \
3894 branch = leaf->GetBranch(); \
3895 if (branch && branch->GetTree()) { \
3896 Long64_t tEntry = branch->GetTree()->GetReadEntry(); \
3897 if (branch->GetReadEntry() != tEntry) branch->GetEntry(tEntry); \
3899 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3900 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3907 if (fDidBooleanOptimization) { \
3908 TBranch *br = leaf->GetBranch(); \
3909 if (br->GetTree()) { \
3910 Long64_t tEntry = br->GetTree()->GetReadEntry(); \
3911 if (br->GetReadEntry() != tEntry) br->GetEntry(tEntry); \
3913 Error("TTreeFormula::TT_EVAL_INIT_LOOP", \
3914 "Could not init branch associated to this leaf (%s).", leaf->GetName()); \
3918 if (real_instance>=fNdata[code]) return TMath::SignalingNaN();
3920#define TREE_EVAL_INIT_LOOP \
3922 const Int_t real_instance = GetRealInstance(instance,code); \
3924 if (real_instance>=fNdata[code]) return TMath::SignalingNaN();
3930 for (
int i=0; i<
len; ++i) res +=
sum->EvalInstance<T>(i);
3938 res =
arr->EvalInstance<T>(0);
3939 for (
int i=1; i<
len; ++i) {
3940 T val =
arr->EvalInstance<T>(i);
3953 res =
arr->EvalInstance<T>(0);
3954 for (
int i=1; i<
len; ++i) {
3955 T val =
arr->EvalInstance(i);
3971 condval = condition->EvalInstance<T>(i);
3979 arr->EvalInstance<T>(0);
3982 res =
arr->EvalInstance<T>(i-1);
3983 for (; i<
len; ++i) {
3984 condval = condition->EvalInstance<T>(i);
3986 T val =
arr->EvalInstance<T>(i);
4003 condval = condition->EvalInstance<T>(i);
4011 arr->EvalInstance<T>(0);
4014 res =
arr->EvalInstance<T>(i-1);
4015 for (; i<
len; ++i) {
4016 condval = condition->EvalInstance<T>(i);
4018 T val =
arr->EvalInstance<T>(i);
4057 ::Error(
"TTreeFormula::PrintValue",
4058 "the integer value of \"%s\" may be inexact: its magnitude reaches 2^%d, "
4059 "the point beyond which the long double used to evaluate it can no longer "
4060 "represent every integer exactly, so the printed value may be rounded. "
4061 "This is a known limitation "
4062 "(https://github.com/root-project/root/issues/7844).",
4063 expression, std::numeric_limits<LongDouble_t>::digits);
4250 case kAdd : pos--;
tab[pos-1] +=
tab[pos];
continue;
4254 else tab[pos-1] /=
tab[pos];
4290 case ksq :
tab[pos-1] =
tab[pos-1]*
tab[pos-1];
continue;
4297 case kmin : pos--;
tab[pos-1] = std::min(
tab[pos-1],
tab[pos]);
continue;
4298 case kmax : pos--;
tab[pos-1] = std::max(
tab[pos-1],
tab[pos]);
continue;
4301 else {
tab[pos-1] = 0;}
4304 if (
dexp < -700) {
tab[pos-1] = 0;
continue;}
4309 else {
tab[pos-1] = 0;}
4315 case ksign :
if (
tab[pos-1] < 0)
tab[pos-1] = -1;
else tab[pos-1] = 1;
4321 case kAnd : pos--;
if (
tab[pos-1]!=0 &&
tab[pos]!=0)
tab[pos-1]=1;
4324 case kOr : pos--;
if (
tab[pos-1]!=0 ||
tab[pos]!=0)
tab[pos-1]=1;
4328 case kEqual : pos--;
tab[pos-1] = (
tab[pos-1] ==
tab[pos]) ? 1 : 0;
continue;
4330 case kLess : pos--;
tab[pos-1] = (
tab[pos-1] <
tab[pos]) ? 1 : 0;
continue;
4334 case kNot :
tab[pos-1] = (
tab[pos-1] != 0) ? 0 : 1;
continue;
4378 int op = param % 10;
4380 if (
op == 1 && (!
tab[pos-1]) ) {
4389 }
else if (
op == 2 &&
tab[pos-1] ) {
4411 int fno = param / 1000;
4412 int nargs = param % 1000;
4445 switch (lookupType) {
4467 default:
tab[pos++] = 0;
continue;
4509 tab[pos] = param; pos++;
4529 tab[pos] = param; pos++;
4538 tab[pos] = param; pos++;
4554 tab[pos] = param; pos++;
4598 Error(
"EvalInstance",
"Branch could not be loaded:%d", res);
4610 Error(
"EvalInstance",
"Branch could not be loaded:%d", res);
4636template double TTreeFormula::EvalInstance<double> (
int,
char const**);
4637template long double TTreeFormula::EvalInstance<long double> (
int,
char const**);
4638template long long TTreeFormula::EvalInstance<long long> (
int,
char const**);
4704 Warning(
"GetValueFromMethod",
"No streamer info for branch %s.",
branch->GetName());
4708 char* address =
branch->GetObject();
4712 char* address =
branch->GetObject();
4764 Warning(
"GetValuePointerFromMethod",
"No streamer info for branch %s.",
branch->GetName());
4768 char* address =
branch->GetObject();
4772 char* address =
branch->GetObject();
4823 return subform->IsInteger(
false);
4830 if (
fNoper > 1)
return false;
4835 return subform->IsInteger(
false);
4889 if (
fAxis)
return true;
4896 return info->IsInteger();
4900 if (!
strcmp(
leaf->GetTypeName(),
"Int_t"))
return true;
4901 if (!
strcmp(
leaf->GetTypeName(),
"Short_t"))
return true;
4902 if (!
strcmp(
leaf->GetTypeName(),
"UInt_t"))
return true;
4903 if (!
strcmp(
leaf->GetTypeName(),
"UShort_t"))
return true;
4904 if (!
strcmp(
leaf->GetTypeName(),
"Bool_t"))
return true;
4905 if (!
strcmp(
leaf->GetTypeName(),
"Char_t"))
return true;
4906 if (!
strcmp(
leaf->GetTypeName(),
"UChar_t"))
return true;
4907 if (!
strcmp(
leaf->GetTypeName(),
"Long64_t"))
return true;
4908 if (!
strcmp(
leaf->GetTypeName(),
"ULong64_t"))
return true;
4909 if (!
strcmp(
leaf->GetTypeName(),
"string"))
return true;
4944 return info->IsString();
4951 if (
leaf->GetLenStatic() > 1)
return true;
4955 if (
leaf->GetLeafCount()) {
4969 if (
bid < 0)
return false;
4970 if (
br->GetInfo()==
nullptr || !
br->GetInfo()->IsCompiled()) {
5003 return info->IsString();
5039 }
else if (
mode == -1) {
5041 }
else if (
mode == 0) {
5044 const char * val =
nullptr;
5057 Error(
"PrintValue",
"Branch could not be loaded:%d", res);
5060 val = (
const char*)
leaf->GetValuePointer();
5083 char *
expo =
nullptr;
5176 char *start =
expo - off;
5209 for(
UInt_t dim=0; dim<max_dim ;++dim) {
5219 for(
Int_t k=0; k <=
n; ++k) {
5242 if (!axis) {
fAxis =
nullptr;
return;}
5267 if (
R__b.IsReading()) {
5361 if (
fx)
fx->UpdateFormulaLeaves();
5362 if (
fy)
fy->UpdateFormulaLeaves();
5378 subform->UpdateFormulaLeaves();
5392 subform->UpdateFormulaLeaves();
5462 switch(
subform->GetMultiplicity()) {
5492 if (!
gcut)
continue;
5497 switch(
fx->GetMultiplicity()) {
5505 switch(
fy->GetMultiplicity()) {
5522 if (!
leaf)
continue;
5531 if (
leaf->GetLeafCount()) {
5594 for (i = 0; i <
fNoper; i++) {
5599 switch (
primary->GetManager()->GetMultiplicity()) {
5627 for (i=0; i<
fNoper ; ++i) {
5629 if (
leaf==
nullptr)
continue;
5635 Error(
"LoadBranches",
"Branch could not be loaded:%d", res);
5643 for (
Int_t dim = 0; dim < max_dim; ++dim) {
5657 if (
fCodes[i] < 0)
continue;
5686 if (
tleaf->GetReadEntry() < 0) {
5695 if (
leaf->GetLeafCount()) {
5707 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5724 if (
branch->GetAddress() ==
nullptr) {
5737 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5769 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5822 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5850 for(
int z=0; z<
size; ++z) {
5871 }
else if (
leafinfo->GetMultiplicity()==-1) {
5877 Error(
"LoadCurrentDim",
"Branch could not be loaded:%d", res);
5954 for (
int k=0; k<
fNoper; k++) {
5996 if (!
leaf)
return false;
6001 if (
br->GetType()==31) {
6014 }
else if (
br->GetType()==41) {
6019 if ( count->
GetID() >= 0 ) {
6042 }
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.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
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)
Searches in this tree and any of its friends for a leaf named leafname in branch branchname ,...
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)
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.
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)