125   fDidBooleanOptimization(
kFALSE), fDimensionSetup(0)
 
  159    fDidBooleanOptimization(
kFALSE), fDimensionSetup(0)
 
  168                           const std::vector<std::string>& aliases)
 
  170    fDidBooleanOptimization(
kFALSE), fDimensionSetup(0), fAliasesUsed(aliases)
 
  210      if(savedir) savedir->
cd();
 
  215      Warning(
"TTreeFormula",
"Too many items in expression:%s",expression);
 
  225         if (!leafc) 
continue;
 
  268   for(k0 = 0; k0 < 
fNcodes; k0++) {
 
  273            Error(
"TTreeFormula",
 
  274                  "Index %d for dimension #%d in %s is too high (max is %d)",
 
  277            if(savedir) savedir->
cd();
 
  306         if (readentry >= 0) {
 
  311         if (readentry >= 0) {
 
  318   if(savedir) savedir->
cd();
 
  340   for (
int j=0; j<
fNcodes; j++) {
 
  368   bool scalarindex = 
false;
 
  374      switch (index_multiplicity) {
 
  405   const char * current;
 
  414   if (current[0] != 
'[') current--;
 
  417      scanindex = sscanf(current,
"%d",&
size);
 
  421      if (scanindex==0) 
size = -1;
 
  430      current = (
char*)strstr( current, 
"[" );
 
  444   return (
size==-1) ? 1 : 0;
 
  452                                       Bool_t useCollectionObject) {
 
  466   if (elem->IsA() == TStreamerBasicPointer::Class()) {
 
  485      if (maininfo==0 || maininfo==leafinfo || 1) {
 
  491         delete currentinfo->
fNext;
 
  495   } 
else if (!useCollectionObject && elem->
GetClassPointer() == TClonesArray::Class() ) {
 
  500      TClass * clonesClass = TClonesArray::Class();
 
  516   } 
else if ( 
c && 
c->GetReferenceProxy() && 
c->GetReferenceProxy()->HasCounter() ) {
 
  547   } 
while (current<ndim);
 
  584   Int_t numberOfVarDim = 0;
 
  589   const char *tname = leaf->
GetTitle();
 
  590   char *leaf_dim = (
char*)strstr( tname, 
"[" );
 
  593   char *branch_dim = (
char*)strstr(bname,
"[");
 
  594   if (branch_dim) branch_dim++; 
 
  597   if  (leaf->IsA() == TLeafElement::Class()) {
 
  602      isString = (leaf->IsA() == TLeafC::Class());
 
  606      if (!branch_dim || strncmp(branch_dim,leaf_dim,strlen(branch_dim))) {
 
  609      } 
else if (branch_dim && strncmp(branch_dim,leaf_dim,strlen(branch_dim))==0
 
  610                 && strlen(leaf_dim)>strlen(branch_dim)
 
  611                 && (leaf_dim+strlen(branch_dim))[0]==
'[') {
 
  624   if (leaf->IsA() == TLeafElement::Class()) {
 
  630                    "Noticed an incorrect in-memory TBranchElement object (%s).\nIt has a BranchCount2 but no BranchCount!\nThe result might be incorrect!",
 
  632            return numberOfVarDim;
 
  638                    "Already in kDataMember mode when handling multiple variable dimensions");
 
  646   return numberOfVarDim;
 
  659   static const char *altfunc = 
"Alt$(";
 
  660   static const char *minfunc = 
"MinIf$(";
 
  661   static const char *maxfunc = 
"MaxIf$(";
 
  665   if (   strncmp(expression,altfunc,strlen(altfunc))==0
 
  666       && expression[strlen(expression)-1]==
')' ) {
 
  668      start = strlen(altfunc);
 
  670   if (   strncmp(expression,maxfunc,strlen(maxfunc))==0
 
  671       && expression[strlen(expression)-1]==
')' ) {
 
  673      start = strlen(maxfunc);
 
  675   if (   strncmp(expression,minfunc,strlen(minfunc))==0
 
  676       && expression[strlen(expression)-1]==
')' ) {
 
  678      start = strlen(minfunc);
 
  688      for(
unsigned int i=start;i<strlen(expression);++i) {
 
  689         switch (expression[i]) {
 
  690            case '(': paran++; 
break;
 
  691            case ')': paran--; 
break;
 
  692            case '"': instr = instr ? 0 : 1; 
break;
 
  693            case '[': brack++; 
break;
 
  694            case ']': brack--; 
break;
 
  696         if (expression[i]==
',' && paran==0 && instr==0 && brack==0) {
 
  697            part1 = full( start, i-start );
 
  698            part2 = full( i+1, full.Length() -1 - (i+1) );
 
  710               Error(
"DefinedVariable",
"The 2nd arguments in %s can not be an array (%s,%d)!",
 
  719                  Error(
"DefinedVariable",
 
  720                        "The 2nd arguments in %s has to return the same type as the 1st argument (string)!",
 
  726               Error(
"DefinedVariable",
 
  727                     "The 2nd arguments in %s has to return the same type as the 1st argument (numerical type)!",
 
  736                  Error(
"DefinedVariable",
 
  737                        "The arguments of %s can not be strings!",
 
  768   Int_t numberOfVarDim = 0;
 
  771   char  scratch[
kMaxLen]; scratch[0] = 
'\0';
 
  772   char     work[
kMaxLen];    work[0] = 
'\0';
 
  774   const char *right = subExpression;
 
  779   if (readentry < 0) readentry=0;
 
  781   Bool_t useLeafReferenceObject = 
false;
 
  785   if (leaf && leaf->IsA()==TLeafElement::Class()) {
 
  787      if( branch->IsA() ==  TBranchElement::Class() )
 
  792            Error(
"DefinedVariable",
"Missing StreamerInfo for %s.  We will be unable to read!",
 
  799      if( bmom->IsA() == TBranchElement::Class() )
 
  804               Error(
"DefinedVariable",
"Missing StreamerInfo for %s." 
  805                     "  We will be unable to read!",
 
  810               Error(
"DefinedVariable", 
"Address not set when the type of the branch is negative for for %s.  We will be unable to read!", mom->
GetName());
 
  823   const char* alias = 0;
 
  826      if (!alias && realtree!=
fTree) {
 
  834   TTree *tleaf = realtree;
 
  841         if (mother_name[strlen(mother_name)-1]!=
'.') {
 
  842            br_extended_name = mother_name;
 
  843            br_extended_name.
Append(
'.');
 
  848      if (dim >= 0) br_extended_name.
Remove(dim);
 
  877      cl = 
what ? 
what->IsA() : TTree::Class();
 
  936                       "Missing TStreamerElement in object in TClonesArray section");
 
  947            maininfo = clonesinfo;
 
  966            maininfo->
fNext = previnfo;
 
  967            unwindCollection = 
kTRUE;
 
  969         } 
else if (branchEl->
GetType()==41) {
 
  974               Warning(
"DefinedVariable",
"Missing TStreamerElement in object in Collection section");
 
  980            if ( count->
GetID() >= 0 ) {
 
  999            maininfo = collectioninfo;
 
 1018            maininfo->
fNext = previnfo;
 
 1019            unwindCollection = 
kTRUE;
 
 1021      } 
else if ( branchEl->
GetType()==3) {
 
 1023         if (useLeafCollectionObject) {
 
 1028            numberOfVarDim += 
RegisterDimensions(code,clonesinfo,maininfo,useLeafCollectionObject);
 
 1031         maininfo = clonesinfo;
 
 1032         previnfo = maininfo;
 
 1034      } 
else if (!useLeafCollectionObject && branchEl->
GetType()==4) {
 
 1037         if (useLeafCollectionObject) {
 
 1042            numberOfVarDim += 
RegisterDimensions(code,collectioninfo,maininfo,useLeafCollectionObject);
 
 1045         maininfo = collectioninfo;
 
 1046         previnfo = maininfo;
 
 1050         if (useLeafCollectionObject) {
 
 1053            maininfo = collectioninfo;
 
 1054            previnfo = collectioninfo;
 
 1061            maininfo = collectioninfo;
 
 1062            previnfo = collectioninfo;
 
 1072               previnfo->
fNext = multi;
 
 1075               previnfo = multi->
fNext;
 
 1083               previnfo = previnfo->
fNext;
 
 1089      } 
else if (strlen(right)==0 && cl && element && 
final) {
 
 1092         if (!useLeafCollectionObject
 
 1103            maininfo = collectioninfo;
 
 1104            previnfo = collectioninfo;
 
 1113            previnfo->
fNext = multi;
 
 1116            previnfo = multi->
fNext;
 
 1123               previnfo = previnfo->
fNext;
 
 1126         } 
else if (!useLeafCollectionObject
 
 1142            collectioninfo->
fNext =
 
 1145            maininfo = collectioninfo;
 
 1146            previnfo = maininfo->
fNext;
 
 1148         }  
else if (!useLeafCollectionObject
 
 1159            previnfo = maininfo;
 
 1164         if ( useLeafCollectionObject || fullExpression[0] == 
'@' || fullExpression[strlen(scratch)] == 
'@' ) {
 
 1165            useLeafReferenceObject = 
true;
 
 1182               Error(
"DefinedVariable",
"Failed to access class type of reference target (%s)",element->
GetName());
 
 1189      if (subExpression && subExpression[0]) {
 
 1190        Error(
"ParseWithLeaf", 
"Found a numerical leaf but the name has trailing characters: \"%s\"", subExpression);
 
 1199      if (unwindCollection) {
 
 1202         R__ASSERT(numberOfVarDim==1 && maininfo);
 
 1209            previnfo->
fNext = multi;
 
 1212            previnfo = multi->
fNext;
 
 1219               previnfo = previnfo->
fNext;
 
 1221         } 
else if (!useLeafCollectionObject && cl == TClonesArray::Class()) {
 
 1227            previnfo->
fNext = multi;
 
 1230            previnfo = multi->
fNext;
 
 1234      if (cl == TString::Class() && strcmp(right,
"fData")==0) {
 
 1239      Int_t nchname = strlen(right);
 
 1252         if (casted && cl != TClonesArray::Class()) {
 
 1254               Error(
"DefinedVariable",
"%s does not inherit from %s.  Casting not possible!",
 
 1261               maininfo = leafinfo;
 
 1264               previnfo = leafinfo;
 
 1266               previnfo->
fNext = leafinfo;
 
 1267               previnfo = leafinfo;
 
 1272            castqueue.
AddAt(0,paran_level);
 
 1276      Bool_t prevUseCollectionObject = useLeafCollectionObject;
 
 1277      Bool_t useCollectionObject = useLeafCollectionObject;
 
 1278      Bool_t useReferenceObject = useLeafReferenceObject;
 
 1279      Bool_t prevUseReferenceObject = useLeafReferenceObject;
 
 1280      for (i=0, current = &(work[0]); i<=nchname;i++ ) {
 
 1282         if (right[i] == 
'(') {
 
 1285               *current++ = right[i++];
 
 1286            } 
while(right[i]!=
')' && right[i]);
 
 1287            *current++ = right[i];
 
 1289            char *params = strchr(work,
'(');
 
 1291               *params = 0; params++;
 
 1292            } 
else params = (
char *) 
")";
 
 1294               Error(
"DefinedVariable",
"Can not call '%s' with a class",work);
 
 1298               Error(
"DefinedVariable",
"Class probably unavailable:%s",cl->
GetName());
 
 1301            if (!useCollectionObject && cl == TClonesArray::Class()) {
 
 1314                  if (leaf->IsA()==TLeafObject::Class()) {
 
 1325                  previnfo = clonesinfo;
 
 1326                  maininfo = clonesinfo;
 
 1346                  if (leaf->IsA()==TLeafObject::Class()) {
 
 1358                  previnfo = collectioninfo;
 
 1359                  maininfo = collectioninfo;
 
 1364               if (inside_cl) cl = inside_cl;
 
 1366                  Warning(
"DefinedVariable",
"Can not call method on content of %s in %s\n",
 
 1373               Error(
"DefinedVariable",
 
 1374                     "Could not discover the TClass corresponding to (%s)!",
 
 1377            } 
else if (cl==TClonesArray::Class() && strcmp(work,
"size")==0) {
 
 1378               method = 
new TMethodCall(cl, 
"GetEntriesFast", 
"");
 
 1382                  if (useLeafCollectionObject) {
 
 1388                  maininfo=previnfo=collectioninfo;
 
 1394                  Error(
"DefinedVariable",
 
 1395                        "Can not call method %s on class without dictionary (%s)!",
 
 1403                  Error(
"DefinedVariable",
"Unknown method:%s in %s",right,cl->
GetName());
 
 1428                     Error(
"DefineVariable",
"Method %s from %s has an impossible return type %d",
 
 1434               maininfo = leafinfo;
 
 1437               previnfo = leafinfo;
 
 1439               previnfo->
fNext = leafinfo;
 
 1440               previnfo = leafinfo;
 
 1443            current = &(work[0]);
 
 1445            prevUseCollectionObject = 
kFALSE;
 
 1446            prevUseReferenceObject = 
kFALSE;
 
 1447            useCollectionObject = 
kFALSE;
 
 1450               if (numberOfVarDim>1) {
 
 1451                  Warning(
"DefinedVariable",
"TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection %s.",
 
 1454                  useCollectionObject = 
kTRUE;
 
 1455               } 
else if (numberOfVarDim==0) {
 
 1459               } 
else if (numberOfVarDim==1) {
 
 1464                  previnfo->
fNext = leafinfo;
 
 1465                  previnfo = leafinfo;
 
 1471               previnfo->
fNext = leafinfo;
 
 1472               previnfo = leafinfo;
 
 1476         } 
else if (right[i] == 
')') {
 
 1479            TClass * casted = (
TClass*) ((
int(--paran_level)>=0) ? castqueue.
At(paran_level) : 0);
 
 1485                  maininfo = leafinfo;
 
 1488                  previnfo = leafinfo;
 
 1490                  previnfo->
fNext = leafinfo;
 
 1491                  previnfo = leafinfo;
 
 1494               current = &(work[0]);
 
 1501         } 
else if (i > 0 && (right[i] == 
'.' || right[i] == 
'[' || right[i] == 
'\0') ) {
 
 1508            if (strlen(work)==0) 
continue;
 
 1510            prevUseCollectionObject = useCollectionObject;
 
 1511            prevUseReferenceObject = useReferenceObject;
 
 1513               useReferenceObject = 
kTRUE;
 
 1514               useCollectionObject = 
kTRUE;
 
 1516               for(
l=0;work[
l+1]!=0;++
l) work[
l] = work[
l+1];
 
 1518            } 
else if (work[strlen(work)-1]==
'@') {
 
 1519               useReferenceObject = 
kTRUE;
 
 1520               useCollectionObject = 
kTRUE;
 
 1521               work[strlen(work)-1] = 
'\0';
 
 1523               useReferenceObject = 
kFALSE;
 
 1524               useCollectionObject = 
kFALSE;
 
 1535                  prevUseReferenceObject = 
kFALSE;
 
 1538                  previnfo = previnfo->
fNext;
 
 1542               for(
Long64_t entry=0; entry<leaf->
GetBranch()->GetEntries()-readentry; ++entry)  {
 
 1553            else if (!prevUseCollectionObject && cl == TClonesArray::Class()) {
 
 1568                  if (leaf->IsA()==TLeafObject::Class()) {
 
 1580                  previnfo = clonesinfo;
 
 1581                  maininfo = clonesinfo;
 
 1584                     if (clbranch->IsA() != TBranchElement::Class()) {
 
 1585                        Error(
"DefinedVariable",
"Unimplemented usage of ClonesArray");
 
 1596                          "TClonesArray object was not retrievable for %s!",
 
 1605               if (1 || inside_cl) cl = inside_cl;
 
 1607               if (0 && strlen(work)==0) {
 
 1628                  if (leaf->IsA()==TLeafObject::Class()) {
 
 1641                  previnfo = collectioninfo;
 
 1642                  maininfo = collectioninfo;
 
 1651                  Error(
"DefinedVariable",
"Could you not find the inner class for %s with coll type = %d",
 
 1655                  Warning(
"DefinedVariable",
"No data member in content of %s in %s\n",
 
 1664               Warning(
"DefinedVariable",
"Missing class for %s!",
name.Data());
 
 1669            if (!element && !prevUseCollectionObject) {
 
 1676                     Int_t clones_offset = 0;
 
 1684                        previnfo->
fNext = clonesinfo;
 
 1686                        previnfo->
fNext = 0;
 
 1698                        if (maininfo==0) maininfo = leafinfo;
 
 1699                        if (previnfo==0) previnfo = leafinfo;
 
 1701                           previnfo->
fNext = leafinfo;
 
 1702                           previnfo = leafinfo;
 
 1710                     Int_t coll_offset = 0;
 
 1719                        if (numberOfVarDim>1) {
 
 1720                           Warning(
"DefinedVariable",
"TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection %s.",
 
 1723                           useCollectionObject = 
kTRUE;
 
 1724                        } 
else if (numberOfVarDim==1) {
 
 1736                        if (maininfo==0) maininfo = leafinfo;
 
 1737                        if (previnfo==0) previnfo = leafinfo;
 
 1739                           previnfo->
fNext = leafinfo;
 
 1740                           previnfo = leafinfo;
 
 1742                        if (leafinfo->
fNext) {
 
 1743                           previnfo = leafinfo->
fNext;
 
 1758                  if (numberOfVarDim>=1 && 
type>40) {
 
 1763                     if (leafinfo && 
type<=40 ) {
 
 1803                        Error(
"DefinedVariable",
 
 1804                              "%s is a datamember of %s BUT is not yet of a supported type (%d)",
 
 1809                        Error(
"DefinedVariable",
 
 1810                              "%s is a datamember of %s BUT is not of a unknown type (%d)",
 
 1815                  if (
object && !useCollectionObject &&
 
 1821                  if (
object && leafinfo) {
 
 1823                  } 
else if (objarr) {
 
 1829                     if (!useCollectionObject && element->
GetClassPointer() ==  TClonesArray::Class()) {
 
 1838                        if (numberOfVarDim>1) {
 
 1839                           Warning(
"DefinedVariable",
"TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection %s.",
 
 1842                           useCollectionObject = 
kTRUE;
 
 1843                        } 
else if (numberOfVarDim==1) {
 
 1863                              else leafinfo->
fNext = info;
 
 1870                           if (!maininfo) maininfo = leafinfo;
 
 1875                              if (previnfo==0) previnfo = leafinfo;
 
 1877                                 previnfo->
fNext = leafinfo;
 
 1878                                 previnfo = leafinfo;
 
 1893                              else leafinfo->
fNext = info;
 
 1909                        prevUseReferenceObject = 
kFALSE;
 
 1912                     } 
else if (pointer) {
 
 1924               if (cl) 
Error(
"DefinedVariable",
"%s is not a datamember of %s",work,cl->
GetName());
 
 1931               maininfo = leafinfo;
 
 1934               previnfo = leafinfo;
 
 1935            } 
else if (previnfo!=leafinfo) {
 
 1936               previnfo->
fNext = leafinfo;
 
 1937               previnfo = leafinfo;
 
 1939            while (previnfo->
fNext) previnfo = previnfo->
fNext;
 
 1941            if ( right[i] != 
'\0' )  {
 
 1942               if ( !needClass && mustderef )   {
 
 1948                        if ( inf->IsReference() )  {
 
 1959                        Error(
"DefinedVariable",
"Failed to access class type of reference target (%s)",element->
GetName());
 
 1965                     Error(
"DefinedVariable",
"Failed to access class type of reference target (%s)",element->
GetName());
 
 1969               else if ( needClass )  {
 
 1973            if (mustderef) leafinfo = 0;
 
 1974            current = &(work[0]);
 
 1978            if (cl == TString::Class() && strcmp(right+i+1,
"fData") == 0) {
 
 1983               nchname = strlen(right);
 
 1987            *current++ = right[i];
 
 1996   if (strlen(work)!=0) {
 
 2008         if (!last) 
return action;
 
 2012      if (last && last->
GetClass() != objClass) {
 
 2014         if (leaf->IsA()==TLeafObject::Class()) {
 
 2024         last->
fNext = collectioninfo;
 
 2029   if (
IsLeafString(code) || objClass == TString::Class() || objClass == stdStringClass) {
 
 2036         if (!last) 
return action;
 
 2040      const char *funcname = 0;
 
 2041      if (objClass == TString::Class()) {
 
 2044      } 
else if (objClass == stdStringClass) {
 
 2087      method = 
new TMethodCall(objClass, 
"AsString", 
"");
 
 2116         if ((rcl == TString::Class() || rcl == stdStringClass) ) {
 
 2140            const char *funcname = 0;
 
 2141            if (objClass == TString::Class()) {
 
 2143            } 
else if (objClass == stdStringClass) {
 
 2183   if (readentry < 0) readentry=0;
 
 2184   const char *cname = expression;
 
 2186   char   second[
kMaxLen*2]; second[0] = 
'\0';
 
 2187   char    right[
kMaxLen*2];  right[0] = 
'\0';
 
 2188   char     work[
kMaxLen];     work[0] = 
'\0';
 
 2189   char     left[
kMaxLen];     left[0] = 
'\0';
 
 2192   std::string currentname;
 
 2193   Int_t previousdot = 0;
 
 2196   TBranch *branch=0, *tmp_branch=0;
 
 2197   Int_t nchname = strlen(cname);
 
 2202   for (i=0, current = &(work[0]); i<=nchname && !
final;i++ ) {
 
 2204      *current++ = cname[i];
 
 2206      if (cname[i] == 
'(') {
 
 2209         if (current==work+1) {
 
 2212            startWithParan = 
kTRUE;
 
 2224      if (cname[i] == 
')') {
 
 2225         if (paran_level==0) {
 
 2226            Error(
"DefinedVariable",
"Unmatched parenthesis in %s",fullExpression);
 
 2231         if (startWithParan) {
 
 2241               current = &(work[0]);
 
 2245            } 
else if (
gROOT->GetType(cast_name)) {
 
 2247               current = &(work[0]);
 
 2250                       "Casting to primary types like \"%s\" is not supported yet",cast_name.
Data());
 
 2257         char *params = strchr(work,
'(');
 
 2259            *params = 0; params++;
 
 2261            if (branch && !leaf) {
 
 2273            while (!leaf && (leafcur = (
TLeaf*) next())) {
 
 2283               if (strlen(left) && left[strlen(left)-1]==
'.') left[strlen(left)-1]=0;
 
 2285               if (aliasValue && strcspn(aliasValue,
"+*/-%&!=<>|")==strlen(aliasValue)) {
 
 2288                  if (find(aliasUsed.begin(),
 
 2290                     left) != aliasUsed.end()) {
 
 2291                        Error(
"DefinedVariable",
 
 2292                           "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
 
 2293                           "\tbecause \"%s\" is used [recursively] in its own definition!",
 
 2294                           left,aliasValue,fullExpression,left);
 
 2297                  aliasUsed.push_back(left);
 
 2298                  TString newExpression = aliasValue;
 
 2299                  newExpression += (cname+strlen(left));
 
 2301                     castqueue, aliasUsed, useLeafCollectionObject, fullExpression);
 
 2303                     Error(
"DefinedVariable",
 
 2304                        "The substitution of the alias \"%s\" by \"%s\" failed.",left,aliasValue);
 
 2321            strlcpy(right,work,2*
kMaxLen);
 
 2322            strncat(right,
"(",2*
kMaxLen-1-strlen(right));
 
 2323            strncat(right,params,2*
kMaxLen-1-strlen(right));
 
 2327            i += strlen(params);
 
 2330            current = &(work[0]);
 
 2335      if (cname[i] == 
'.' || cname[i] == 
'\0' || cname[i] == 
')') {
 
 2340         Int_t len = strlen(work);
 
 2342            foundAtSign = 
kTRUE;
 
 2344            for(
l=0;work[
l+1]!=0;++
l) work[
l] = work[
l+1];
 
 2347         } 
else if (len>=2 && work[len-2]==
'@') {
 
 2348            foundAtSign = 
kTRUE;
 
 2349            work[len-2] = cname[i];
 
 2356         if (left[0]==0) strlcpy(left,work,
kMaxLen);
 
 2357         if (!leaf && !branch) {
 
 2361            std::string treename(
first);
 
 2362            if (treename.size() && treename[treename.size()-1]==
'.') {
 
 2363               treename.erase(treename.size()-1);
 
 2365            if (treename== 
"This"  ) {
 
 2370               if (cname[i]) leftover = &(cname[i+1]);
 
 2406            if ( branch && branch->
InheritsFrom(TBranchElement::Class()) ) {
 
 2416               useLeafCollectionObject = foundAtSign;
 
 2418               current = &(work[0]);
 
 2421            else if (branch && (foundAtSign || cname[i] != 0)  ) {
 
 2435                           useLeafCollectionObject = foundAtSign;
 
 2437                           current = &(work[0]);
 
 2447               useLeafCollectionObject = foundAtSign;
 
 2449               current = &(work[0]);
 
 2451            } 
else if (leaf || branch) {
 
 2452               if (leaf && branch) {
 
 2466               current = &(work[0]);
 
 2479                     if (foundAtSign) strncat(right,
"@",2*
kMaxLen-1-strlen(right));
 
 2480                     if (cname[i]==
'.') strncat(right,
".",2*
kMaxLen-1-strlen(right));
 
 2483                     current = &(work[0]);
 
 2486               } 
else if (cname[i] == 
'.') {
 
 2493                  while(!branch && (branchcur=(
TBranch*)next()) ) {
 
 2498                     current = &(work[0]);
 
 2505               Error(
"DefinedVariable", 
"Unexpected control flow!");
 
 2511            if (cname[i]) work[strlen(work)-1] = 
'\0';
 
 2513            snprintf(scratch2,
sizeof(scratch2),
"%s.%s.%s",
first,second,work);
 
 2516               currentname = &(work[previousdot+1]);
 
 2523               if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch);
 
 2524               if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch2);
 
 2525               if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(currentname.c_str());
 
 2535               if (!tmp_branch) tmp_branch = branch->
FindBranch(scratch);
 
 2536               if (!tmp_branch) tmp_branch = branch->
FindBranch(scratch2);
 
 2537               if (!tmp_branch) tmp_branch = branch->
FindBranch(currentname.c_str());
 
 2545                  if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch);
 
 2546                  if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(scratch2);
 
 2547                  if (!tmp_leaf)  tmp_leaf = branch->
FindLeaf(currentname.c_str());
 
 2558               if (second[0]) strncat(second,
".",2*
kMaxLen-1-strlen(second));
 
 2559               strncat(second,work,2*
kMaxLen-1-strlen(second));
 
 2561               useLeafCollectionObject = foundAtSign;
 
 2565               current = &(work[0]);
 
 2571                     Int_t where = strlen(work);
 
 2573                     work[where+1] = cname[i];
 
 2575                     previousdot = where+1;
 
 2577                     previousdot = strlen(work);
 
 2578                     work[strlen(work)] = cname[i];
 
 2588      strncat(right,work,2*
kMaxLen-1-strlen(right));
 
 2592      if (strlen(right) && right[strlen(right)-1]!=
'.' && cname[i]!=
'.') {
 
 2596         strncat(right,
".",2*
kMaxLen-1-strlen(right));
 
 2598      strncat(right,&cname[i],2*
kMaxLen-1-strlen(right));
 
 2601   if (!
final && branch) {
 
 2604         if (!leaf) 
return -1;
 
 2609   if (leaf && leaf->
InheritsFrom(TLeafObject::Class()) ) {
 
 2610      if (strlen(right)==0) strlcpy(right,work,2*
kMaxLen);
 
 2613   if (leaf==0 && left[0]!=0) {
 
 2614      if (left[strlen(left)-1]==
'.') left[strlen(left)-1]=0;
 
 2618      if (aliasValue && strcspn(aliasValue,
"()[]+*/-%&!=<>|")==strlen(aliasValue)) {
 
 2621         if (find(aliasUsed.begin(),
 
 2623                  left) != aliasUsed.end()) {
 
 2624            Error(
"DefinedVariable",
 
 2625                  "The substitution of the branch alias \"%s\" by \"%s\" in \"%s\" failed\n"\
 
 2626                  "\tbecause \"%s\" is used [recursively] in its own definition!",
 
 2627                  left,aliasValue,fullExpression,left);
 
 2630         aliasUsed.push_back(left);
 
 2631         TString newExpression = aliasValue;
 
 2632         newExpression += (cname+strlen(left));
 
 2634                                           castqueue, aliasUsed, useLeafCollectionObject, fullExpression);
 
 2636            Error(
"DefinedVariable",
 
 2637                  "The substitution of the alias \"%s\" by \"%s\" failed.",left,aliasValue);
 
 2688   if (!
fTree) 
return -1;
 
 2694   if (
name == 
"Entry$") {
 
 2700   if (
name == 
"LocalEntry$") {
 
 2706   if (
name == 
"Entries$") {
 
 2714   if (
name == 
"LocalEntries$") {
 
 2722   if (
name == 
"Iteration$") {
 
 2728   if (
name == 
"Length$") {
 
 2734   static const char *
lenfunc = 
"Length$(";
 
 2735   if (strncmp(
name.Data(),
"Length$(",strlen(
lenfunc))==0
 
 2747   static const char *minfunc = 
"Min$(";
 
 2748   if (strncmp(
name.Data(),
"Min$(",strlen(minfunc))==0
 
 2760   static const char *maxfunc = 
"Max$(";
 
 2761   if (strncmp(
name.Data(),
"Max$(",strlen(maxfunc))==0
 
 2773   static const char *sumfunc = 
"Sum$(";
 
 2774   if (strncmp(
name.Data(),
"Sum$(",strlen(sumfunc))==0
 
 2793      if (res<0) 
return res;
 
 2801   char     dims[
kMaxLen];   dims[0] = 
'\0';
 
 2809   Int_t cnamelen = strlen(cname);
 
 2810   for(i=0,k=0; i<cnamelen; ++i, ++k) {
 
 2811      if (cname[i] == 
'[') {
 
 2813         int bracket_level = 1;
 
 2815         for (j=++i; j<cnamelen && (bracket_level>0 || cname[j]==
'['); j++, i++) {
 
 2816            if (cname[j]==
'[') bracket_level++;
 
 2817            else if (cname[j]==
']') bracket_level--;
 
 2819         if (bracket_level != 0) {
 
 2823         strncat(dims,&cname[bracket],j-bracket);
 
 2826      if (i!=k) cname[k] = cname[i];
 
 2835      res = 
FindLeafForExpression(cname, leaf, leftover, 
final, paran_level, castqueue, aliasSofar, useLeafCollectionObject, 
name);
 
 2837   if (res<0) 
return res;
 
 2839   if (!leaf && res!=2) {
 
 2848            Error(
"DefinedVariable",
 
 2849                  "The substitution of the alias \"%s\" by \"%s\" failed\n"\
 
 2850                  "\tbecause \"%s\" is recursively used in its own definition!",
 
 2851                  cname,aliasValue,cname);
 
 2856         if (strcspn(aliasValue,
"()+*/-%&!=<>|")!=strlen(aliasValue)) {
 
 2862            aliasSofar.push_back( cname );
 
 2864            TString subValue( aliasValue );
 
 2873               Error(
"DefinedVariable",
 
 2874                     "The substitution of the alias \"%s\" by \"%s\" failed.",cname,aliasValue);
 
 2889            TString thisAlias( aliasValue );
 
 2897                  Error(
"Compile", 
" Bad numerical expression : \"%s\"",thisAlias.
Data());
 
 2898               } 
else if (aliasRes==-2) {
 
 2899                  Error(
"Compile", 
" Part of the Variable \"%s\" exists but some of it is not accessible or useable",thisAlias.
Data());
 
 2902               Error(
"DefinedVariable",
 
 2903                     "The substitution of the alias \"%s\" by \"%s\" failed.",cname,aliasValue);
 
 2912   if (leaf || res==2) {
 
 2915         Error(
"DefinedVariable",
"the branch \"%s\" has to be enabled to be used",leaf->
GetBranch()->
GetName());
 
 2924         char *current = &( dims[0] );
 
 2931            if (current[0] == 
']') {
 
 2934               scanindex = sscanf(current,
"%d",&index);
 
 2940                  char *end = (
char*)(varindex.
Data());
 
 2941                  for(
char bracket_level = 0;*end!=0;end++) {
 
 2942                     if (*end==
'[') bracket_level++;
 
 2943                     if (bracket_level==0 && *end==
']') 
break;
 
 2944                     if (*end==
']') bracket_level--;
 
 2954                  current += strlen(varindex)+1; 
 
 2962            current = (
char*)strstr( current, 
"[" );
 
 2969      res = 
ParseWithLeaf(leaf,leftover,
final,paran_level,castqueue,useLeafCollectionObject,
name);
 
 2970      if (res<0) 
return res;
 
 2971      if (res>0) action = res;
 
 2999      } 
else if (strlen(gcut->
GetVarX())) {
 
 3008         for(
Int_t i2 = 1; i2<
n; i2++) {
 
 3009            if (
x[i2] < min) min = 
x[i2];
 
 3010            if (
x[i2] > max) max = 
x[i2];
 
 3029         Error(
"DefinedVariable",
"Found a TCutG without leaf information (%s)",
 
 3066   while ((leafcur = (
TLeaf*)nextleaf())) {
 
 3094      if (clonesinfo) { 
delete clonesinfo; clonesinfo = 0; }
 
 3095      if (cl ==  TClonesArray::Class()) {
 
 3103         if  (   branch->IsA()==TBranchElement::Class()
 
 3118         if (clones) cl = clones->
GetClass();
 
 3126         if  (   branch->IsA()==TBranchElement::Class()
 
 3160                     leafinfo = clonesinfo;
 
 3161                  } 
else if (branch->IsA()==TBranchElement::Class()
 
 3172                  Int_t clones_offset = 0;
 
 3177                     else leafinfo->
fNext = sub_clonesinfo;
 
 3178                  else leafinfo = sub_clonesinfo;
 
 3184                  delete leafinfo; clonesinfo = 0;
 
 3189                  if (!clones) 
continue;
 
 3245   } 
else if (branch->
InheritsFrom(TBranchElement::Class())) {
 
 3250      } 
else if (
type > 60) {
 
 3260         if ((cl == TClonesArray::Class()) && (branchEl->
GetType() == 31)) {
 
 3270   if (cl == TClonesArray::Class()) {
 
 3279      } 
else if (branch->
InheritsFrom(TBranchElement::Class())) {
 
 3309         Error(
"BranchHasMethod",
"A TClonesArray was stored in a branch type no yet support (i.e. neither TBranchObject nor TBranchElement): %s",branch->IsA()->
GetName());
 
 3312      cl = clones ? clones->
GetClass() : 0;
 
 3346      Int_t real_instance = 0;
 
 3381                  if (local_index<0) {
 
 3382                     Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
 
 3389               real_instance = local_index * 
fCumulSizes[codeindex][1];
 
 3414               if (local_index<0) {
 
 3415                  Error(
"EvalInstance",
"Index %s is out of bound (%d) in formula %s",
 
 3435                     if (check) 
return fNdata[0]+1;
 
 3440                     } 
while( instance >= virt_accum && local_index<maxloop);
 
 3446                     if (local_index==(maxloop-1) && (instance >= virt_accum)) {
 
 3448                        if (check) 
return fNdata[0]+1;
 
 3454                           if (check) 
return fNdata[0]+1;
 
 3462               local_index = 
fIndexes[codeindex][0];
 
 3489               if (
fIndexes[codeindex][vdim]>=0) {
 
 3492               if  (isize!=1 && 
fIndexes[codeindex][vdim]>isize) {
 
 3497               for(
Int_t k=vdim -1; k>0; --k) {
 
 3501               real_instance = local_index * 
fCumulSizes[codeindex][1];
 
 3505            for (
Int_t dim = 1; dim < max_dim; dim++) {
 
 3516                  if (
fIndexes[codeindex][dim]==-2) {
 
 3523                     if (local_index<0 ||
 
 3525                        Error(
"EvalInstance",
"Index %s is out of bound (%d/%d) in formula %s",
 
 3533                  real_instance += local_index * 
fCumulSizes[codeindex][dim+1];
 
 3537            if (
fIndexes[codeindex][max_dim]>=0) {
 
 3538               if (!info) real_instance += 
fIndexes[codeindex][max_dim];
 
 3544                  local_index = instance;
 
 3546               if (info && local_index>=
fCumulSizes[codeindex][max_dim]) {
 
 3550               if (
fIndexes[codeindex][max_dim]==-2) {
 
 3556                  if (local_index<0 ||
 
 3558                     Error(
"EvalInstance",
"Index %s is of out bound (%d/%d) in formula %s",
 
 3566               real_instance += local_index;
 
 3571      return real_instance;
 
 3598         if (leaf->IsA()==TLeafObject::Class()) {
 
 3600         } 
else if ( leaf->IsA()==TLeafElement::Class()) {
 
 3669   else if (real_instance>=
fNdata[0]) 
return 0;
 
 3675         if (real_instance) {
 
 3676            Warning(
"EvalObject",
"Not yet implement for kDirect and arrays (for %s).\nPlease contact the developers",
GetName());
 
 3695   const Int_t kMAXSTRINGFOUND = 10;
 
 3696   const char *stringStack[kMAXSTRINGFOUND];
 
 3707      } 
else if (real_instance>=
fNdata[0]) {
 
 3720   return stringStack[0];
 
 3723#define TT_EVAL_INIT                                                                            \ 
 3724   TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(0);                                                \ 
 3726   const Int_t real_instance = GetRealInstance(instance,0);                                     \ 
 3728   if (instance==0) fNeedLoading = kTRUE;                                                       \ 
 3729   if (real_instance>=fNdata[0]) return 0;                                                       \ 
 3735   if (fNeedLoading) {                                                                          \ 
 3736      fNeedLoading = kFALSE;                                                                    \ 
 3737      TBranch *br = leaf->GetBranch();                                                          \ 
 3738      Long64_t tentry = br->GetTree()->GetReadEntry();                                          \ 
 3739      R__LoadBranch(br,tentry,fQuickLoad);                                                      \ 
 3746      if (fLookupType[0]==kDirect) {                                                            \ 
 3747         label = (char*)leaf->GetValuePointer();                                                \ 
 3749         label = (char*)GetLeafInfo(0)->GetValuePointer(leaf,instance);                         \ 
 3751      Int_t bin = fAxis->FindBin(label);                                                        \ 
 3755#define TREE_EVAL_INIT                                                                          \ 
 3756   const Int_t real_instance = GetRealInstance(instance,0);                                     \ 
 3758   if (real_instance>=fNdata[0]) return 0;                                                      \ 
 3764      label = (char*)GetLeafInfo(0)->GetValuePointer((TLeaf*)0x0,instance);                     \ 
 3765      Int_t bin = fAxis->FindBin(label);                                                        \ 
 3769#define TT_EVAL_INIT_LOOP                                                                       \ 
 3770   TLeaf *leaf = (TLeaf*)fLeaves.UncheckedAt(code);                                             \ 
 3773   const Int_t real_instance = GetRealInstance(instance,code);                                  \ 
 3776      TBranch *branch = (TBranch*)fBranches.UncheckedAt(code);                                  \ 
 3778         Long64_t treeEntry = branch->GetTree()->GetReadEntry();                                \ 
 3779         R__LoadBranch(branch,treeEntry,fQuickLoad);                                            \ 
 3780      } else if (fDidBooleanOptimization) {                                                     \ 
 3781         branch = leaf->GetBranch();                                                            \ 
 3782         Long64_t treeEntry = branch->GetTree()->GetReadEntry();                                \ 
 3783         if (branch->GetReadEntry() != treeEntry) branch->GetEntry( treeEntry );                \ 
 3789      if (fDidBooleanOptimization) {                                                            \ 
 3790         TBranch *br = leaf->GetBranch();                                                       \ 
 3791         Long64_t treeEntry = br->GetTree()->GetReadEntry();                                    \ 
 3792         if (br->GetReadEntry() != treeEntry) br->GetEntry( treeEntry );                        \ 
 3795   if (real_instance>=fNdata[code]) return 0; 
 3797#define TREE_EVAL_INIT_LOOP                                                                     \ 
 3799   const Int_t real_instance = GetRealInstance(instance,code);                                  \ 
 3801   if (real_instance>=fNdata[code]) return 0; 
 3807   for (
int i=0; i<len; ++i) res += 
sum->EvalInstance<T>(i);
 
 3816      for (
int i=1; i<len; ++i) {
 
 3831      for (
int i=1; i<len; ++i) {
 
 3850      } 
while (!condval && i<len);
 
 3851      if (!condval && i==len) {
 
 3860      for (; i<len; ++i) {
 
 3882      } 
while (!condval && i<len);
 
 3883      if (!condval && i==len) {
 
 3892      for (; i<len; ++i) {
 
 3907template <
typename T> 
T fmod_local(T 
x, T 
y) { 
return fmod(
x,
y); }
 
 3924            if( !strncmp(
fExpr[op], 
"0x", 2) || !strncmp(
fExpr[op], 
"0X", 2) ) {
 
 3926               sscanf( 
fExpr[op], 
"%llx", &val );
 
 3952            return leaf->GetTypedValue<T>(real_instance);
 
 4010   const Int_t kMAXSTRINGFOUND = 10;
 
 4011   const char *stringStackLocal[kMAXSTRINGFOUND];
 
 4012   const char **stringStack = stringStackArg?stringStackArg:stringStackLocal;
 
 4028         if (newaction==
kConstant) { pos++; tab[pos-1] = GetConstant<T>(oper & 
kTFOperMask); 
continue; }
 
 4032            case kEnd        : 
return tab[0];
 
 4033            case kAdd        : pos--; tab[pos-1] += tab[pos]; 
continue;
 
 4034            case kSubstract  : pos--; tab[pos-1] -= tab[pos]; 
continue;
 
 4035            case kMultiply   : pos--; tab[pos-1] *= tab[pos]; 
continue;
 
 4036            case kDivide     : pos--; 
if (tab[pos] == 0) tab[pos-1] = 0; 
 
 4037                                      else               tab[pos-1] /= tab[pos];
 
 4042                                tab[pos-1] = 
T(int1 % int2);
 
 4062            case kacosh: 
if (tab[pos-1] < 1) {tab[pos-1] = 0;} 
 
 4071            case kfmod : pos--; tab[pos-1] = fmod_local(tab[pos-1],tab[pos]); 
continue;
 
 4072            case kpow  : pos--; tab[pos-1] = 
TMath::Power(tab[pos-1],tab[pos]); 
continue;
 
 4073            case ksq   : tab[pos-1] = tab[pos-1]*tab[pos-1]; 
continue;
 
 4076            case kstrstr : pos2 -= 2; pos++;
if (strstr(stringStack[pos2],stringStack[pos2+1])) tab[pos-1]=1;
 
 4080            case kmin : pos--; tab[pos-1] = std::min(tab[pos-1],tab[pos]); 
continue;
 
 4081            case kmax : pos--; tab[pos-1] = std::max(tab[pos-1],tab[pos]); 
continue;
 
 4083            case klog  : 
if (tab[pos-1] > 0) tab[pos-1] = 
TMath::Log(tab[pos-1]);
 
 4084                         else {tab[pos-1] = 0;} 
 
 4087                           if (dexp < -700) {tab[pos-1] = 0; 
continue;}
 
 4088                           if (dexp >  700) {tab[pos-1] = 
TMath::Exp(700); 
continue;}
 
 4092                         else {tab[pos-1] = 0;} 
 
 4098            case ksign : 
if (tab[pos-1] < 0) tab[pos-1] = -1; 
else tab[pos-1] = 1;
 
 4101            case kSignInv: tab[pos-1] = -1 * tab[pos-1]; 
continue;
 
 4104            case kAnd  : pos--; 
if (tab[pos-1]!=0 && tab[pos]!=0) tab[pos-1]=1;
 
 4107            case kOr   : pos--; 
if (tab[pos-1]!=0 || tab[pos]!=0) tab[pos-1]=1;
 
 4111            case kEqual      : pos--; tab[pos-1] = (tab[pos-1] == tab[pos]) ? 1 : 0; 
continue;
 
 4112            case kNotEqual   : pos--; tab[pos-1] = (tab[pos-1] != tab[pos]) ? 1 : 0; 
continue;
 
 4113            case kLess       : pos--; tab[pos-1] = (tab[pos-1] <  tab[pos]) ? 1 : 0; 
continue;
 
 4114            case kGreater    : pos--; tab[pos-1] = (tab[pos-1] >  tab[pos]) ? 1 : 0; 
continue;
 
 4115            case kLessThan   : pos--; tab[pos-1] = (tab[pos-1] <= tab[pos]) ? 1 : 0; 
continue;
 
 4116            case kGreaterThan: pos--; tab[pos-1] = (tab[pos-1] >= tab[pos]) ? 1 : 0; 
continue;
 
 4117            case kNot        :        tab[pos-1] = (tab[pos-1] !=        0) ? 0 : 1; 
continue;
 
 4119            case kStringEqual : pos2 -= 2; pos++; 
if (!strcmp(stringStack[pos2+1],stringStack[pos2])) tab[pos-1]=1;
 
 4122            case kStringNotEqual: pos2 -= 2; pos++;
if (strcmp(stringStack[pos2+1],stringStack[pos2])) tab[pos-1]=1;
 
 4147               pos2++; stringStack[pos2-1] = (
char*)
fExpr[i].Data();
 
 4161               int op = param % 10; 
 
 4163               if (op == 1 && (!tab[pos-1]) ) {
 
 4172               } 
else if (op == 2 && tab[pos-1] ) {
 
 4183                  int toskip = param / 10;
 
 4194               int fno   = param / 1000;
 
 4195               int nargs = param % 1000;
 
 4203                  UInt_t argloc = pos-nargs;
 
 4204                  for(
Int_t j=0;j<nargs;j++,argloc++,pos--) {
 
 4205                     SetMethodParam(method, tab[argloc]);
 
 4228            switch (lookupType) {
 
 4235               case kIteration:    tab[pos++] = instance; 
continue;
 
 4243                                          GetTypedValue<T>(leaf,real_instance); 
continue; }
 
 4245                                          GetTypedValue<T>((
TLeaf*)0x0,real_instance); 
continue; }
 
 4250               default: tab[pos++] = 0; 
continue;
 
 4263                  tab[pos++] = gcut->
IsInside(xcut,ycut);
 
 4292               tab[pos] = param; pos++;
 
 4310               T param = FindMin<T>(primary,condition);
 
 4312               tab[pos] = param; pos++;
 
 4319               T param = FindMax<T>(primary,condition);
 
 4321               tab[pos] = param; pos++;
 
 4331               if (instance < primary->
GetNdata()) {
 
 4337                  tab[pos] = param; pos++;
 
 4351               if (instance < primary->
GetNdata()) {
 
 4389                  if (real_instance>=
fNdata[string_code]) 
return 0;
 
 4411template double TTreeFormula::EvalInstance<double> (
int, 
char const**);
 
 4412template long double TTreeFormula::EvalInstance<long double> (
int, 
char const**);
 
 4413template long long TTreeFormula::EvalInstance<long long> (
int, 
char const**);
 
 4479            Warning(
"GetValueFromMethod", 
"No streamer info for branch %s.", branch->
GetName());
 
 4489            thisobj = *((
char**) (address + offset));
 
 4507      m->Execute(thisobj, 
d);
 
 4511   m->Execute(thisobj);
 
 4539            Warning(
"GetValuePointerFromMethod", 
"No streamer info for branch %s.", branch->
GetName());
 
 4549            thisobj = *((
char**) (address + offset));
 
 4567      m->Execute(thisobj, 
d);
 
 4573      m->Execute(thisobj, &
c);
 
 4577   m->Execute(thisobj);
 
 4732               if (indexname[strlen(indexname)-1] == 
'_' ) {
 
 4741         } 
else if (leaf->
InheritsFrom(TLeafElement::Class())) {
 
 4744            if (bid < 0) 
return kFALSE;
 
 4807   const int kMAXLENGTH = 1024;
 
 4808   static char value[kMAXLENGTH];
 
 4811      for (
int i = 0; i < kMAXLENGTH-1; i++)
 
 4813      value[kMAXLENGTH-1] = 0;
 
 4814   } 
else if (mode == -1) {
 
 4816   } 
else if (mode == 0) {
 
 4819         const char * val = 0;
 
 4822         } 
else if (instance<
fNdata[0]) {
 
 4834                     val = ((
TTreeFormula*)
this)->EvalStringInstance(instance);
 
 4838               val = ((
TTreeFormula*)
this)->EvalStringInstance(instance);
 
 4842            strlcpy(value, val, kMAXLENGTH);
 
 4846         value[kMAXLENGTH-1] = 0;
 
 4851         if (real_instance<
fNdata[0]) {
 
 4852            Ssiz_t len = strlen(decform);
 
 4853            Char_t outputSizeLevel = 1;
 
 4856               switch (decform[len-2]) {
 
 4859                     outputSizeLevel = 2;
 
 4860                     if (len>3 && tolower(decform[len-3])==
'l') {
 
 4861                        outputSizeLevel = 3;
 
 4865                  case 'h': outputSizeLevel = 0; 
break;
 
 4868            switch(decform[len-1]) {
 
 4873                  switch (outputSizeLevel) {
 
 4887                  switch (outputSizeLevel) {
 
 4902                  switch (outputSizeLevel) {
 
 4907                  expo = strchr(value,
'e');
 
 4912                  expo = strchr(value,
'e');
 
 4917               UInt_t declen = atoi(decform);
 
 4918               if (strlen(value)>declen) {
 
 4919                  UInt_t off = strlen(value)-declen;
 
 4920                  char *start = expo - off;
 
 4921                  UInt_t vlen = strlen(expo);
 
 4922                  for(
UInt_t z=0;z<=vlen;++z) {
 
 4929            if (isalpha(decform[strlen(decform)-1])) {
 
 4930               TString short_decform(decform);
 
 4953      for(
UInt_t dim=0; dim<max_dim ;++dim) {
 
 4963   for(
Int_t k=0; k <= 
n; ++k) {
 
 4986   if (!axis) {
fAxis = 0; 
return;}
 
 5076   for (
Int_t i=0;i<nleaves;i++) {
 
 5159   Int_t last_code = -1;
 
 5162      if (last_code!=info->fCode) {
 
 5167         last_code = info->fCode;
 
 5176         while(nextinfo && nextinfo->
fCode==info->fCode) {
 
 5180         if (!nextinfo) 
break;
 
 5184         last_code = info->fCode;
 
 5236         if (!gcut) 
continue;
 
 5266      if (!leaf) 
continue;
 
 5295         if (tleaf && tleaf != realtree && tleaf->
GetTreeIndex()) {
 
 5301      Int_t virt_dim2 = 0;
 
 5309         if ( 
fIndexes[i][k] < 0 ) virt_dim2++;
 
 5337   for (i=0; i<
fNoper ; ++i) {
 
 5339      if (leaf==0) 
continue;
 
 5349      for (
Int_t dim = 0; dim < max_dim; ++dim) {
 
 5363      if (
fCodes[i] < 0) 
continue;
 
 5384               outofbounds = 
kTRUE;
 
 5391      if (tleaf && tleaf != realtree && tleaf->
GetTreeIndex()) {
 
 5394            outofbounds = 
kTRUE;
 
 5405         if (leaf->IsA() == TLeafElement::Class()) {
 
 5409            if (readentry < 0) readentry=0;
 
 5416               branchcount->TBranch::GetEntry(readentry);
 
 5444               hasBranchCount2 = 
kTRUE;
 
 5451               for(
Int_t k=vdim -1; k>=0; k--) {
 
 5465            if (readentry < 0) readentry=0;
 
 5469         if (hasBranchCount2) {
 
 5497            outofbounds = 
kTRUE;
 
 5498         } 
else if (hasBranchCount2) {
 
 5506               outofbounds = 
kTRUE;
 
 5514            if (readentry < 0) readentry=0;
 
 5527               outofbounds = 
kTRUE;
 
 5539               hasBranchCount2 = 
kTRUE;
 
 5541                  for(
int z=0; z<
size; ++z) {
 
 5545                     } 
else if (
fIndexes[i][vdim] >= 0 ) {
 
 5555               for(
Int_t k=vdim -1; k>=0; k--) {
 
 5565            if (readentry < 0) readentry=0;
 
 5568               outofbounds = 
kTRUE;
 
 5584               if (
fManager->
fUsedSizes[virt_dim]==1 || (index_size!=1 && index_size<fManager->fUsedSizes[virt_dim]) )
 
 5591               if (index_size==1) {
 
 5595                     if (index_size<fManager->fUsedSizes[virt_dim]) 
fManager->
fUsedSizes[virt_dim] = index_size;
 
 5599                          index_size<fManager->fUsedSizes[virt_dim]) {
 
 5603            } 
else if (hasBranchCount2 && info && k==info->
GetVarDim()) {
 
 5607                  if (
fManager->
fUsedSizes[virt_dim]==1 || (index_size!=1 && index_size<fManager->fUsedSizes[virt_dim]) )
 
 5612         } 
else if (hasBranchCount2 && info && k==info->
GetVarDim()) {
 
 5625   return ! outofbounds;
 
 5635   enum { kOldAlias           =  100000+10000+1,
 
 5636          kOldAliasString     = kOldAlias+1,
 
 5637          kOldAlternate       = kOldAlias+2,
 
 5638          kOldAlternateString = kOldAliasString+2
 
 5641   for (
int k=0; k<
fNoper; k++) {
 
 5648         case kOldAlias:            
GetOper()[k] = -kOldAlias; 
break;
 
 5649         case kOldAliasString:      
GetOper()[k] = -kOldAliasString; 
break;
 
 5650         case kOldAlternate:        
GetOper()[k] = -kOldAlternate; 
break;
 
 5651         case kOldAlternateString:  
GetOper()[k] = -kOldAlternateString; 
break;
 
 5657   for (
int i=0,offset=0; i<
fNoper; i++) {
 
 5683   if (!leaf) 
return kFALSE;
 
 5697            last = clonesinfo->
fNext;
 
 5701         } 
else if (br->
GetType()==41) {
 
 5706            if ( count->
GetID() >= 0 ) {
 
 5725            last = collectioninfo->
fNext;
 
 5729         } 
else if (br->
GetID()<0) {
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
 
unsigned long long ULong64_t
 
const Int_t kDoNotProcess
 
R__EXTERN TRandom * gRandom
 
char * Form(const char *fmt,...)
 
void Execute(const TString &code)
Method to eval R code.
 
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.
 
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.
 
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
 
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)
 
TFormLeafInfoMultiVarDim * fMultiDim
 
Describe directory structure in memory.
 
virtual Bool_t cd()
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.
 
virtual TObject * FindObject(const char *name) const
Search object named name in the list of functions.
 
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
 
Describes a persistent version of a class.
 
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
 
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
 
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 uint64_t sum(uint64_t i)