109class TDimensionInfo : 
public TObject {
 
  116      : fCode(code), fOper(oper), fSize(size), fMultiDim(multiDim) {};
 
  117   ~TDimensionInfo() {};
 
  123   fDidBooleanOptimization(
kFALSE), fDimensionSetup(0)
 
  157    fDidBooleanOptimization(
kFALSE), fDimensionSetup(0)
 
  166                           const std::vector<std::string>& aliases)
 
  168    fDidBooleanOptimization(
kFALSE), fDimensionSetup(0), fAliasesUsed(aliases)
 
  208      if(savedir) savedir->
cd();
 
  213      Warning(
"TTreeFormula",
"Too many items in expression:%s",expression);
 
  223         if (!leafc) 
continue;
 
  266   for(k0 = 0; k0 < 
fNcodes; k0++) {
 
  271            Error(
"TTreeFormula",
 
  272                  "Index %d for dimension #%d in %s is too high (max is %d)",
 
  275            if(savedir) savedir->
cd();
 
  304         if (readentry >= 0) {
 
  309         if (readentry >= 0) {
 
  316   if(savedir) savedir->
cd();
 
  338   for (
int j=0; j<
fNcodes; j++) {
 
  366   bool scalarindex = 
false;
 
  372      switch (index_multiplicity) {
 
  403   const char * current;
 
  404   Int_t size, scanindex, vardim;
 
  412   if (current[0] != 
'[') current--;
 
  415      scanindex = sscanf(current,
"%d",&size);
 
  419      if (scanindex==0) size = -1;
 
  428      current = (
char*)strstr( current, 
"[" );
 
  438   TDimensionInfo * info = 
new TDimensionInfo(code,
fNoper,size,multidim);
 
  442   return (size==-1) ? 1 : 0;
 
  450                                       Bool_t useCollectionObject) {
 
  451   Int_t ndim, size, current, vardim;
 
  483      if (maininfo==0 || maininfo==leafinfo || 1) {
 
  489         delete currentinfo->
fNext;
 
  514   } 
else if ( 
c && 
c->GetReferenceProxy() && 
c->GetReferenceProxy()->HasCounter() ) {
 
  545   } 
while (current<ndim);
 
  582   Int_t numberOfVarDim = 0;
 
  587   const char *tname = leaf->
GetTitle();
 
  588   char *leaf_dim = (
char*)strstr( tname, 
"[" );
 
  591   char *branch_dim = (
char*)strstr(bname,
"[");
 
  592   if (branch_dim) branch_dim++; 
 
  604      if (!branch_dim || strncmp(branch_dim,leaf_dim,strlen(branch_dim))) {
 
  607      } 
else if (branch_dim && strncmp(branch_dim,leaf_dim,strlen(branch_dim))==0
 
  608                 && strlen(leaf_dim)>strlen(branch_dim)
 
  609                 && (leaf_dim+strlen(branch_dim))[0]==
'[') {
 
  628                    "Noticed an incorrect in-memory TBranchElement object (%s).\nIt has a BranchCount2 but no BranchCount!\nThe result might be incorrect!",
 
  630            return numberOfVarDim;
 
  636                    "Already in kDataMember mode when handling multiple variable dimensions");
 
  644   return numberOfVarDim;
 
  657   static const char *altfunc = 
"Alt$(";
 
  658   static const char *minfunc = 
"MinIf$(";
 
  659   static const char *maxfunc = 
"MaxIf$(";
 
  663   if (   strncmp(expression,altfunc,strlen(altfunc))==0
 
  664       && expression[strlen(expression)-1]==
')' ) {
 
  666      start = strlen(altfunc);
 
  668   if (   strncmp(expression,maxfunc,strlen(maxfunc))==0
 
  669       && expression[strlen(expression)-1]==
')' ) {
 
  671      start = strlen(maxfunc);
 
  673   if (   strncmp(expression,minfunc,strlen(minfunc))==0
 
  674       && expression[strlen(expression)-1]==
')' ) {
 
  676      start = strlen(minfunc);
 
  686      for(
unsigned int i=start;i<strlen(expression);++i) {
 
  687         switch (expression[i]) {
 
  688            case '(': paran++; 
break;
 
  689            case ')': paran--; 
break;
 
  690            case '"': instr = instr ? 0 : 1; 
break;
 
  691            case '[': brack++; 
break;
 
  692            case ']': brack--; 
break;
 
  694         if (expression[i]==
',' && paran==0 && instr==0 && brack==0) {
 
  695            part1 = full( start, i-start );
 
  696            part2 = full( i+1, full.
Length() -1 - (i+1) );
 
  708               Error(
"DefinedVariable",
"The 2nd arguments in %s can not be an array (%s,%d)!",
 
  717                  Error(
"DefinedVariable",
 
  718                        "The 2nd arguments in %s has to return the same type as the 1st argument (string)!",
 
  724               Error(
"DefinedVariable",
 
  725                     "The 2nd arguments in %s has to return the same type as the 1st argument (numerical type)!",
 
  734                  Error(
"DefinedVariable",
 
  735                        "The arguments of %s can not be strings!",
 
  766   Int_t numberOfVarDim = 0;
 
  769   char  scratch[
kMaxLen]; scratch[0] = 
'\0';
 
  770   char     work[
kMaxLen];    work[0] = 
'\0';
 
  772   const char *right = subExpression;
 
  777   if (readentry < 0) readentry=0;
 
  779   Bool_t useLeafReferenceObject = 
false;
 
  790            Error(
"DefinedVariable",
"Missing StreamerInfo for %s.  We will be unable to read!",
 
  802               Error(
"DefinedVariable",
"Missing StreamerInfo for %s." 
  803                     "  We will be unable to read!",
 
  808               Error(
"DefinedVariable", 
"Address not set when the type of the branch is negative for for %s.  We will be unable to read!", mom->
GetName());
 
  821   const char* alias = 0;
 
  824      if (!alias && realtree!=
fTree) {
 
  832   TTree *tleaf = realtree;
 
  839         if (mother_name[strlen(mother_name)-1]!=
'.') {
 
  840            br_extended_name = mother_name;
 
  841            br_extended_name.
Append(
'.');
 
  846      if (dim >= 0) br_extended_name.
Remove(dim);
 
  934                       "Missing TStreamerElement in object in TClonesArray section");
 
  945            maininfo = clonesinfo;
 
  964            maininfo->
fNext = previnfo;
 
  965            unwindCollection = 
kTRUE;
 
  967         } 
else if (branchEl->
GetType()==41) {
 
  972               Warning(
"DefinedVariable",
"Missing TStreamerElement in object in Collection section");
 
  978            if ( count->
GetID() >= 0 ) {
 
  997            maininfo = collectioninfo;
 
 1016            maininfo->
fNext = previnfo;
 
 1017            unwindCollection = 
kTRUE;
 
 1019      } 
else if ( branchEl->
GetType()==3) {
 
 1021         if (useLeafCollectionObject) {
 
 1026            numberOfVarDim += 
RegisterDimensions(code,clonesinfo,maininfo,useLeafCollectionObject);
 
 1029         maininfo = clonesinfo;
 
 1030         previnfo = maininfo;
 
 1032      } 
else if (!useLeafCollectionObject && branchEl->
GetType()==4) {
 
 1035         if (useLeafCollectionObject) {
 
 1040            numberOfVarDim += 
RegisterDimensions(code,collectioninfo,maininfo,useLeafCollectionObject);
 
 1043         maininfo = collectioninfo;
 
 1044         previnfo = maininfo;
 
 1048         if (useLeafCollectionObject) {
 
 1051            maininfo = collectioninfo;
 
 1052            previnfo = collectioninfo;
 
 1059            maininfo = collectioninfo;
 
 1060            previnfo = collectioninfo;
 
 1070               previnfo->
fNext = multi;
 
 1073               previnfo = multi->
fNext;
 
 1081               previnfo = previnfo->
fNext;
 
 1087      } 
else if (strlen(right)==0 && cl && element && 
final) {
 
 1090         if (!useLeafCollectionObject
 
 1101            maininfo = collectioninfo;
 
 1102            previnfo = collectioninfo;
 
 1111            previnfo->
fNext = multi;
 
 1114            previnfo = multi->
fNext;
 
 1121               previnfo = previnfo->
fNext;
 
 1124         } 
else if (!useLeafCollectionObject
 
 1140            collectioninfo->
fNext =
 
 1143            maininfo = collectioninfo;
 
 1144            previnfo = maininfo->
fNext;
 
 1146         }  
else if (!useLeafCollectionObject
 
 1157            previnfo = maininfo;
 
 1162         if ( useLeafCollectionObject || fullExpression[0] == 
'@' || fullExpression[strlen(scratch)] == 
'@' ) {
 
 1163            useLeafReferenceObject = 
true;
 
 1180               Error(
"DefinedVariable",
"Failed to access class type of reference target (%s)",element->
GetName());
 
 1191      if (unwindCollection) {
 
 1194         R__ASSERT(numberOfVarDim==1 && maininfo);
 
 1201            previnfo->
fNext = multi;
 
 1204            previnfo = multi->
fNext;
 
 1211               previnfo = previnfo->
fNext;
 
 1219            previnfo->
fNext = multi;
 
 1222            previnfo = multi->
fNext;
 
 1231      Int_t nchname = strlen(right);
 
 1246               Error(
"DefinedVariable",
"%s does not inherit from %s.  Casting not possible!",
 
 1253               maininfo = leafinfo;
 
 1256               previnfo = leafinfo;
 
 1258               previnfo->
fNext = leafinfo;
 
 1259               previnfo = leafinfo;
 
 1264            castqueue.
AddAt(0,paran_level);
 
 1268      Bool_t prevUseCollectionObject = useLeafCollectionObject;
 
 1269      Bool_t useCollectionObject = useLeafCollectionObject;
 
 1270      Bool_t useReferenceObject = useLeafReferenceObject;
 
 1271      Bool_t prevUseReferenceObject = useLeafReferenceObject;
 
 1272      for (i=0, current = &(work[0]); i<=nchname;i++ ) {
 
 1274         if (right[i] == 
'(') {
 
 1277               *current++ = right[i++];
 
 1278            } 
while(right[i]!=
')' && right[i]);
 
 1279            *current++ = right[i];
 
 1281            char *params = strchr(work,
'(');
 
 1283               *params = 0; params++;
 
 1284            } 
else params = (
char *) 
")";
 
 1286               Error(
"DefinedVariable",
"Can not call '%s' with a class",work);
 
 1290               Error(
"DefinedVariable",
"Class probably unavailable:%s",cl->
GetName());
 
 1317                  previnfo = clonesinfo;
 
 1318                  maininfo = clonesinfo;
 
 1350                  previnfo = collectioninfo;
 
 1351                  maininfo = collectioninfo;
 
 1356               if (inside_cl) cl = inside_cl;
 
 1358                  Warning(
"DefinedVariable",
"Can not call method on content of %s in %s\n",
 
 1365               Error(
"DefinedVariable",
 
 1366                     "Could not discover the TClass corresponding to (%s)!",
 
 1370               method = 
new TMethodCall(cl, 
"GetEntriesFast", 
"");
 
 1374                  if (useLeafCollectionObject) {
 
 1380                  maininfo=previnfo=collectioninfo;
 
 1386                  Error(
"DefinedVariable",
 
 1387                        "Can not call method %s on class without dictionary (%s)!",
 
 1395                  Error(
"DefinedVariable",
"Unknown method:%s in %s",right,cl->
GetName());
 
 1420                     Error(
"DefineVariable",
"Method %s from %s has an impossible return type %d",
 
 1426               maininfo = leafinfo;
 
 1429               previnfo = leafinfo;
 
 1431               previnfo->
fNext = leafinfo;
 
 1432               previnfo = leafinfo;
 
 1435            current = &(work[0]);
 
 1437            prevUseCollectionObject = 
kFALSE;
 
 1438            prevUseReferenceObject = 
kFALSE;
 
 1439            useCollectionObject = 
kFALSE;
 
 1442               if (numberOfVarDim>1) {
 
 1443                  Warning(
"DefinedVariable",
"TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection %s.",
 
 1446                  useCollectionObject = 
kTRUE;
 
 1447               } 
else if (numberOfVarDim==0) {
 
 1451               } 
else if (numberOfVarDim==1) {
 
 1456                  previnfo->
fNext = leafinfo;
 
 1457                  previnfo = leafinfo;
 
 1463               previnfo->
fNext = leafinfo;
 
 1464               previnfo = leafinfo;
 
 1468         } 
else if (right[i] == 
')') {
 
 1471            TClass * casted = (
TClass*) ((
int(--paran_level)>=0) ? castqueue.
At(paran_level) : 0);
 
 1477                  maininfo = leafinfo;
 
 1480                  previnfo = leafinfo;
 
 1482                  previnfo->
fNext = leafinfo;
 
 1483                  previnfo = leafinfo;
 
 1486               current = &(work[0]);
 
 1493         } 
else if (i > 0 && (right[i] == 
'.' || right[i] == 
'[' || right[i] == 
'\0') ) {
 
 1500            if (strlen(work)==0) 
continue;
 
 1502            prevUseCollectionObject = useCollectionObject;
 
 1503            prevUseReferenceObject = useReferenceObject;
 
 1505               useReferenceObject = 
kTRUE;
 
 1506               useCollectionObject = 
kTRUE;
 
 1508               for(
l=0;work[
l+1]!=0;++
l) work[
l] = work[
l+1];
 
 1510            } 
else if (work[strlen(work)-1]==
'@') {
 
 1511               useReferenceObject = 
kTRUE;
 
 1512               useCollectionObject = 
kTRUE;
 
 1513               work[strlen(work)-1] = 
'\0';
 
 1515               useReferenceObject = 
kFALSE;
 
 1516               useCollectionObject = 
kFALSE;
 
 1527                  prevUseReferenceObject = 
kFALSE;
 
 1530                  previnfo = previnfo->
fNext;
 
 1534               for(
Long64_t entry=0; entry<leaf->
GetBranch()->GetEntries()-readentry; ++entry)  {
 
 1572                  previnfo = clonesinfo;
 
 1573                  maininfo = clonesinfo;
 
 1577                        Error(
"DefinedVariable",
"Unimplemented usage of ClonesArray");
 
 1588                          "TClonesArray object was not retrievable for %s!",
 
 1597               if (1 || inside_cl) cl = inside_cl;
 
 1599               if (0 && strlen(work)==0) {
 
 1633                  previnfo = collectioninfo;
 
 1634                  maininfo = collectioninfo;
 
 1643                  Error(
"DefinedVariable",
"Could you not find the inner class for %s with coll type = %d",
 
 1647                  Warning(
"DefinedVariable",
"No data member in content of %s in %s\n",
 
 1656               Warning(
"DefinedVariable",
"Missing class for %s!",
name.Data());
 
 1661            if (!element && !prevUseCollectionObject) {
 
 1668                     Int_t clones_offset = 0;
 
 1676                        previnfo->
fNext = clonesinfo;
 
 1678                        previnfo->
fNext = 0;
 
 1690                        if (maininfo==0) maininfo = leafinfo;
 
 1691                        if (previnfo==0) previnfo = leafinfo;
 
 1693                           previnfo->
fNext = leafinfo;
 
 1694                           previnfo = leafinfo;
 
 1702                     Int_t coll_offset = 0;
 
 1711                        if (numberOfVarDim>1) {
 
 1712                           Warning(
"DefinedVariable",
"TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection %s.",
 
 1715                           useCollectionObject = 
kTRUE;
 
 1716                        } 
else if (numberOfVarDim==1) {
 
 1728                        if (maininfo==0) maininfo = leafinfo;
 
 1729                        if (previnfo==0) previnfo = leafinfo;
 
 1731                           previnfo->
fNext = leafinfo;
 
 1732                           previnfo = leafinfo;
 
 1734                        if (leafinfo->
fNext) {
 
 1735                           previnfo = leafinfo->
fNext;
 
 1750                  if (numberOfVarDim>=1 && 
type>40) {
 
 1755                     if (leafinfo && 
type<=40 ) {
 
 1795                        Error(
"DefinedVariable",
 
 1796                              "%s is a datamember of %s BUT is not yet of a supported type (%d)",
 
 1801                        Error(
"DefinedVariable",
 
 1802                              "%s is a datamember of %s BUT is not of a unknown type (%d)",
 
 1807                  if (
object && !useCollectionObject &&
 
 1813                  if (
object && leafinfo) {
 
 1815                  } 
else if (objarr) {
 
 1830                        if (numberOfVarDim>1) {
 
 1831                           Warning(
"DefinedVariable",
"TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection %s.",
 
 1834                           useCollectionObject = 
kTRUE;
 
 1835                        } 
else if (numberOfVarDim==1) {
 
 1855                              else leafinfo->
fNext = info;
 
 1862                           if (!maininfo) maininfo = leafinfo;
 
 1867                              if (previnfo==0) previnfo = leafinfo;
 
 1869                                 previnfo->
fNext = leafinfo;
 
 1870                                 previnfo = leafinfo;
 
 1885                              else leafinfo->
fNext = info;
 
 1901                        prevUseReferenceObject = 
kFALSE;
 
 1904                     } 
else if (pointer) {
 
 1916               if (cl) 
Error(
"DefinedVariable",
"%s is not a datamember of %s",work,cl->
GetName());
 
 1923               maininfo = leafinfo;
 
 1926               previnfo = leafinfo;
 
 1927            } 
else if (previnfo!=leafinfo) {
 
 1928               previnfo->
fNext = leafinfo;
 
 1929               previnfo = leafinfo;
 
 1931            while (previnfo->
fNext) previnfo = previnfo->
fNext;
 
 1933            if ( right[i] != 
'\0' )  {
 
 1934               if ( !needClass && mustderef )   {
 
 1940                        if ( inf->IsReference() )  {
 
 1951                        Error(
"DefinedVariable",
"Failed to access class type of reference target (%s)",element->
GetName());
 
 1957                     Error(
"DefinedVariable",
"Failed to access class type of reference target (%s)",element->
GetName());
 
 1961               else if ( needClass )  {
 
 1965            if (mustderef) leafinfo = 0;
 
 1966            current = &(work[0]);
 
 1975               nchname = strlen(right);
 
 1979            *current++ = right[i];
 
 1988   if (strlen(work)!=0) {
 
 2000         if (!last) 
return action;
 
 2004      if (last && last->
GetClass() != objClass) {
 
 2016         last->
fNext = collectioninfo;
 
 2028         if (!last) 
return action;
 
 2032      const char *funcname = 0;
 
 2036      } 
else if (objClass == stdStringClass) {
 
 2079      method = 
new TMethodCall(objClass, 
"AsString", 
"");
 
 2132            const char *funcname = 0;
 
 2135            } 
else if (objClass == stdStringClass) {
 
 2175   if (readentry < 0) readentry=0;
 
 2176   const char *cname = expression;
 
 2179   char    right[
kMaxLen*2];  right[0] = 
'\0';
 
 2180   char     work[
kMaxLen];     work[0] = 
'\0';
 
 2181   char     left[
kMaxLen];     left[0] = 
'\0';
 
 2184   std::string currentname;
 
 2185   Int_t previousdot = 0;
 
 2188   TBranch *branch=0, *tmp_branch=0;
 
 2189   Int_t nchname = strlen(cname);
 
 2194   for (i=0, current = &(work[0]); i<=nchname && !
final;i++ ) {
 
 2196      *current++ = cname[i];
 
 2198      if (cname[i] == 
'(') {
 
 2201         if (current==work+1) {
 
 2204            startWithParan = 
kTRUE;
 
 2216      if (cname[i] == 
')') {
 
 2217         if (paran_level==0) {
 
 2218            Error(
"DefinedVariable",
"Unmatched paranthesis in %s",fullExpression);
 
 2223         if (startWithParan) {
 
 2233               current = &(work[0]);
 
 2237            } 
else if (
gROOT->GetType(cast_name)) {
 
 2239               current = &(work[0]);
 
 2242                       "Casting to primary types like \"%s\" is not supported yet",cast_name.
Data());
 
 2249         char *params = strchr(work,
'(');
 
 2251            *params = 0; params++;
 
 2253            if (branch && !leaf) {
 
 2265            while (!leaf && (leafcur = (
TLeaf*) next())) {
 
 2275               if (strlen(left) && left[strlen(left)-1]==
'.') left[strlen(left)-1]=0;
 
 2277               if (aliasValue && strcspn(aliasValue,
"+*/-%&!=<>|")==strlen(aliasValue)) {
 
 2280                  if (find(aliasUsed.begin(),
 
 2282                     left) != aliasUsed.end()) {
 
 2283                        Error(
"DefinedVariable",
 
 2284                           "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
 
 2285                           "\tbecause \"%s\" is used [recursively] in its own definition!",
 
 2286                           left,aliasValue,fullExpression,left);
 
 2289                  aliasUsed.push_back(left);
 
 2290                  TString newExpression = aliasValue;
 
 2291                  newExpression += (cname+strlen(left));
 
 2293                     castqueue, aliasUsed, useLeafCollectionObject, fullExpression);
 
 2295                     Error(
"DefinedVariable",
 
 2296                        "The substitution of the alias \"%s\" by \"%s\" failed.",left,aliasValue);
 
 2313            strlcpy(right,work,2*
kMaxLen);
 
 2314            strncat(right,
"(",2*
kMaxLen-1-strlen(right));
 
 2315            strncat(right,params,2*
kMaxLen-1-strlen(right));
 
 2319            i += strlen(params);
 
 2322            current = &(work[0]);
 
 2327      if (cname[i] == 
'.' || cname[i] == 
'\0' || cname[i] == 
')') {
 
 2332         Int_t len = strlen(work);
 
 2334            foundAtSign = 
kTRUE;
 
 2336            for(
l=0;work[
l+1]!=0;++
l) work[
l] = work[
l+1];
 
 2339         } 
else if (len>=2 && work[len-2]==
'@') {
 
 2340            foundAtSign = 
kTRUE;
 
 2341            work[len-2] = cname[i];
 
 2348         if (left[0]==0) strlcpy(left,work,
kMaxLen);
 
 2349         if (!leaf && !branch) {
 
 2353            std::string treename(
first);
 
 2354            if (treename.size() && treename[treename.size()-1]==
'.') {
 
 2355               treename.erase(treename.size()-1);
 
 2357            if (treename== 
"This"  ) {
 
 2362               if (cname[i]) leftover = &(cname[i+1]);
 
 2408               useLeafCollectionObject = foundAtSign;
 
 2410               current = &(work[0]);
 
 2413            else if (branch && (foundAtSign || cname[i] != 0)  ) {
 
 2427                           useLeafCollectionObject = foundAtSign;
 
 2429                           current = &(work[0]);
 
 2439               useLeafCollectionObject = foundAtSign;
 
 2441               current = &(work[0]);
 
 2443            } 
else if (leaf || branch) {
 
 2444               if (leaf && branch) {
 
 2458               current = &(work[0]);
 
 2471                     if (foundAtSign) strncat(right,
"@",2*
kMaxLen-1-strlen(right));
 
 2472                     if (cname[i]==
'.') strncat(right,
".",2*
kMaxLen-1-strlen(right));
 
 2475                     current = &(work[0]);
 
 2478               } 
else if (cname[i] == 
'.') {
 
 2485                  while(!branch && (branchcur=(
TBranch*)next()) ) {
 
 2490                     current = &(work[0]);
 
 2497               Error(
"DefinedVariable", 
"Unexpected control flow!");
 
 2503            if (cname[i]) work[strlen(work)-1] = 
'\0';
 
 2508               currentname = &(work[previousdot+1]);
 
 2515               if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch);
 
 2516               if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch2);
 
 2517               if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(currentname.c_str());
 
 2527               if (!tmp_branch) tmp_branch = branch->
FindBranch(scratch);
 
 2528               if (!tmp_branch) tmp_branch = branch->
FindBranch(scratch2);
 
 2529               if (!tmp_branch) tmp_branch = branch->
FindBranch(currentname.c_str());
 
 2537                  if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch);
 
 2538                  if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch2);
 
 2539                  if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(currentname.c_str());
 
 2553               useLeafCollectionObject = foundAtSign;
 
 2557               current = &(work[0]);
 
 2563                     Int_t where = strlen(work);
 
 2565                     work[where+1] = cname[i];
 
 2567                     previousdot = where+1;
 
 2569                     previousdot = strlen(work);
 
 2570                     work[strlen(work)] = cname[i];
 
 2580      strncat(right,work,2*
kMaxLen-1-strlen(right));
 
 2584      if (strlen(right) && right[strlen(right)-1]!=
'.' && cname[i]!=
'.') {
 
 2588         strncat(right,
".",2*
kMaxLen-1-strlen(right));
 
 2590      strncat(right,&cname[i],2*
kMaxLen-1-strlen(right));
 
 2593   if (!
final && branch) {
 
 2596         if (!leaf) 
return -1;
 
 2602      if (strlen(right)==0) strlcpy(right,work,2*
kMaxLen);
 
 2605   if (leaf==0 && left[0]!=0) {
 
 2606      if (left[strlen(left)-1]==
'.') left[strlen(left)-1]=0;
 
 2610      if (aliasValue && strcspn(aliasValue,
"()[]+*/-%&!=<>|")==strlen(aliasValue)) {
 
 2613         if (find(aliasUsed.begin(),
 
 2615                  left) != aliasUsed.end()) {
 
 2616            Error(
"DefinedVariable",
 
 2617                  "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
 
 2618                  "\tbecause \"%s\" is used [recursively] in its own definition!",
 
 2619                  left,aliasValue,fullExpression,left);
 
 2622         aliasUsed.push_back(left);
 
 2623         TString newExpression = aliasValue;
 
 2624         newExpression += (cname+strlen(left));
 
 2626                                           castqueue, aliasUsed, useLeafCollectionObject, fullExpression);
 
 2628            Error(
"DefinedVariable",
 
 2629                  "The substitution of the alias \"%s\" by \"%s\" failed.",left,aliasValue);
 
 2680   if (!
fTree) 
return -1;
 
 2686   if (
name == 
"Entry$") {
 
 2692   if (
name == 
"LocalEntry$") {
 
 2698   if (
name == 
"Entries$") {
 
 2706   if (
name == 
"LocalEntries$") {
 
 2714   if (
name == 
"Iteration$") {
 
 2720   if (
name == 
"Length$") {
 
 2726   static const char *
lenfunc = 
"Length$(";
 
 2727   if (strncmp(
name.Data(),
"Length$(",strlen(
lenfunc))==0
 
 2739   static const char *minfunc = 
"Min$(";
 
 2740   if (strncmp(
name.Data(),
"Min$(",strlen(minfunc))==0
 
 2752   static const char *maxfunc = 
"Max$(";
 
 2753   if (strncmp(
name.Data(),
"Max$(",strlen(maxfunc))==0
 
 2765   static const char *sumfunc = 
"Sum$(";
 
 2766   if (strncmp(
name.Data(),
"Sum$(",strlen(sumfunc))==0
 
 2785      if (res<0) 
return res;
 
 2793   char     dims[
kMaxLen];   dims[0] = 
'\0';
 
 2801   Int_t cnamelen = strlen(cname);
 
 2802   for(i=0,k=0; i<cnamelen; ++i, ++k) {
 
 2803      if (cname[i] == 
'[') {
 
 2805         int bracket_level = 1;
 
 2807         for (j=++i; j<cnamelen && (bracket_level>0 || cname[j]==
'['); j++, i++) {
 
 2808            if (cname[j]==
'[') bracket_level++;
 
 2809            else if (cname[j]==
']') bracket_level--;
 
 2811         if (bracket_level != 0) {
 
 2815         strncat(dims,&cname[bracket],j-bracket);
 
 2818      if (i!=k) cname[k] = cname[i];
 
 2827      res = 
FindLeafForExpression(cname, leaf, leftover, 
final, paran_level, castqueue, aliasSofar, useLeafCollectionObject, 
name);
 
 2829   if (res<0) 
return res;
 
 2831   if (!leaf && res!=2) {
 
 2840            Error(
"DefinedVariable",
 
 2841                  "The substitution of the alias \"%s\" by \"%s\" failed\n"\
 
 2842                  "\tbecause \"%s\" is recursively used in its own definition!",
 
 2843                  cname,aliasValue,cname);
 
 2848         if (strcspn(aliasValue,
"()+*/-%&!=<>|")!=strlen(aliasValue)) {
 
 2854            aliasSofar.push_back( cname );
 
 2856            TString subValue( aliasValue );
 
 2865               Error(
"DefinedVariable",
 
 2866                     "The substitution of the alias \"%s\" by \"%s\" failed.",cname,aliasValue);
 
 2881            TString thisAlias( aliasValue );
 
 2889                  Error(
"Compile", 
" Bad numerical expression : \"%s\"",thisAlias.
Data());
 
 2890               } 
else if (aliasRes==-2) {
 
 2891                  Error(
"Compile", 
" Part of the Variable \"%s\" exists but some of it is not accessible or useable",thisAlias.
Data());
 
 2894               Error(
"DefinedVariable",
 
 2895                     "The substitution of the alias \"%s\" by \"%s\" failed.",cname,aliasValue);
 
 2904   if (leaf || res==2) {
 
 2907         Error(
"DefinedVariable",
"the branch \"%s\" has to be enabled to be used",leaf->
GetBranch()->
GetName());
 
 2916         char *current = &( dims[0] );
 
 2923            if (current[0] == 
']') {
 
 2926               scanindex = sscanf(current,
"%d",&index);
 
 2932                  char *end = (
char*)(varindex.
Data());
 
 2933                  for(
char bracket_level = 0;*end!=0;end++) {
 
 2934                     if (*end==
'[') bracket_level++;
 
 2935                     if (bracket_level==0 && *end==
']') 
break;
 
 2936                     if (*end==
']') bracket_level--;
 
 2946                  current += strlen(varindex)+1; 
 
 2954            current = (
char*)strstr( current, 
"[" );
 
 2961      res = 
ParseWithLeaf(leaf,leftover,
final,paran_level,castqueue,useLeafCollectionObject,
name);
 
 2962      if (res<0) 
return res;
 
 2963      if (res>0) action = res;
 
 2991      } 
else if (strlen(gcut->
GetVarX())) {
 
 3000         for(
Int_t i2 = 1; i2<
n; i2++) {
 
 3001            if (
x[i2] < min) min = 
x[i2];
 
 3002            if (
x[i2] > max) max = 
x[i2];
 
 3021         Error(
"DefinedVariable",
"Found a TCutG without leaf information (%s)",
 
 3058   while ((leafcur = (
TLeaf*)nextleaf())) {
 
 3086      if (clonesinfo) { 
delete clonesinfo; clonesinfo = 0; }
 
 3110         if (clones) cl = clones->
GetClass();
 
 3152                     leafinfo = clonesinfo;
 
 3164                  Int_t clones_offset = 0;
 
 3169                     else leafinfo->
fNext = sub_clonesinfo;
 
 3170                  else leafinfo = sub_clonesinfo;
 
 3176                  delete leafinfo; clonesinfo = 0;
 
 3181                  if (!clones) 
continue;
 
 3242      } 
else if (
type > 60) {
 
 3301         Error(
"BranchHasMethod",
"A TClonesArray was stored in a branch type no yet support (i.e. neither TBranchObject nor TBranchElement): %s",branch->IsA()->
GetName());
 
 3304      cl = clones ? clones->
GetClass() : 0;
 
 3338      Int_t real_instance = 0;
 
 3373                  if (local_index<0) {
 
 3374                     Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
 
 3381               real_instance = local_index * 
fCumulSizes[codeindex][1];
 
 3406               if (local_index<0) {
 
 3407                  Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
 
 3427                     if (check) 
return fNdata[0]+1;
 
 3432                     } 
while( 
instance >= virt_accum && local_index<maxloop);
 
 3438                     if (local_index==(maxloop-1) && (
instance >= virt_accum)) {
 
 3440                        if (check) 
return fNdata[0]+1;
 
 3446                           if (check) 
return fNdata[0]+1;
 
 3454               local_index = 
fIndexes[codeindex][0];
 
 3481               if (
fIndexes[codeindex][vdim]>=0) {
 
 3484               if  (isize!=1 && 
fIndexes[codeindex][vdim]>isize) {
 
 3489               for(
Int_t k=vdim -1; k>0; --k) {
 
 3493               real_instance = local_index * 
fCumulSizes[codeindex][1];
 
 3497            for (
Int_t dim = 1; dim < max_dim; dim++) {
 
 3508                  if (
fIndexes[codeindex][dim]==-2) {
 
 3515                     if (local_index<0 ||
 
 3517                        Error(
"EvalInstance",
"Index %s is out of bound (%d/%d) in formula %s",
 
 3525                  real_instance += local_index * 
fCumulSizes[codeindex][dim+1];
 
 3529            if (
fIndexes[codeindex][max_dim]>=0) {
 
 3530               if (!info) real_instance += 
fIndexes[codeindex][max_dim];
 
 3538               if (info && local_index>=
fCumulSizes[codeindex][max_dim]) {
 
 3542               if (
fIndexes[codeindex][max_dim]==-2) {
 
 3548                  if (local_index<0 ||
 
 3550                     Error(
"EvalInstance",
"Index %s is of out bound (%d/%d) in formula %s",
 
 3558               real_instance += local_index;
 
 3563      return real_instance;
 
 3661   else if (real_instance>=
fNdata[0]) 
return 0;
 
 3667         if (real_instance) {
 
 3668            Warning(
"EvalObject",
"Not yet implement for kDirect and arrays (for %s).\nPlease contact the developers",
GetName());
 
 3687   const Int_t kMAXSTRINGFOUND = 10;
 
 3688   const char *stringStack[kMAXSTRINGFOUND];
 
 3699      } 
else if (real_instance>=
fNdata[0]) {
 
 3712   return stringStack[0];
 
 3715#define TT_EVAL_INIT                                                                            \ 
 3716   TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(0);                                                \ 
 3718   const Int_t real_instance = GetRealInstance(instance,0);                                     \ 
 3720   if (instance==0) fNeedLoading = kTRUE;                                                       \ 
 3721   if (real_instance>=fNdata[0]) return 0;                                                       \ 
 3727   if (fNeedLoading) {                                                                          \ 
 3728      fNeedLoading = kFALSE;                                                                    \ 
 3729      TBranch *br = leaf->GetBranch();                                                          \ 
 3730      Long64_t tentry = br->GetTree()->GetReadEntry();                                          \ 
 3731      R__LoadBranch(br,tentry,fQuickLoad);                                                      \ 
 3738      if (fLookupType[0]==kDirect) {                                                            \ 
 3739         label = (char*)leaf->GetValuePointer();                                                \ 
 3741         label = (char*)GetLeafInfo(0)->GetValuePointer(leaf,instance);                         \ 
 3743      Int_t bin = fAxis->FindBin(label);                                                        \ 
 3747#define TREE_EVAL_INIT                                                                          \ 
 3748   const Int_t real_instance = GetRealInstance(instance,0);                                     \ 
 3750   if (real_instance>=fNdata[0]) return 0;                                                      \ 
 3756      label = (char*)GetLeafInfo(0)->GetValuePointer((TLeaf*)0x0,instance);                     \ 
 3757      Int_t bin = fAxis->FindBin(label);                                                        \ 
 3761#define TT_EVAL_INIT_LOOP                                                                       \ 
 3762   TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(code);                                             \ 
 3765   const Int_t real_instance = GetRealInstance(instance,code);                                  \ 
 3768      TBranch *branch = (TBranch*)fBranches.UncheckedAt(code);                                  \ 
 3770         Long64_t treeEntry = branch->GetTree()->GetReadEntry();                                \ 
 3771         R__LoadBranch(branch,treeEntry,fQuickLoad);                                            \ 
 3772      } else if (fDidBooleanOptimization) {                                                     \ 
 3773         branch = leaf->GetBranch();                                                            \ 
 3774         Long64_t treeEntry = branch->GetTree()->GetReadEntry();                                \ 
 3775         if (branch->GetReadEntry() != treeEntry) branch->GetEntry( treeEntry );                \ 
 3781      if (fDidBooleanOptimization) {                                                            \ 
 3782         TBranch *br = leaf->GetBranch();                                                       \ 
 3783         Long64_t treeEntry = br->GetTree()->GetReadEntry();                                    \ 
 3784         if (br->GetReadEntry() != treeEntry) br->GetEntry( treeEntry );                        \ 
 3787   if (real_instance>=fNdata[code]) return 0; 
 3789#define TREE_EVAL_INIT_LOOP                                                                     \ 
 3791   const Int_t real_instance = GetRealInstance(instance,code);                                  \ 
 3793   if (real_instance>=fNdata[code]) return 0; 
 3799   for (
int i=0; i<len; ++i) res += 
sum->EvalInstance<
T>(i);
 
 3808      for (
int i=1; i<len; ++i) {
 
 3823      for (
int i=1; i<len; ++i) {
 
 3842      } 
while (!condval && i<len);
 
 3843      if (!condval && i==len) {
 
 3852      for (; i<len; ++i) {
 
 3874      } 
while (!condval && i<len);
 
 3875      if (!condval && i==len) {
 
 3884      for (; i<len; ++i) {
 
 3899template <
typename T> 
T fmod_local(
T x, 
T y) { 
return fmod(
x,
y); }
 
 3916            if( !strncmp(
fExpr[op], 
"0x", 2) || !strncmp(
fExpr[op], 
"0X", 2) ) {
 
 3918               sscanf( 
fExpr[op], 
"%llx", &val );
 
 3944            return leaf->GetTypedValue<
T>(real_instance);
 
 4002   const Int_t kMAXSTRINGFOUND = 10;
 
 4003   const char *stringStackLocal[kMAXSTRINGFOUND];
 
 4004   const char **stringStack = stringStackArg?stringStackArg:stringStackLocal;
 
 4020         if (newaction==
kConstant) { pos++; tab[pos-1] = GetConstant<T>(oper & 
kTFOperMask); 
continue; }
 
 4024            case kEnd        : 
return tab[0];
 
 4025            case kAdd        : pos--; tab[pos-1] += tab[pos]; 
continue;
 
 4026            case kSubstract  : pos--; tab[pos-1] -= tab[pos]; 
continue;
 
 4027            case kMultiply   : pos--; tab[pos-1] *= tab[pos]; 
continue;
 
 4028            case kDivide     : pos--; 
if (tab[pos] == 0) tab[pos-1] = 0; 
 
 4029                                      else               tab[pos-1] /= tab[pos];
 
 4034                                tab[pos-1] = 
T(int1 % int2);
 
 4054            case kacosh: 
if (tab[pos-1] < 1) {tab[pos-1] = 0;} 
 
 4063            case kfmod : pos--; tab[pos-1] = fmod_local(tab[pos-1],tab[pos]); 
continue;
 
 4064            case kpow  : pos--; tab[pos-1] = 
TMath::Power(tab[pos-1],tab[pos]); 
continue;
 
 4065            case ksq   : tab[pos-1] = tab[pos-1]*tab[pos-1]; 
continue;
 
 4068            case kstrstr : pos2 -= 2; pos++;
if (strstr(stringStack[pos2],stringStack[pos2+1])) tab[pos-1]=1;
 
 4072            case kmin : pos--; tab[pos-1] = std::min(tab[pos-1],tab[pos]); 
continue;
 
 4073            case kmax : pos--; tab[pos-1] = std::max(tab[pos-1],tab[pos]); 
continue;
 
 4075            case klog  : 
if (tab[pos-1] > 0) tab[pos-1] = 
TMath::Log(tab[pos-1]);
 
 4076                         else {tab[pos-1] = 0;} 
 
 4079                           if (dexp < -700) {tab[pos-1] = 0; 
continue;}
 
 4080                           if (dexp >  700) {tab[pos-1] = 
TMath::Exp(700); 
continue;}
 
 4084                         else {tab[pos-1] = 0;} 
 
 4090            case ksign : 
if (tab[pos-1] < 0) tab[pos-1] = -1; 
else tab[pos-1] = 1;
 
 4093            case kSignInv: tab[pos-1] = -1 * tab[pos-1]; 
continue;
 
 4096            case kAnd  : pos--; 
if (tab[pos-1]!=0 && tab[pos]!=0) tab[pos-1]=1;
 
 4099            case kOr   : pos--; 
if (tab[pos-1]!=0 || tab[pos]!=0) tab[pos-1]=1;
 
 4103            case kEqual      : pos--; tab[pos-1] = (tab[pos-1] == tab[pos]) ? 1 : 0; 
continue;
 
 4104            case kNotEqual   : pos--; tab[pos-1] = (tab[pos-1] != tab[pos]) ? 1 : 0; 
continue;
 
 4105            case kLess       : pos--; tab[pos-1] = (tab[pos-1] <  tab[pos]) ? 1 : 0; 
continue;
 
 4106            case kGreater    : pos--; tab[pos-1] = (tab[pos-1] >  tab[pos]) ? 1 : 0; 
continue;
 
 4107            case kLessThan   : pos--; tab[pos-1] = (tab[pos-1] <= tab[pos]) ? 1 : 0; 
continue;
 
 4108            case kGreaterThan: pos--; tab[pos-1] = (tab[pos-1] >= tab[pos]) ? 1 : 0; 
continue;
 
 4109            case kNot        :        tab[pos-1] = (tab[pos-1] !=        0) ? 0 : 1; 
continue;
 
 4111            case kStringEqual : pos2 -= 2; pos++; 
if (!strcmp(stringStack[pos2+1],stringStack[pos2])) tab[pos-1]=1;
 
 4114            case kStringNotEqual: pos2 -= 2; pos++;
if (strcmp(stringStack[pos2+1],stringStack[pos2])) tab[pos-1]=1;
 
 4139               pos2++; stringStack[pos2-1] = (
char*)
fExpr[i].Data();
 
 4153               int op = param % 10; 
 
 4155               if (op == 1 && (!tab[pos-1]) ) {
 
 4164               } 
else if (op == 2 && tab[pos-1] ) {
 
 4175                  int toskip = param / 10;
 
 4186               int fno   = param / 1000;
 
 4187               int nargs = param % 1000;
 
 4195                  UInt_t argloc = pos-nargs;
 
 4196                  for(
Int_t j=0;j<nargs;j++,argloc++,pos--) {
 
 4197                     SetMethodParam(method, tab[argloc]);
 
 4220            switch (lookupType) {
 
 4235                                          GetTypedValue<T>(leaf,real_instance); 
continue; }
 
 4237                                          GetTypedValue<T>((
TLeaf*)0x0,real_instance); 
continue; }
 
 4242               default: tab[pos++] = 0; 
continue;
 
 4255                  tab[pos++] = gcut->
IsInside(xcut,ycut);
 
 4284               tab[pos] = param; pos++;
 
 4302               T param = FindMin<T>(primary,condition);
 
 4304               tab[pos] = param; pos++;
 
 4311               T param = FindMax<T>(primary,condition);
 
 4313               tab[pos] = param; pos++;
 
 4323               if (instance < primary->
GetNdata()) {
 
 4329                  tab[pos] = param; pos++;
 
 4343               if (instance < primary->
GetNdata()) {
 
 4381                  if (real_instance>=
fNdata[string_code]) 
return 0;
 
 4403template double TTreeFormula::EvalInstance<double> (
int, 
char const**);
 
 4404template long double TTreeFormula::EvalInstance<long double> (
int, 
char const**);
 
 4405template long long TTreeFormula::EvalInstance<long long> (
int, 
char const**);
 
 4471            Warning(
"GetValueFromMethod", 
"No streamer info for branch %s.", branch->
GetName());
 
 4481            thisobj = *((
char**) (address + offset));
 
 4493      m->Execute(thisobj, 
l);
 
 4499      m->Execute(thisobj, 
d);
 
 4503   m->Execute(thisobj);
 
 4531            Warning(
"GetValuePointerFromMethod", 
"No streamer info for branch %s.", branch->
GetName());
 
 4541            thisobj = *((
char**) (address + offset));
 
 4553      m->Execute(thisobj, 
l);
 
 4559      m->Execute(thisobj, 
d);
 
 4565      m->Execute(thisobj, &
c);
 
 4569   m->Execute(thisobj);
 
 4724               if (indexname[strlen(indexname)-1] == 
'_' ) {
 
 4736            if (bid < 0) 
return kFALSE;
 
 4799   const int kMAXLENGTH = 1024;
 
 4800   static char value[kMAXLENGTH];
 
 4803      for (
int i = 0; i < kMAXLENGTH-1; i++)
 
 4805      value[kMAXLENGTH-1] = 0;
 
 4806   } 
else if (mode == -1) {
 
 4808   } 
else if (mode == 0) {
 
 4811         const char * val = 0;
 
 4834            strlcpy(value, val, kMAXLENGTH);
 
 4838         value[kMAXLENGTH-1] = 0;
 
 4843         if (real_instance<
fNdata[0]) {
 
 4844            Ssiz_t len = strlen(decform);
 
 4845            Char_t outputSizeLevel = 1;
 
 4848               switch (decform[len-2]) {
 
 4851                     outputSizeLevel = 2;
 
 4852                     if (len>3 && tolower(decform[len-3])==
'l') {
 
 4853                        outputSizeLevel = 3;
 
 4857                  case 'h': outputSizeLevel = 0; 
break;
 
 4860            switch(decform[len-1]) {
 
 4865                  switch (outputSizeLevel) {
 
 4879                  switch (outputSizeLevel) {
 
 4894                  switch (outputSizeLevel) {
 
 4899                  expo = strchr(value,
'e');
 
 4904                  expo = strchr(value,
'e');
 
 4909               UInt_t declen = atoi(decform);
 
 4910               if (strlen(value)>declen) {
 
 4911                  UInt_t off = strlen(value)-declen;
 
 4912                  char *start = expo - off;
 
 4913                  UInt_t vlen = strlen(expo);
 
 4914                  for(
UInt_t z=0;z<=vlen;++z) {
 
 4921            if (isalpha(decform[strlen(decform)-1])) {
 
 4922               TString short_decform(decform);
 
 4945      for(
UInt_t dim=0; dim<max_dim ;++dim) {
 
 4955   for(
Int_t k=0; k <= 
n; ++k) {
 
 4978   if (!axis) {
fAxis = 0; 
return;}
 
 5068   for (
Int_t i=0;i<nleaves;i++) {
 
 5151   Int_t last_code = -1;
 
 5153   for(TDimensionInfo * info; (info = (TDimensionInfo*)next()); ) {
 
 5154      if (last_code!=info->fCode) {
 
 5159         last_code = info->fCode;
 
 5167         TDimensionInfo *nextinfo = (TDimensionInfo*)next();
 
 5168         while(nextinfo && nextinfo->fCode==info->fCode) {
 
 5170            nextinfo = (TDimensionInfo*)next();
 
 5172         if (!nextinfo) 
break;
 
 5176         last_code = info->fCode;
 
 5228         if (!gcut) 
continue;
 
 5258      if (!leaf) 
continue;
 
 5287         if (tleaf && tleaf != realtree && tleaf->
GetTreeIndex()) {
 
 5293      Int_t virt_dim2 = 0;
 
 5301         if ( 
fIndexes[i][k] < 0 ) virt_dim2++;
 
 5329   for (i=0; i<
fNoper ; ++i) {
 
 5331      if (leaf==0) 
continue;
 
 5341      for (
Int_t dim = 0; dim < max_dim; ++dim) {
 
 5355      if (
fCodes[i] < 0) 
continue;
 
 5376               outofbounds = 
kTRUE;
 
 5383      if (tleaf && tleaf != realtree && tleaf->
GetTreeIndex()) {
 
 5386            outofbounds = 
kTRUE;
 
 5401            if (readentry < 0) readentry=0;
 
 5408               branchcount->TBranch::GetEntry(readentry);
 
 5436               hasBranchCount2 = 
kTRUE;
 
 5443               for(
Int_t k=vdim -1; k>=0; k--) {
 
 5457            if (readentry < 0) readentry=0;
 
 5461         if (hasBranchCount2) {
 
 5472               for(
Int_t j=0; j<size; j++) {
 
 5485         } 
else if (
fIndexes[i][0] >= size) {
 
 5489            outofbounds = 
kTRUE;
 
 5490         } 
else if (hasBranchCount2) {
 
 5498               outofbounds = 
kTRUE;
 
 5506            if (readentry < 0) readentry=0;
 
 5515            } 
else if (
fIndexes[i][0] >= size) {
 
 5519               outofbounds = 
kTRUE;
 
 5531               hasBranchCount2 = 
kTRUE;
 
 5533                  for(
int z=0; z<size; ++z) {
 
 5537                     } 
else if (
fIndexes[i][vdim] >= 0 ) {
 
 5547               for(
Int_t k=vdim -1; k>=0; k--) {
 
 5557            if (readentry < 0) readentry=0;
 
 5560               outofbounds = 
kTRUE;
 
 5576               if (
fManager->
fUsedSizes[virt_dim]==1 || (index_size!=1 && index_size<fManager->fUsedSizes[virt_dim]) )
 
 5583               if (index_size==1) {
 
 5587                     if (index_size<fManager->fUsedSizes[virt_dim]) 
fManager->
fUsedSizes[virt_dim] = index_size;
 
 5591                          index_size<fManager->fUsedSizes[virt_dim]) {
 
 5595            } 
else if (hasBranchCount2 && info && k==info->
GetVarDim()) {
 
 5599                  if (
fManager->
fUsedSizes[virt_dim]==1 || (index_size!=1 && index_size<fManager->fUsedSizes[virt_dim]) )
 
 5604         } 
else if (hasBranchCount2 && info && k==info->
GetVarDim()) {
 
 5617   return ! outofbounds;
 
 5627   enum { kOldAlias           =  100000+10000+1,
 
 5628          kOldAliasString     = kOldAlias+1,
 
 5629          kOldAlternate       = kOldAlias+2,
 
 5630          kOldAlternateString = kOldAliasString+2
 
 5633   for (
int k=0; k<
fNoper; k++) {
 
 5640         case kOldAlias:            
GetOper()[k] = -kOldAlias; 
break;
 
 5641         case kOldAliasString:      
GetOper()[k] = -kOldAliasString; 
break;
 
 5642         case kOldAlternate:        
GetOper()[k] = -kOldAlternate; 
break;
 
 5643         case kOldAlternateString:  
GetOper()[k] = -kOldAlternateString; 
break;
 
 5649   for (
int i=0,offset=0; i<
fNoper; i++) {
 
 5675   if (!leaf) 
return kFALSE;
 
 5689            last = clonesinfo->
fNext;
 
 5693         } 
else if (br->
GetType()==41) {
 
 5698            if ( count->
GetID() >= 0 ) {
 
 5717            last = collectioninfo->
fNext;
 
 5721         } 
else if (br->
GetID()<0) {
 
unsigned long long ULong64_t
 
const Int_t kDoNotProcess
 
R__EXTERN TRandom * gRandom
 
char * Form(const char *fmt,...)
 
void Set(Int_t n)
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.
 
TBranchElement * GetBranchCount() const
 
TStreamerInfo * GetInfo() const
Get streamer info for the branch class.
 
virtual char * GetAddress() const
Get the branch address.
 
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any.
 
Int_t GetStreamerType() const
 
TBranchElement * GetBranchCount2() const
 
char * GetObject() const
Return a pointer to our object.
 
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch.
 
A Branch for the case of an object.
 
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any.
 
A TTree is a list of TBranches.
 
virtual char * GetAddress() const
 
TObjArray * GetListOfBranches()
 
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
 
virtual TLeaf * FindLeaf(const char *name)
Find the leaf corresponding to the name 'searchname'.
 
Long64_t GetReadEntry() const
 
virtual void Print(Option_t *option="") const
Print TBranch parameters.
 
virtual void ResetReadEntry()
 
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
 
TObjArray * GetListOfLeaves()
 
TBranch * GetMother() const
Get our top-level parent branch in the tree.
 
Buffer base class used for serializing objects.
 
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
 
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
 
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
 
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
 
TClassRef is used to implement a permanent reference to a TClass object.
 
TClass instances represent classes, structs and namespaces in the ROOT type system.
 
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist,...
 
Bool_t HasDataMemberInfo() const
 
ClassInfo_t * GetClassInfo() const
 
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
 
TMethod * GetMethodAllAny(const char *method)
Return pointer to method without looking at parameters.
 
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
 
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.
 
TClass * GetClass() const
 
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
 
const char * GetVarX() const
 
virtual void SetObjectY(TObject *obj)
Set the Y object (and delete the previous one if any).
 
TObject * GetObjectY() const
 
virtual void SetObjectX(TObject *obj)
Set the X object (and delete the previous one if any).
 
TObject * GetObjectX() const
 
const char * GetVarY() const
 
Describe directory structure in memory.
 
virtual Bool_t cd(const char *path=nullptr)
Change current directory to "this" directory.
 
A List of entry numbers in a TTree or TChain.
 
virtual Int_t Contains(Long64_t entry, TTree *tree=0)
 
virtual Int_t IsInside(Double_t x, Double_t y) const
Return 1 if the point (x,y) is inside the polygon defined by the graph vertices 0 otherwise.
 
A TLeaf for the general case when using the branches created via a TStreamerInfo (i....
 
virtual Bool_t IsOnTerminalBranch() const
Return true if this leaf is does not have any sub-branch/leaf.
 
A TLeaf for a general object derived from TObject.
 
TClass * GetClass() const
 
TObject * GetObject() const
 
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
 
virtual void * GetValuePointer() const
 
virtual Bool_t IsOnTerminalBranch() const
 
virtual const char * GetTypeName() const
 
virtual Int_t GetLen() const
Return the number of effective elements of this leaf, for the current entry.
 
virtual TLeaf * GetLeafCount() const
If this leaf stores a variable-sized array or a multi-dimensional array whose last dimension has vari...
 
TBranch * GetBranch() const
 
virtual Int_t GetLenStatic() const
Return the fixed length of this leaf.
 
virtual Bool_t IsUnsigned() const
 
virtual void Add(TObject *obj)
 
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
 
Method or function calling interface.
 
EReturnType ReturnType()
Returns the return type of the method.
 
static const EReturnType kLong
 
static const EReturnType kString
 
void ResetParam()
Reset parameter list. To be used before the first call the SetParam().
 
static const EReturnType kOther
 
TFunction * GetMethod()
Returns the TMethod describing the method to be executed.
 
Bool_t IsValid() const
Return true if the method call has been properly initialized and is usable.
 
void Execute(const char *, const char *, int *=0)
Execute method on this object with the given parameter string, e.g.
 
static const EReturnType kDouble
 
void SetParam(Long_t l)
Add a long method parameter.
 
The TNamed class is the base class for all named ROOT classes.
 
virtual void SetName(const char *name)
Set the name of the TNamed.
 
virtual const char * GetTitle() const
Returns title of object.
 
virtual const char * GetName() const
Returns name of object.
 
Int_t IndexOf(const TObject *obj) const
 
Int_t GetEntriesFast() const
 
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
 
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
 
Int_t GetEntries() const
Return the number of objects in array (i.e.
 
TObject * UncheckedAt(Int_t i) const
 
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
 
virtual TObject * FindObject(const char *name) const
Find an object in this collection using its name.
 
Int_t GetLast() const
Return index of last object in array.
 
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
 
TObject * At(Int_t idx) const
 
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.
 
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
 
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
 
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
 
virtual Double_t Rndm()
Machine independent random number generator.
 
const char * GetCountName() const
 
virtual TClass * GetClassPointer() const
Returns a pointer to the TClass of this element.
 
Int_t GetArrayDim() const
 
Int_t GetMaxIndex(Int_t i) const
 
virtual Bool_t IsaPointer() const
 
TClass * GetClass() const
 
Describe Streamer information for one class version.
 
TStreamerElement * GetStreamerElement(const char *datamember, Int_t &offset) const
Return the StreamerElement of "datamember" inside our class or any of its base classes.
 
Int_t GetElementOffset(Int_t id) const
 
TClass * GetClass() const
 
TStreamerElement * GetElement(Int_t id) const
 
Ssiz_t First(char c) const
Find first occurrence of a character c.
 
const char * Data() const
 
TString & Remove(Ssiz_t pos)
 
TString & Append(const char *cs)
 
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 TObjArray * GetListOfLeaves()
 
virtual TVirtualIndex * GetTreeIndex() const
 
virtual Long64_t GetEntries() const
 
virtual TIterator * GetIteratorOnAllLeaves(Bool_t dir=kIterForward)
Creates a new iterator that will go through all the leaves on the tree itself and its friend.
 
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 leaf..
 
virtual const char * GetFriendAlias(TTree *) const
If the 'tree' is a friend, this method returns its alias name.
 
virtual EDataType GetType() const =0
 
virtual TClass * GetValueClass() const =0
 
virtual TClass * GetValueClass(void *data) const =0
 
virtual Bool_t HasCounter() const =0
 
Bool_t IsCompiled() const
 
virtual TObjArray * GetElements() const =0
 
static Roo_reg_AGKInteg1D instance
 
static constexpr double second
 
Double_t ATan2(Double_t y, Double_t x)
 
Double_t Sqrt(Double_t x)
 
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
 
Double_t Log10(Double_t x)
 
static long int sum(long int i)