448 case kchar:
return 0;
453 case kBits:
return 0;
475 fMethodBit = methodbit;
477 fPrevious = fTree->fFriendLockStatus & fMethodBit;
478 fTree->fFriendLockStatus |= fMethodBit;
489 fMethodBit(tfl.fMethodBit),
490 fPrevious(tfl.fPrevious)
514 fTree->fFriendLockStatus &= ~(fMethodBit &
kBitMask);
529 if ( fTree->GetAutoFlush() <= 0 ) {
531 fStartEntry = firstEntry;
532 }
else if (fTree->fNClusterRange) {
538 fClusterRange =
TMath::BinarySearch(fTree->fNClusterRange, fTree->fClusterRangeEnd, firstEntry - 1) + 1;
542 if (fClusterRange == 0) {
544 entryInRange = firstEntry;
546 pedestal = fTree->fClusterRangeEnd[fClusterRange-1] + 1;
547 entryInRange = firstEntry - pedestal;
550 if (fClusterRange == fTree->fNClusterRange) {
551 autoflush = fTree->fAutoFlush;
553 autoflush = fTree->fClusterSize[fClusterRange];
555 if (autoflush == 0) {
556 autoflush = GetEstimatedClusterSize();
558 fStartEntry = pedestal + entryInRange - entryInRange%autoflush;
560 fStartEntry = firstEntry - firstEntry%fTree->GetAutoFlush();
562 fNextEntry = fStartEntry;
572 Long64_t zipBytes = fTree->GetZipBytes();
574 return fTree->GetEntries() - 1;
577 Long64_t cacheSize = fTree->GetCacheSize();
578 if (cacheSize == 0) {
589 clusterEstimate = fTree->GetEntries() * cacheSize / zipBytes;
590 if (clusterEstimate == 0)
593 return clusterEstimate;
603 fStartEntry = fNextEntry;
604 if ( fTree->GetAutoFlush() <= 0 ) {
606 Long64_t clusterEstimate = GetEstimatedClusterSize();
607 fNextEntry = fStartEntry + clusterEstimate;
609 if (fClusterRange == fTree->fNClusterRange) {
612 fNextEntry += fTree->GetAutoFlush();
614 if (fStartEntry > fTree->fClusterRangeEnd[fClusterRange]) {
617 if (fClusterRange == fTree->fNClusterRange) {
620 fNextEntry += fTree->GetAutoFlush();
622 Long64_t clusterSize = fTree->fClusterSize[fClusterRange];
623 if (clusterSize == 0) {
624 clusterSize = GetEstimatedClusterSize();
626 fNextEntry += clusterSize;
627 if (fNextEntry > fTree->fClusterRangeEnd[fClusterRange]) {
631 fNextEntry = fTree->fClusterRangeEnd[fClusterRange] + 1;
636 if (fNextEntry > fTree->GetEntries()) {
637 fNextEntry = fTree->GetEntries();
648 fNextEntry = fStartEntry;
649 if (fTree->GetAutoFlush() <= 0) {
651 Long64_t clusterEstimate = GetEstimatedClusterSize();
652 fStartEntry = fNextEntry - clusterEstimate;
654 if (fClusterRange == 0 || fTree->fNClusterRange == 0) {
657 fStartEntry -= fTree->GetAutoFlush();
662 if (fClusterRange == 0) {
666 Long64_t clusterSize = fTree->fClusterSize[fClusterRange];
667 if (clusterSize == 0) {
668 clusterSize = GetEstimatedClusterSize();
670 fStartEntry -= clusterSize;
674 if (fStartEntry < 0) {
861 if (strlen(title) > 2) {
862 if (title[0] ==
'/') {
863 Branch(title+1,32000,splitlevel);
989 Error(
"AddBranchToCache",
"Could not load a tree");
998 Error(
"AddBranchToCache",
"No tree is available. Branch was not added to the cache");
1004 Error(
"AddBranchToCache",
"No file is available. Branch was not added to the cache");
1009 Error(
"AddBranchToCache",
"No cache is available, branch not added");
1012 return tc->
AddBranch(bname,subbranches);
1028 Error(
"AddBranchToCache",
"Could not load a tree");
1036 Error(
"AddBranchToCache",
"Error adding branch");
1041 Error(
"AddBranchToCache",
"No tree is available. Branch was not added to the cache");
1047 Error(
"AddBranchToCache",
"No file is available. Branch was not added to the cache");
1052 Error(
"AddBranchToCache",
"No cache is available, branch not added");
1072 Error(
"DropBranchFromCache",
"Could not load a tree");
1081 Error(
"DropBranchFromCache",
"No tree is available. Branch was not dropped from the cache");
1087 Error(
"DropBranchFromCache",
"No file is available. Branch was not dropped from the cache");
1092 Error(
"DropBranchFromCache",
"No cache is available, branch not dropped");
1111 Error(
"DropBranchFromCache",
"Could not load a tree");
1119 Error(
"DropBranchFromCache",
"Error dropping branch");
1124 Error(
"DropBranchFromCache",
"No tree is available. Branch was not dropped from the cache");
1130 Error(
"DropBranchFromCache",
"No file is available. Branch was not dropped from the cache");
1135 Error(
"DropBranchFromCache",
"No cache is available, branch not dropped");
1244 Warning(
"AddFriend",
"FriendElement %s in file %s has less entries %lld than its parent Tree: %lld", treename, filename, t->
GetEntries(),
fEntries);
1247 Warning(
"AddFriend",
"Cannot add FriendElement %s in file %s", treename, filename);
1272 Warning(
"AddFriend",
"FriendElement %s in file %s has less entries %lld than its parent tree: %lld", treename,
file->GetName(), t->
GetEntries(),
fEntries);
1275 Warning(
"AddFriend",
"unknown tree '%s' in file '%s'", treename,
file->GetName());
1299 Warning(
"AddFriend",
"FriendElement '%s' in file '%s' has less entries %lld than its parent tree: %lld",
1394 if (opt.
Contains(
"flushbaskets")) {
1395 if (
gDebug > 0)
Info(
"AutoSave",
"calling FlushBaskets \n");
1407 if (nbytes && key) {
1414 if (
file)
file->WriteStreamerInfo();
1428 const char* writeStlWithoutProxyMsg =
"The class requested (%s) for the branch \"%s\"" 1429 " is an instance of an stl collection and does not have a compiled CollectionProxy." 1430 " Please generate the dictionary for this collection (%s) to avoid to write corrupted data.";
1444 Error(
"Branch", writeStlWithoutProxyMsg,
1448 return Branch(branchname, classname, (
void*) addobj, bufsize, splitlevel);
1451 void** addr = (
void**) addobj;
1455 if (ptrClass && claim) {
1462 Error(
"Branch",
"The class requested (%s) for \"%s\" is different from the type of the pointer passed (%s)",
1465 }
else if (actualClass && (claim != actualClass) && !actualClass->
InheritsFrom(claim)) {
1470 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s",
1476 Error(
"Branch", writeStlWithoutProxyMsg,
1480 return Branch(branchname, classname, (
void*) addobj, bufsize, splitlevel);
1490 Error(
"Branch",
"The pointer specified for %s is not of a class known to ROOT", branchname);
1494 void** addr = (
void**) addobj;
1495 if (addr && *addr) {
1498 Warning(
"Branch",
"The actual TClass corresponding to the object provided for the definition of the branch \"%s\" is missing.\n\tThe object will be truncated down to its %s part",
1499 branchname, ptrClass->
GetName());
1500 actualClass = ptrClass;
1501 }
else if ((ptrClass != actualClass) && !actualClass->
InheritsFrom(ptrClass)) {
1502 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s", actualClass->
GetName(), branchname, ptrClass->
GetName());
1506 actualClass = ptrClass;
1509 Error(
"Branch", writeStlWithoutProxyMsg,
1513 return Branch(branchname, actualClass->
GetName(), (
void*) addobj, bufsize, splitlevel);
1525 Error(
"Branch", writeStlWithoutProxyMsg,
1528 }
else if (claim == 0) {
1529 Error(
"Branch",
"The pointer specified for %s is not of a class known to ROOT and %s is not a known class", branchname, classname);
1536 Error(
"Branch",
"Reference interface requires a valid object (for branch: %s)!", branchname);
1540 if (ptrClass && claim) {
1547 Error(
"Branch",
"The class requested (%s) for \"%s\" is different from the type of the object passed (%s)",
1550 }
else if (actualClass && (claim != actualClass) && !actualClass->
InheritsFrom(claim)) {
1555 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s",
1561 Warning(
"Branch",
"The actual TClass corresponding to the object provided for the definition of the branch \"%s\" is missing.\n\tThe object will be truncated down to its %s part",
1562 branchname, ptrClass->
GetName());
1563 actualClass = ptrClass;
1564 }
else if ((ptrClass != actualClass) && !actualClass->
InheritsFrom(ptrClass)) {
1565 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s", actualClass->
GetName(), branchname, ptrClass->
GetName());
1569 Error(
"Branch", writeStlWithoutProxyMsg,
1584 Error(
"Branch",
"The pointer specified for %s is not of a class or type known to ROOT", branchname);
1587 return Branch(branchname,addobj,varname.
Data(),bufsize);
1593 Error(
"Branch",
"Reference interface requires a valid object (for branch: %s)!", branchname);
1598 Warning(
"Branch",
"The actual TClass corresponding to the object provided for the definition of the branch \"%s\" is missing.\n\tThe object will be truncated down to its %s part",
1599 branchname, ptrClass->
GetName());
1600 actualClass = ptrClass;
1601 }
else if ((ptrClass != actualClass) && !actualClass->
InheritsFrom(ptrClass)) {
1602 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s", actualClass->
GetName(), branchname, ptrClass->
GetName());
1606 Error(
"Branch", writeStlWithoutProxyMsg,
1709 Error(
"Branch",
"Cannot call this constructor for a TClonesArray");
1715 while ((obj = next())) {
1723 Branch(col, bufsize, splitlevel - 1, branchname);
1725 if (nch && (
name[nch-1] ==
'_')) {
1734 if (splitlevel > 99) {
1760 char* curname =
new char[1000];
1762 while ((obj = next())) {
1763 snprintf(curname,1000,
"%s/%s", foldername, obj->GetName());
1765 Branch(curname, bufsize, splitlevel - 1);
1768 for (
Int_t i = 0; i < 1000; ++i) {
1769 if (curname[i] == 0) {
1772 if (curname[i] ==
'/') {
1779 strlcat(curname, occur,1000);
1883 return Bronch(
name, classname, addobj, bufsize, splitlevel);
1885 if (splitlevel < 0) {
1888 return BranchOld(
name, classname, addobj, bufsize, splitlevel);
1937 Error(
"BranchOld",
"Cannot find class: '%s'", classname);
1942 Fatal(
"BranchOld",
"The requested class ('%s') does not inherit from TObject.\n" 1943 "\tfgBranchStyle is set to zero requesting by default to use BranchOld.\n" 1944 "\tIf this is intentional use Bronch instead of Branch or BranchOld.", classname);
1946 Fatal(
"BranchOld",
"The requested class ('%s') does not inherit from TObject.\n" 1947 "\tYou can not use BranchOld to store objects of this type.",classname);
1958 const char* rdname = 0;
1959 const char* dname = 0;
1961 char** apointer = (
char**) addobj;
1973 if (
name[lenName-1] ==
'.') {
2012 if (!strcmp(dname,
"fBits")) {
2015 if (!strcmp(dname,
"fUniqueID")) {
2025 branchname = rdname;
2029 branchname.
Form(
"%s%s",
name, &rdname[1]);
2031 branchname.
Form(
"%s%s",
name, &rdname[0]);
2037 char* pointer = ((
char*) obj) + offset;
2046 char* cpointer = (
char*) pointer;
2047 char** ppointer = (
char**) cpointer;
2049 if (splitlevel != 2) {
2051 branch1 =
new TBranchClones(branch,branchname, pointer, bufsize);
2056 blist->
Add(branch1);
2064 blist->
Add(branch1);
2081 blist->
Add(branch1);
2095 aindex.Remove(rdot+1);
2096 aindex.Append(index);
2102 if (!strcmp(rdi->
GetName(), index)) {
2105 if (!strcmp(rdi->
GetName(), aindex)) {
2117 leaflist.
Form(
"%s[%s]/%c", &rdname[0], index, vcode);
2119 Error(
"BranchOld",
"Cannot create branch for rdname: %s code: %d", branchname.
Data(), code);
2126 leaflist.
Form(
"%s/%s", dname,
"C");
2139 branch1 =
new TBranch(branch, bname, *((
void**) pointer), leaflist, bufsize);
2143 blist->
Add(branch1);
2150 leaflist.
Form(
"%s/%c", rdname, vcode);
2152 Error(
"BranchOld",
"Cannot create branch for rdname: %s code: %d", branchname.
Data(), code);
2155 branch1 =
new TBranch(branch, branchname, pointer, leaflist, bufsize);
2157 blist->
Add(branch1);
2166 Warning(
"BranchOld",
"Cannot process member: '%s'", rdname);
2275 Error(
"Bronch",
"Cannot find class:%s", classname);
2286 objptr = (
char*)addr;
2288 objptr = *((
char**) addr);
2294 Error(
"Bronch",
"Pointer to TClonesArray is null");
2298 Error(
"Bronch",
"TClonesArray with no class defined in branch: %s",
name);
2302 Error(
"Bronch",
"TClonesArray with no dictionary defined in branch: %s",
name);
2306 if (splitlevel > 0) {
2307 if (hasCustomStreamer)
2308 Warning(
"Bronch",
"Using split mode on a class: %s with a custom Streamer", clones->
GetClass()->
GetName());
2323 if (!inklass && (collProxy->
GetType() == 0)) {
2324 Error(
"Bronch",
"%s with no class defined in branch: %s", classname,
name);
2331 Error(
"Bronch",
"Container with no dictionary defined in branch: %s",
name);
2335 Warning(
"Bronch",
"Using split mode on a class: %s with a custom Streamer", inklass->
GetName());
2346 branch =
new TBranchSTL(
this,
name, collProxy, bufsize, splitlevel );
2360 Error(
"Bronch",
"Cannot find dictionary for class: %s", classname);
2366 hasCustomStreamer =
kTRUE;
2369 if (splitlevel < 0 || ((splitlevel == 0) && hasCustomStreamer && cl->
IsTObject())) {
2400 objptr = (
char*) cl->
New();
2408 if ((splitlevel > 0) && !cl->
CanSplit()) {
2409 if (splitlevel != 99) {
2410 Warning(
"Bronch",
"%s cannot be split, resetting splitlevel to 0", cl->
GetName());
2424 Error(
"Bronch",
"Cannot build the StreamerInfo for class: %s", cl->
GetName());
2435 char* dot = (
char*) strchr(
name,
'.');
2438 if (nch && (
name[nch-1] ==
'.')) {
2447 if (splitlevel > 0) {
2473 char* pointer = (
char*) (objptr + element->GetOffset());
2480 TClass* clbase = element->GetClassPointer();
2497 bname.
Form(
"%s%s",
name, element->GetFullName());
2514 bname.
Form(
"%s.%s",
name, element->GetFullName());
2520 bname.
Form(
"%s", element->GetFullName());
2524 element->GetClass()->GetCollectionProxy() &&
2525 element->GetClass()->GetCollectionProxy()->HasPointers() )
2527 TBranchSTL* brSTL =
new TBranchSTL( branch, bname, element->GetClass()->GetCollectionProxy(), bufsize, splitlevel-1, sinfo,
id );
2680 char* fname =
new char[2000];
2683 for (
Int_t i = 0; i < 10; ++i) {
2691 strlcpy(fname,
file->GetName(),2000);
2694 char* cunder = strrchr(fname,
'_');
2697 const char* cdot = strrchr(
file->GetName(),
'.');
2699 strlcat(fname, cdot,2000);
2704 strlcat(fname, fcount,2000);
2707 char* cdot = strrchr(fname,
'.');
2710 strlcat(fname, strrchr(
file->GetName(),
'.'),2000);
2714 strlcat(fname, fcount,2000);
2721 Warning(
"ChangeFile",
"file %s already exist, trying with %d underscores", fname, nus+1);
2723 Int_t compress =
file->GetCompressionSettings();
2726 Error(
"Fill",
"Failed to open new file %s, continuing as a memory tree.",fname);
2728 Printf(
"Fill: Switching to new file: %s", fname);
2734 while ((obj =
file->GetList()->First())) {
2751 while ((branch = (
TBranch*)nextb())) {
2760 if (newfile) newfile->
Append(obj);
2796 TClass* expectedClass = 0;
2802 if (expectedClass && datatype ==
kOther_t && ptrClass == 0) {
2808 Error(
"SetBranchAddress",
"Unable to determine the type given for the address for \"%s\". " 2809 "The class expected (%s) refers to an stl collection and do not have a compiled CollectionProxy. " 2810 "Please generate the dictionary for this class (%s)",
2817 Error(
"SetBranchAddress",
"Unable to determine the type given for the address for \"%s\". " 2818 "The class expected (%s) does not have a dictionary and needs to be emulated for I/O purposes but is being passed a compiled object." 2819 "Please generate the dictionary for this class (%s)",
2822 Error(
"SetBranchAddress",
"Unable to determine the type given for the address for \"%s\". " 2823 "This is probably due to a missing dictionary, the original data class for this branch is %s.", branch->
GetName(), expectedClass->
GetName());
2827 if (expectedClass && ptrClass && (branch->
GetMother() == branch)) {
2830 Error(
"SetBranchAddress",
"The address for \"%s\" should be the address of a pointer!", branch->
GetName());
2850 if( expectedClass && ptrClass &&
2851 expectedClass != ptrClass &&
2859 Info(
"SetBranchAddress",
"Matching STL collection (at least according to the SchemaRuleSet when " 2860 "reading a %s into a %s",expectedClass->
GetName(),ptrClass->
GetName());
2867 Error(
"SetBranchAddress",
"The pointer type given \"%s\" does not correspond to the type needed \"%s\" by the branch: %s", ptrClass->
GetName(), bEl->
GetClassName(), branch->
GetName());
2878 }
else if (expectedClass && ptrClass && !expectedClass->
InheritsFrom(ptrClass)) {
2900 Error(
"SetBranchAddress",
"The pointer type given (%s) does not correspond to the class needed (%s) by the branch: %s", ptrClass->
GetName(), expectedClass->
GetName(), branch->
GetName());
2910 Error(
"SetBranchAddress",
"The pointer type given \"%s\" (%d) does not correspond to the type needed \"%s\" (%d) by the branch: %s",
2917 if (expectedClass) {
2918 Error(
"SetBranchAddress",
"The pointer type given \"%s\" (%d) does not correspond to the type needed \"%s\" by the branch: %s",
2932 if (rdm->GetThisOffset() == 0) {
2936 if (etype == expectedType) {
2947 if (dm->GetOffset() == 0) {
2951 if (etype == expectedType) {
2963 if (len <= ptrClass->
Size()) {
2967 Error(
"SetBranchAddress",
"The pointer type given \"%s\" does not correspond to the type needed \"%s\" (%d) by the branch: %s",
2973 Error(
"SetBranchAddress", writeStlWithoutProxyMsg,
3087 for (
Int_t i = 0; i < nb; ++i) {
3097 if (thistree !=
this) {
3122 for (
Int_t lndx = 0; lndx < nleaves; ++lndx) {
3128 if (branch && (newcomp > -1)) {
3137 for (
Long64_t i = 0; i < nb; ++i) {
3148 for (
Int_t j = 0; j < nb1; ++j) {
3162 for (
Int_t k = 0; k < nb2; ++k) {
3192 if ( newtree->
CopyEntries(
this, -1, option ) < 0 ) {
3194 Error(
"CloneTTree",
"TTree has not been cloned\n");
3217 for (
Int_t i = 0; i < nbranches; ++i) {
3224 tree->ResetBranchAddress(br);
3253 Warning(
"CopyAddresses",
"Could not find branch named '%s' in tree named '%s'", branch->
GetName(),
tree->GetName());
3261 for (
Int_t i = 0; i < ntleaves; ++i) {
3277 tree->ResetBranchAddress(tbranch);
3299 Warning(
"CopyAddresses",
"Could not find branch named '%s' in tree named '%s'", branch->
GetName(),
tree->GetName());
3308 (
tree->IsA()->InheritsFrom(
"TNtuple") ||
tree->IsA()->InheritsFrom(
"TNtupleD") )
3310 tree->ResetBranchAddresses();
3326 switch (onIndexError) {
3350 switch (onIndexError) {
3374 }
else if ( onIndexError == kDrop ) {
3431 onIndexError = kKeep;
3432 }
else if (opt.
Contains(
"buildindex")) {
3433 onIndexError = kBuild;
3434 }
else if (opt.
Contains(
"dropindex")) {
3435 onIndexError = kDrop;
3437 onIndexError = kBuild;
3440 Int_t cacheSize = -1;
3443 Ssiz_t cacheSizeEnd = opt.
Index(
" ",cacheSizeLoc+10) - (cacheSizeLoc+10);
3444 TSubString cacheSizeStr( opt(cacheSizeLoc+10,cacheSizeEnd) );
3447 Warning(
"CopyEntries",
"The cachesize option can not be parsed: %s. The default size will be used.",cacheSizeStr.
String().
Data());
3450 const char *munit =
nullptr;
3453 Warning(
"CopyEntries",
"The cachesize option is too large: %s (%g%s max). The default size will be used.",cacheSizeStr.
String().
Data(),
m,munit);
3456 if (
gDebug > 0 && cacheSize != -1)
Info(
"CopyEntries",
"Using Cache size: %d\n",cacheSize);
3462 }
else if (
nentries > treeEntries) {
3466 if (fastClone && (nentries < 0 || nentries == tree->
GetEntriesFast())) {
3470 if (
tree->LoadTree(i) < 0) {
3474 withIndex = R__HandleIndex( onIndexError,
this,
tree );
3485 if (cloner.IsValid()) {
3487 if (cacheSize != -1) cloner.SetCacheSize(cacheSize);
3491 Warning(
"CopyEntries",
"%s",cloner.GetWarning());
3496 if (cloner.NeedConversion()) {
3499 for (
Long64_t ii = 0; ii < tentries; ii++) {
3500 if (localtree->
GetEntry(ii) <= 0) {
3509 Warning(
"CopyEntries",
"%s",cloner.GetWarning());
3510 if (
tree->GetDirectory() &&
tree->GetDirectory()->GetFile()) {
3511 Warning(
"CopyEntries",
"Skipped file %s\n",
tree->GetDirectory()->GetFile()->GetName());
3513 Warning(
"CopyEntries",
"Skipped file number %d\n",
tree->GetTreeNumber());
3527 }
else if (
nentries > treeEntries) {
3530 Int_t treenumber = -1;
3532 if (
tree->LoadTree(i) < 0) {
3535 if (treenumber !=
tree->GetTreeNumber()) {
3537 withIndex = R__HandleIndex( onIndexError,
this,
tree );
3539 treenumber =
tree->GetTreeNumber();
3541 if (
tree->GetEntry(i) <= 0) {
3544 nbytes += this->
Fill();
3621 if (
file && !strcmp(option,
"all")) {
3622 if (!
file->IsWritable()) {
3623 Error(
"Delete",
"File : %s is not writable, cannot delete Tree:%s",
file->GetName(),
GetName());
3640 Int_t nbytes,objlen,keylen;
3641 while ((leaf = (
TLeaf*)next())) {
3644 for (
Int_t i=0;i<nbaskets;i++) {
3648 if (!branchFile)
continue;
3650 if (nbytes <= 0)
continue;
3651 branchFile->
MakeFree(pos,pos+nbytes-1);
3665 if (dirsav) dirsav->
cd();
3666 if (
gDebug)
Info(
"TTree::Delete",
"Deleting Tree: %s: %d baskets deleted. Total space freed = %d bytes\n",
GetName(),nbask,ntot);
4363 for (
Int_t i = 0; i < nb; ++i) {
4377 for (
Int_t i = 0; i < nleaves; ++i) {
4381 for (
Int_t j = 0; j < nbaskets - 1; ++j) {
4464 for (
Int_t i = 0; i < nbranches; ++i) {
4472 nwrite = branch->
FillImpl(
nullptr);
4478 Error(
"Fill",
"Failed filling branch:%s.%s, nbytes=%d, entry=%lld\n" 4479 " This error is symptomatic of a Tree created as a memory-resident Tree\n" 4480 " Instead of doing:\n" 4481 " TTree *T = new TTree(...)\n" 4482 " TFile *f = new TFile(...)\n" 4484 " TFile *f = new TFile(...)\n" 4485 " TTree *T = new TTree(...)\n\n",
4488 Error(
"Fill",
"Failed filling branch:%s.%s, nbytes=%d, entry=%lld",
GetName(), branch->
GetName(), nwrite,
4520 bool autoFlush =
false;
4521 bool autoSave =
false;
4539 if (autoFlush || autoSave) {
4546 Info(
"TTree::Fill",
"OptimizeBaskets called at entry %lld, fZipBytes=%lld, fFlushedBytes=%lld\n",
4558 if (zipBytes != 0) {
4560 }
else if (totBytes != 0) {
4595 Info(
"TTree::Fill",
"FlushBaskets() called at entry %lld, fZipBytes=%lld, fFlushedBytes=%lld\n",
fEntries,
4603 Info(
"TTree::Fill",
"AutoSave called at entry %lld, fZipBytes=%lld, fSavedBytes=%lld\n",
fEntries,
4616 return nerror == 0 ? nbytes : -1;
4624 if (list==0 || branchname == 0 || branchname[0] ==
'\0')
return 0;
4628 UInt_t brlen = strlen(branchname);
4630 for(
Int_t index = 0; index < nbranches; ++index) {
4635 if (len &&
name[len-1]==
']') {
4636 const char *dim = strchr(
name,
'[');
4641 if (brlen == len && strncmp(branchname,
name,len)==0) {
4645 if ((brlen >= len) && (branchname[len] ==
'.')
4646 && strncmp(
name, branchname, len) == 0) {
4653 if (next)
return next;
4655 const char *dot = strchr((
char*)branchname,
'.');
4657 if (len==(
size_t)(dot-branchname) &&
4658 strncmp(branchname,
name,dot-branchname)==0 ) {
4686 if (branch)
return branch;
4690 if (branch)
return branch;
4694 while ((branch = (
TBranch*) next())) {
4697 return nestedbranch;
4714 const char *subbranch = strstr(branchname, fe->
GetName());
4715 if (subbranch != branchname) {
4719 subbranch += strlen(fe->
GetName());
4720 if (*subbranch !=
'.') {
4726 std::ostringstream
name;
4753 char* subsearchname = (
char*) strstr(searchname,
GetName());
4754 if (subsearchname != searchname) {
4757 if (subsearchname) {
4758 subsearchname += strlen(
GetName());
4759 if (*subsearchname !=
'.') {
4763 if (subsearchname[0]==0) {
4777 while ((leaf = (
TLeaf*) next())) {
4780 if (dim >= 0) leafname.
Remove(dim);
4782 if (leafname == searchname) {
4785 if (subsearchname && leafname == subsearchname) {
4791 dim = leaftitle.
First(
'[');
4792 if (dim >= 0) leaftitle.
Remove(dim);
4794 if (leaftitle == searchname) {
4797 if (subsearchname && leaftitle == subsearchname) {
4803 dim = longname.
First(
'[');
4804 if (dim>=0) longname.
Remove(dim);
4805 if (longname == searchname) {
4808 if (subsearchname && longname == subsearchname) {
4812 dim = longtitle.
First(
'[');
4813 if (dim>=0) longtitle.
Remove(dim);
4814 if (longtitle == searchname) {
4817 if (subsearchname && longtitle == subsearchname) {
4825 if (strstr(searchname,
".") && !strcmp(searchname, branch->
GetName())) {
4828 if (subsearchname && strstr(subsearchname,
".") && !strcmp(subsearchname, branch->
GetName())) {
4846 subsearchname = (
char*) strstr(searchname, fe->
GetName());
4847 if (subsearchname != searchname) {
4850 if (subsearchname) {
4851 subsearchname += strlen(fe->
GetName());
4852 if (*subsearchname !=
'.') {
4858 if (subsearchname) {
4859 leafname.
Form(
"%s.%s",t->
GetName(),subsearchname);
4861 leafname = searchname;
4903 return fPlayer->
Fit(funcname, varexp, selection, option, goption,
nentries, firstentry);
4909 struct BoolRAIIToggle {
4912 BoolRAIIToggle(
Bool_t &val) : m_val(val) { m_val =
true; }
4913 ~BoolRAIIToggle() { m_val =
false; }
4961 std::atomic<Int_t> nerrpar(0);
4962 std::atomic<Int_t> nbpar(0);
4963 std::atomic<Int_t> pos(0);
4965 auto mapFunction = [&]() {
4971 Int_t j = pos.fetch_add(1);
4977 std::stringstream ss;
4978 ss << std::this_thread::get_id();
4979 Info(
"FlushBaskets",
"[IMT] Thread %s", ss.str().c_str());
4980 Info(
"FlushBaskets",
"[IMT] Running task for branch #%d: %s", j, branch->GetName());
4983 Int_t nbtask = branch->FlushBaskets();
4985 if (nbtask < 0) { nerrpar++; }
4986 else { nbpar += nbtask; }
4990 pool.
Foreach(mapFunction, nb);
4996 return nerrpar ? -1 : nbpar.load();
4999 for (
Int_t j = 0; j < nb; j++) {
5042 const char* alias = t->
GetAlias(aliasName);
5046 const char* subAliasName = strstr(aliasName, fe->
GetName());
5047 if (subAliasName && (subAliasName[strlen(fe->
GetName())] ==
'.')) {
5063 if (
name == 0)
return 0;
5073 for (
Int_t i = 0; i < nb; i++) {
5080 for (
Int_t j = 0; j < nb1; j++) {
5087 for (
Int_t k = 0; k < nb2; k++) {
5099 for (
Int_t i = 0; i < nleaves; i++) {
5133 char* subname = (
char*) strstr(
name, fe->
GetName());
5134 if (subname !=
name) {
5139 if (*subname !=
'.') {
5188 if (!(stcs =
gSystem->
Getenv(
"ROOT_TTREECACHE_SIZE")) || !*stcs) {
5194 if (cacheFactor < 0.0) {
5205 if (cacheSize >= (INT_MAX / 4)) {
5206 cacheSize = INT_MAX / 4;
5209 if (cacheSize < 0) {
5213 if (cacheSize == 0 && withDefault) {
5410 if (entry < 0 || entry >=
fEntries)
return 0;
5421 auto seqprocessing = [&]() {
5423 for (i=0;i<nbranches;i++) {
5425 nb = branch->
GetEntry(entry, getall);
5437 nb = branch->GetEntry(entry, getall);
5441 if (nb < 0)
return nb;
5447 std::atomic<Int_t> pos(0);
5448 std::atomic<Int_t> nbpar(0);
5450 auto mapFunction = [&]() {
5456 Int_t j = pos.fetch_add(1);
5462 std::stringstream ss;
5463 ss << std::this_thread::get_id();
5464 Info(
"GetEntry",
"[IMT] Thread %s", ss.str().c_str());
5465 Info(
"GetEntry",
"[IMT] Running task for branch #%d: %s", j, branch->GetName());
5468 std::chrono::time_point<std::chrono::system_clock> start, end;
5470 start = std::chrono::system_clock::now();
5471 nbtask = branch->GetEntry(entry, getall);
5472 end = std::chrono::system_clock::now();
5474 Long64_t tasktime = (
Long64_t)std::chrono::duration_cast<std::chrono::microseconds>(end - start).count();
5477 if (nbtask < 0) errnb = nbtask;
5478 else nbpar += nbtask;
5504 if (nb < 0)
return nb;
5521 if (nb < 0)
return nb;
5547 if (checkLeafCount) {
5548 for (
Int_t i = 0; i < nbranches; i++) {
5552 auto countBranch = leafCount->GetBranch();
5566 for (
Int_t i = 0; i < nbranches; i++) {
5578 [](std::pair<Long64_t,TBranch*>
a, std::pair<Long64_t,TBranch*>
b) {
5579 return a.first >
b.first;
5598 [](std::pair<Long64_t,TBranch*>
a, std::pair<Long64_t,TBranch*>
b) {
5599 return a.first >
b.first;
5703 for (i = 0; i < nbranches; ++i) {
5706 if (nb < 0)
return nb;
5718 if (serial <0)
return -nbytes;
5720 if (nb < 0)
return nb;
5745 if (strcmp(friendname,fe->
GetName())==0
5859 leaf = branch->
GetLeaf(leafname);
5866 while ((leaf = (
TLeaf*)nextl())) {
5867 if (strcmp(leaf->
GetName(),leafname))
continue;
5869 UInt_t nbch = strlen(branchname);
5871 const char* brname = br->
GetName();
5873 if (strncmp(brname,branchname,nbch)) {
5875 const char *mothername = mother->
GetName();
5876 UInt_t motherlen = strlen(mothername);
5877 if (nbch > motherlen && strncmp(mothername,branchname,motherlen)==0 && (mothername[motherlen-1]==
'.' || branchname[motherlen]==
'.')) {
5879 if (strncmp(brname,branchname+motherlen+1,nbch-motherlen-1)) {
5895 if ((strlen(brname) > nbch) && (brname[nbch] !=
'.') && (brname[nbch] !=
'[')) {
5909 if (leaf)
return leaf;
5920 char *subname = (
char*)strstr(leafname,fe->
GetName());
5921 if (subname != leafname)
continue;
5924 if (*subname !=
'.')
continue;
5926 strippedArg += subname;
5927 leaf = t->
GetLeaf(branchname,subname);
5928 if (leaf)
return leaf;
5945 if (leafname == 0)
return 0;
5964 if (aname == 0)
return 0;
5971 char*
slash = (
char*) strrchr(aname,
'/');
5976 nbch =
slash - aname;
6003 if (entryNumber < 0)
break;
6042 if (entryNumber < 0)
break;
6074 if (pe && pe->
GetTree() !=
this) pe = 0;
6075 if (create && !pe) {
6078 if (pe && pe->
GetTree() !=
this) pe = 0;
6143 if (autoflush > 0 && autosave > 0) {
6155 for (
Int_t i = 0; i < nb; ++i) {
6162 for(
Int_t i = 0, j = 0; j < oldsize; ++j) {
6193 Int_t nimported = 0;
6194 while ((leaf=(
TLeaf*)next())) {
6244 if (friendTree == 0) {
6249 friendHasEntry =
kTRUE;
6256 friendHasEntry =
kTRUE;
6259 if (oldNumber != newNumber) {
6385 Warning(
"MakeCode",
"MakeCode is obsolete. Use MakeClass or MakeSelector instead");
6511 Int_t TTree::MakeProxy(
const char* proxyClassname,
const char* macrofilename,
const char* cutfilename,
const char* option,
Int_t maxUnrolling)
6515 return fPlayer->
MakeProxy(proxyClassname,macrofilename,cutfilename,option,maxUnrolling);
6568 if(opt.
EqualTo(
"=legacy", TString::ECaseCompare::kIgnoreCase)) {
6601 while ((obj=next())) {
6608 if (!newtree)
continue;
6614 tree->GetListOfClones()->Remove(newtree);
6615 tree->ResetBranchAddresses();
6624 tree->ResetBranchAddresses();
6649 if (
tree==
this)
continue;
6651 Error(
"Add",
"Attempt to add object of class: %s to a %s",
tree->ClassName(),
ClassName());
6663 tree->ResetBranchAddresses();
6680 const char *options = info ? info->
fOptions.
Data() :
"";
6707 if (
tree==
this)
continue;
6709 Error(
"Add",
"Attempt to add object of class: %s to a %s",
tree->ClassName(),
ClassName());
6721 tree->ResetBranchAddresses();
6736 if (src == dst)
return;
6758 while ((leaf = (
TLeaf*) next())) {
6790 if (nleaves == 0 || treeSize == 0) {
6794 Double_t aveSize = treeSize/nleaves;
6798 Int_t i, oldMemsize,newMemsize,oldBaskets,newBaskets;
6799 i = oldMemsize = newMemsize = oldBaskets = newBaskets = 0;
6804 for (
Int_t pass =0;pass<2;pass++) {
6809 for (i=0;i<nleaves;i++) {
6813 Double_t idealFactor = totBytes/aveSize;
6817 sizeOfOneEntry = aveSize;
6822 oldMemsize += oldBsize;
6823 oldBaskets += 1+
Int_t(totBytes/oldBsize);
6826 newBaskets += 1+
Int_t(totBytes/oldBsize);
6829 Double_t bsize = oldBsize*idealFactor*memFactor;
6830 if (bsize < 0) bsize = bmax;
6831 if (bsize > bmax) bsize = bmax;
6842 newBsize = newBsize - newBsize%512 + 512;
6844 if (newBsize < sizeOfOneEntry) newBsize = sizeOfOneEntry;
6845 if (newBsize < bmin) newBsize = bmin;
6846 if (newBsize > 10000000) newBsize = bmax;
6848 if (pDebug)
Info(
"OptimizeBaskets",
"Changing buffer size from %6d to %6d bytes for %s\n",oldBsize,newBsize,branch->
GetName());
6851 newMemsize += newBsize;
6855 newBaskets += 1+
Int_t(totBytes/newBsize);
6856 if (pass == 0)
continue;
6860 if (comp > 1 && comp < minComp) {
6861 if (pDebug)
Info(
"OptimizeBaskets",
"Disabling compression for branch : %s\n",branch->
GetName());
6867 if (memFactor > 100) memFactor = 100;
6868 Double_t bmin_new = bmin*memFactor;
6869 Double_t bmax_new = bmax*memFactor;
6870 static const UInt_t hardmax = 1*1024*1024*1024;
6877 static const UInt_t hardmin = 8;
6878 bmin = (bmin_new > hardmax) ? hardmax : ( bmin_new < hardmin ? hardmin : (
UInt_t)bmin_new );
6879 bmax = (bmax_new > hardmax) ? bmin : (
UInt_t)bmax_new;
6882 Info(
"OptimizeBaskets",
"oldMemsize = %d, newMemsize = %d\n",oldMemsize, newMemsize);
6883 Info(
"OptimizeBaskets",
"oldBaskets = %d, newBaskets = %d\n",oldBaskets, newBaskets);
6962 Printf(
"******************************************************************************");
6965 Printf(
"* : : Tree compression factor = %6.2f *", cx);
6966 Printf(
"******************************************************************************");
6968 if (strncmp(option,
"clusterRange",strlen(
"clusters"))==0) {
6969 Printf(
"%-16s %-16s %-16s %5s",
6970 "Cluster Range #",
"Entry Start",
"Last Entry",
"Size");
6975 Printf(
"%-16d %-16lld %-16lld %5lld",
6980 Printf(
"%-16d %-16lld %-16lld %5lld",
6989 if (strstr(option,
"toponly")) {
6992 for (
l=0;
l<nl;
l++) {
6993 leaf = (
TLeaf *)const_cast<TTree*>(
this)->GetListOfLeaves()->At(
l);
6995 if (strchr(br->
GetName(),
'.')) {
7003 for (
l=0;
l<nl;
l++) {
7004 if (count[
l] < 0)
continue;
7005 leaf = (
TLeaf *)const_cast<TTree*>(
this)->GetListOfLeaves()->At(
l);
7012 if (strlen(option) && strchr(option,
'*')) reg = option;
7016 while ((br= (
TBranch*)next())) {
7028 if (!
fFriends || !strstr(option,
"all"))
return;
7034 if (t) t->
Print(option);
7054 if (tc) tc->
Print(option);
7178 var.
Form(
"%s>>%s", varexp, hname);
7181 opt.
Form(
"%sgoff", option);
7246 Error(
"ReadFile",
"Cannot open file: %s",filename);
7249 const char* ext = strrchr(filename,
'.');
7250 if(ext != NULL && ((strcmp(ext,
".csv") == 0) || (strcmp(ext,
".CSV") == 0)) && delimiter ==
' ') {
7253 return ReadStream(in, branchDescriptor, delimiter);
7262 Long_t inPos = inputStream.tellg();
7263 char newline =
'\n';
7267 if(!inputStream.good()) {
7268 Error(
"ReadStream",
"Error reading stream: no newline found.");
7271 if(c == newline)
break;
7277 inputStream.clear();
7278 inputStream.seekg(inPos);
7290 std::stringstream ss;
7291 std::istream *inTemp;
7292 Long_t inPos = inputStream.tellg();
7293 if (!inputStream.good()) {
7294 Error(
"ReadStream",
"Error reading stream");
7298 ss << std::cin.rdbuf();
7303 inTemp = &inputStream;
7305 std::istream& in = *inTemp;
7310 if (nbranches == 0) {
7311 char *bdname =
new char[4000];
7312 char *bd =
new char[100000];
7314 if (branchDescriptor) nch = strlen(branchDescriptor);
7318 in.getline(bd, 100000, newline);
7322 Error(
"ReadStream",
"Error reading stream");
7326 while( isspace(*cursor) && *cursor !=
'\n' && *cursor !=
'\0') {
7329 if (*cursor !=
'#' && *cursor !=
'\n' && *cursor !=
'\0') {
7336 strlcpy(bd,branchDescriptor,100000);
7341 void *address = &bd[90000];
7345 if(delimiter !=
' ') {
7347 if (strchr(bdcur,bdelim)==0 && strchr(bdcur,
':') != 0) {
7353 char *colon = strchr(bdcur,bdelim);
7354 if (colon) *colon = 0;
7355 strlcpy(bdname,bdcur,4000);
7356 char *
slash = strchr(bdname,
'/');
7362 desc.
Form(
"%s/%s",bdname,olddesc.Data());
7364 char *bracket = strchr(bdname,
'[');
7368 branch =
new TBranch(
this,bdname,address,desc.
Data(),32000);
7371 Warning(
"ReadStream",
"Illegal branch definition: %s",bdcur);
7386 Info(
"ReadStream",
"Will use branches:");
7387 for (
int i = 0 ; i < nbranches; ++i) {
7393 Info(
"ReadStream",
"Dumping read tokens, format:");
7394 Info(
"ReadStream",
"LLLLL:BBB:gfbe:GFBE:T");
7395 Info(
"ReadStream",
" L: line number");
7396 Info(
"ReadStream",
" B: branch number");
7397 Info(
"ReadStream",
" gfbe: good / fail / bad / eof of token");
7398 Info(
"ReadStream",
" GFBE: good / fail / bad / eof of file");
7399 Info(
"ReadStream",
" T: Token being read");
7406 const char sDelimBuf[2] = { delimiter, 0 };
7407 const char* sDelim = sDelimBuf;
7408 if (delimiter ==
' ') {
7413 if (newline ==
'\r' && in.peek() ==
'\n') {
7417 std::getline(in,
line, newline);
7424 Info(
"ReadStream",
"Skipping empty line number %lld", nlines);
7428 if (sLine[0] ==
'#') {
7430 Info(
"ReadStream",
"Skipping comment line number %lld: '%s'",
7431 nlines,
line.c_str());
7436 Info(
"ReadStream",
"Parsing line number %lld: '%s'",
7437 nlines,
line.c_str());
7444 std::stringstream sToken;
7448 Int_t remainingLeafLen = 0;
7449 while (goodLine && iBranch < nbranches
7450 && sLine.
Tokenize(tok, pos, sDelim)) {
7452 if (tok.
IsNull() && delimiter ==
' ') {
7458 if (!remainingLeafLen) {
7463 if (!remainingLeafLen) {
7464 remainingLeafLen = leaf->
GetLen();
7468 remainingLeafLen = 1;
7478 if (remainingLeafLen) {
7486 sToken.seekp(0, std::ios_base::beg);
7487 sToken.str(leafData.
Data());
7488 sToken.seekg(0, std::ios_base::beg);
7491 Info(
"ReadStream",
"%5lld:%3d:%d%d%d%d:%d%d%d%d:%s",
7493 (
int)sToken.good(), (int)sToken.fail(),
7494 (int)sToken.bad(), (int)sToken.eof(),
7495 (int)in.good(), (int)in.fail(),
7496 (int)in.bad(), (int)in.eof(),
7497 sToken.str().c_str());
7504 "Buffer error while reading data for branch %s on line %lld",
7506 }
else if (!sToken.eof()) {
7507 if (sToken.fail()) {
7509 "Couldn't read formatted data in \"%s\" for branch %s on line %lld; ignoring line",
7513 std::string remainder;
7514 std::getline(sToken, remainder, newline);
7515 if (!remainder.empty()) {
7517 "Ignoring trailing \"%s\" while reading data for branch %s on line %lld",
7518 remainder.c_str(), branch->
GetName(), nlines);
7524 if (iBranch < nbranches) {
7526 "Read too few columns (%d < %d) in line %lld; ignoring line",
7527 iBranch, nbranches, nlines);
7529 }
else if (pos !=
kNPOS) {
7531 if (pos < sLine.
Length()) {
7533 "Ignoring trailing \"%s\" while reading line %lld",
7534 sLine.
Data() + pos - 1 ,
7609 for (
Int_t i = 0; i < nleaves; i++) {
7638 if (friend_t == oldFriend) {
7666 for (
Int_t i = 0; i < nb; ++i) {
7668 branch->
Reset(option);
7696 for (
Int_t i = 0; i < nb; ++i) {
7725 for (
Int_t i = 0; i < nbranches; ++i) {
7784 if (!aliasName || !aliasFormula) {
7787 if (!aliasName[0] || !aliasFormula[0]) {
7943 for (
Int_t i = 0; i < nleaves; i++) {
7947 if (strcmp(bname, branch->
GetName()) && (
s.Index(re) ==
kNPOS)) {
7954 Error(
"SetBasketSize",
"unknown branch -> '%s'", bname);
7970 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
8000 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
8031 const char *bname = branch->
GetName();
8032 while ((clone = (
TTree*) next())) {
8034 if (cloneBr && (cloneBr->
GetAddress() == oldAddr)) {
8119 TBranch *branch, *bcount, *bson;
8120 TLeaf *leaf, *leafcount;
8129 for (i=0;i<nleaves;i++) {
8133 if (strcmp(bname,
"*")) {
8136 if (strcmp(bname,branch->
GetName())
8137 && longname != bname
8138 &&
s.Index(re) ==
kNPOS)
continue;
8150 if (nb==0 && strchr(bname,
'*')==0) {
8160 UInt_t foundInFriend = 0;
8171 char *subbranch = (
char*)strstr(bname,fe->
GetName());
8172 if (subbranch!=bname) subbranch = 0;
8174 subbranch += strlen(fe->
GetName());
8175 if ( *subbranch !=
'.' ) subbranch = 0;
8186 if (!nb && !foundInFriend) {
8189 if (strchr(bname,
'*') != 0)
8190 Error(
"SetBranchStatus",
"No branch name is matching wildcard -> %s", bname);
8192 Error(
"SetBranchStatus",
"unknown branch -> %s", bname);
8194 if (strchr(bname,
'*') != 0)
8195 Warning(
"SetBranchStatus",
"No branch name is matching wildcard -> %s", bname);
8197 Warning(
"SetBranchStatus",
"unknown branch -> %s", bname);
8202 if (found) *found = nb + foundInFriend;
8206 for (i = 0; i < nleaves; i++) {
8218 for (j=0;j<nbranches;j++) {
8220 if (!bson)
continue;
8288 if (cacheSize < 0) {
8292 if (cacheSize == 0) {
8294 }
else if (cacheSize < 0) {
8309 if (!autocache && cacheSize>0) {
8310 Warning(
"SetCacheSizeAux",
"A TTreeCache could not be created because the TTree has no file");
8345 if (cacheSize == 0) {
8348 file->SetCacheRead(0,
this);
8367 Error(
"SetCacheSizeAux",
"Not setting up an automatically sized TTreeCache because of missing cache previously set");
8375 if (cacheSize == 0 || pf) {
8400 Error(
"SetCacheEntryRange",
"Could not load a tree");
8409 Error(
"SetCacheEntryRange",
"No tree is available. Could not set cache entry range");
8415 Error(
"SetCacheEntryRange",
"No file is available. Could not set cache entry range");
8420 Error(
"SetCacheEntryRange",
"No cache is available. Could not set entry range");
8459 if (maxEntries <= 0) {
8474 for (
Int_t i = 0; i < nb; i++) {
8507 if (newdefault < 10) {
8511 if (updateExisting) {
8514 while ( (
b = (
TBranch*)next() ) ) {
8515 b->SetEntryOffsetLen( newdefault,
kTRUE );
8585 TBranch*
b(
nullptr), *bMin(
nullptr), *bMax(
nullptr);
8591 if (!bMin || n2 < nMin) {
8595 if (!bMax || n2 > nMax) {
8600 if (bMin && nMin != nMax) {
8601 Warning(
"SetEntries",
"Tree branches have different numbers of entries, eg %s has %lld entries while %s has %lld entries.",
8602 bMin->GetName(), nMin, bMax->
GetName(), nMax);
8654 char enlistname[100];
8661 for (
Int_t i=0; i<nsel; i++){
8702 UChar_t newFeatures = ~curFeatures & featuresRequested;
8703 curFeatures |= newFeatures;
8721 Warning(
"SetFileNumber",
"file number must be positive. Set to 0");
8737 for (
Int_t i = 0; i < nb; ++i) {
8895 Error(
"Show()",
"Cannot read entry %lld (entry does not exist)", entry);
8897 }
else if (ret == -1) {
8898 Error(
"Show()",
"Cannot read entry %lld (I/O error)", entry);
8903 Error(
"Show()",
"Cannot read entry %lld (I/O error)", entry);
8905 }
else if (ret == 0) {
8906 Error(
"Show()",
"Cannot read entry %lld (no data read)", entry);
8914 for (
Int_t i = 0; i < nleaves; i++) {
8943 printf(
" %-15s = ", leaf->
GetName());
8946 if (
l == (len - 1)) {
8951 if ((
l % ltype) == 0) {
8983 Error(
"StopCacheLearningPhase",
"Could not load a tree");
8992 Error(
"StopCacheLearningPhase",
"No tree is available. Could not stop cache learning phase");
8998 Error(
"StopCacheLearningPhase",
"No file is available. Could not stop cache learning phase");
9003 Error(
"StopCacheLearningPhase",
"No cache is available. Could not stop learning phase");
9016 for (
Int_t i = 0; i < nb; ++i) {
9022 for (
Int_t j=writeBasket,
n=0;j>=0 &&
n<nBaskets;--j) {
9054 if (
b.IsReading()) {
9065 Version_t R__v =
b.ReadVersion(&R__s, &R__c);
9079 Warning(
"Streamer",
"Old style index in this tree is deleted. Rebuild the index via TTree::BuildIndex");
9099 if (zipBytes != 0) {
9101 }
else if (totBytes != 0) {
9120 TNamed::Streamer(
b);
9121 TAttLine::Streamer(
b);
9122 TAttFill::Streamer(
b);
9123 TAttMarker::Streamer(
b);
9139 if (R__v > 2)
fIndex.Streamer(
b);
9142 OldInfoList.Streamer(
b);
9148 b.CheckByteCount(R__s, R__c, TTree::IsA());
9275 return ((
const TTree*)
this)->Write(
name, option, bufsize);
9305 , fDirection(iter.fDirection)
9337 if (!
fTree)
return 0;
9344 if (!list)
return 0;
9353 if (!list)
return next;
9361 if (!nextTree)
return Next();
A zero length substring is legal.
Bool_t HasRuleWithSourceClass(const TString &source) const
Return True if we have any rule whose source class is 'source'.
TTree * fParentTree
! pointer to the parent TTree
Describe Streamer information for one class version
void Foreach(F func, unsigned nTimes)
Execute func (with no arguments) nTimes in parallel.
virtual Bool_t GetReapplyCut() const
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 const char * GetName() const
Returns name of object.
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Double_t fWeight
Tree weight (see TTree::SetWeight)
virtual Int_t Occurence(const TObject *obj) const
Return occurence number of object in the list of objects of this folder.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual Int_t MakeProxy(const char *classname, const char *macrofilename=0, const char *cutfilename=0, const char *option=0, Int_t maxUnrolling=3)=0
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Long64_t Previous()
Move on to the previous cluster and return the starting entry of this previous cluster.
virtual void AddTotBytes(Int_t tot)
TTreeCache * GetReadCache(TFile *file, Bool_t create=kFALSE)
Find and return the TTreeCache registered with the file and which may contain branches for us...
A TFolder object is a collection of objects and folders.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch after a Merge operation (drop data but keep customizations) TRefTable is cleared...
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=0, Bool_t canOptimize=kTRUE)
Build StreamerInfo for class cl.
static TDataType * GetDataType(EDataType type)
Given a EDataType type, get the TDataType* that represents it.
Long64_t fDebugMin
! First entry number to debug
Principal Components Analysis (PCA)
TTree * fTree
tree being iterated
virtual Int_t FillImpl(ROOT::Internal::TBranchIMTHelper *)
Loop on all leaves of this branch to fill Basket buffer.
virtual TDirectory * GetDirectory() const
virtual void Append(const TVirtualIndex *, Bool_t delaySort=kFALSE)=0
virtual TList * GetListOfKeys() const
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
virtual Option_t * GetOption() const
TString GetTypeName()
Get basic type of typedef, e,g.
virtual TTree * GetTree()
Return pointer to friend TTree.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
virtual void SetAddress(void *add)
Set address of this branch.
virtual void OptimizeBaskets(ULong64_t maxMemory=10000000, Float_t minComp=1.1, Option_t *option="")
This function may be called after having filled some entries in a Tree.
Bool_t MemoryFull(Int_t nbytes)
Check if adding nbytes to memory we are still below MaxVirtualsize.
virtual TBranch * BranchImpRef(const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)
Same as TTree::Branch but automatic detection of the class name.
virtual Int_t MakeCode(const char *filename=0)
Generate a skeleton function for this tree.
TIterator * fTreeIter
current tree sub-iterator.
Abstract interface for Tree Index.
virtual Int_t GetBasketSize() const
virtual void SetReapplyCut(Bool_t apply=kFALSE)
virtual Int_t MakeReader(const char *classname, Option_t *option)=0
virtual Long64_t ReadStream(std::istream &inputStream, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from an input stream.
Namespace for new ROOT classes and functions.
virtual Int_t StopCacheLearningPhase()
Stop the cache learning phase.
virtual void SetBranchStatus(const char *bname, Bool_t status=1, UInt_t *found=0)
Set branch status to Process or DoNotProcess.
virtual void Delete(Option_t *option="")
Delete this tree from memory or/and disk.
Bool_t EqualTo(const char *cs, ECaseCompare cmp=kExact) const
A Branch for the case of an object.
const char * GetFullTypeName() const
Get full type description of data member, e,g.: "class TDirectory*".
TObjArray * GetListOfBaskets()
static Int_t fgBranchStyle
Old/New branch style.
virtual void AddZipBytes(Int_t zip)
virtual void SetTree(const TTree *T)=0
virtual Int_t LoadBaskets(Long64_t maxmemory=2000000000)
Read in memory all baskets from all branches up to the limit of maxmemory bytes.
virtual void Clear(Option_t *option="")
Remove all objects from the array.
virtual Int_t GetExpectedType(TClass *&clptr, EDataType &type)
Fill expectedClass and expectedType with information on the data type of the object/values contained ...
TVirtualStreamerInfo * FindConversionStreamerInfo(const char *onfile_classname, UInt_t checksum) const
Return a Conversion StreamerInfo from the class 'classname' for the layout represented by 'checksum' ...
static Long64_t GetMaxTreeSize()
Static function which returns the tree file size limit in bytes.
virtual void SetParallelUnzip(Bool_t opt=kTRUE, Float_t RelSize=-1)
Enable or disable parallel unzipping of Tree buffers.
TVirtualStreamerInfo * GetConversionStreamerInfo(const char *onfile_classname, Int_t version) const
Return a Conversion StreamerInfo from the class 'classname' for version number 'version' to this clas...
virtual Int_t MakeCode(const char *filename)=0
Provides the interface for the PROOF internal performance measurement and event tracing.
A cache when reading files over the network.
virtual Bool_t Notify()
Function called when loading a new class library.
TTree()
Default constructor and I/O constructor.
virtual TTree * GetFriend(const char *) const
Return a pointer to the TTree friend whose name or alias is 'friendname.
void GetObject(const char *namecycle, T *&ptr)
virtual TClass * GetValueClass() const =0
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
All ROOT classes may have RTTI (run time type identification) support added.
virtual Long64_t GetEntriesFast() const
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
virtual void Flush()
Synchronize a file's in-memory and on-disk states.
virtual void Print(Option_t *option="") const
Print a summary of the tree contents.
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=0, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
Long64_t GetZipBytes(Option_t *option="") const
Return total number of zip bytes in the branch if option ="*" includes all sub-branches of this branc...
virtual Int_t Fit(const char *funcname, const char *varexp, const char *selection="", Option_t *option="", Option_t *goption="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Fit a projected item(s) from a tree.
TIterator * fLeafIter
current leaf sub-iterator.
TString & ReplaceAll(const TString &s1, const TString &s2)
R__EXTERN TStyle * gStyle
TList * fFriends
pointer to list of friend elements
void SetHistLineWidth(Width_t width=1)
TPrincipal * Principal(const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Interface to the Principal Components Analysis class.
virtual Int_t Fill()
Fill all branches.
Int_t GetMakeClass() const
virtual TEntryList * GetEntryList()
Returns the entry list, set to this tree.
ROOT::TIOFeatures SetIOFeatures(const ROOT::TIOFeatures &)
Provide the end-user with the ability to enable/disable various experimental IO features for this TTr...
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual void DropBaskets(Option_t *option="")
Loop on all branch baskets.
static void SetBranchStyle(Int_t style=1)
Set the current branch style.
A specialized TFileCacheRead object for a TTree.
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...
const std::type_info * GetTypeInfo() const
static Int_t SetParallelUnzip(TTreeCacheUnzip::EParUnzipMode option=TTreeCacheUnzip::kEnable)
Static function that (de)activates multithreading unzipping.
static char DataTypeToChar(EDataType datatype)
TVirtualStreamerInfo * GetStreamerInfo(Int_t version=0) const
returns a pointer to the TVirtualStreamerInfo object for version If the object does not exist...
virtual void PrintValue(Int_t i=0) const
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
const char * GetTypeName() const
Get type of data member, e,g.: "class TDirectory*" -> "TDirectory".
virtual Int_t GetEntries() const
virtual TLeaf * GetLeafImpl(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 TList * GetListOfFriends() const
virtual Long64_t GetAutoFlush() const
Buffer base class used for serializing objects.
bool Set(EIOFeatures bits)
Set a specific IO feature.
Regular expression class.
TDirectory * fDirectory
! Pointer to directory holding this tree
constexpr Float_t kNEntriesResortInv
Int_t fMakeClass
! not zero when processing code generated by MakeClass
virtual TBasket * CreateBasket(TBranch *)
Create a basket for this tree and given branch.
TList * GetListOfDataMembers(Bool_t load=kTRUE)
Return list containing the TDataMembers of a class.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual Int_t WriteTObject(const TObject *obj, const char *name=0, Option_t *="", Int_t=0)
See TDirectoryFile::WriteTObject for details.
void ForceWriteInfo(TFile *file, Bool_t force=kFALSE)
Recursively mark streamer infos for writing to a file.
virtual TPrincipal * Principal(const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual void SetAutoSave(Long64_t autos=-300000000)
This function may be called at the start of a program to change the default value for fAutoSave (and ...
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
virtual Int_t ReadKeys(Bool_t=kTRUE)
virtual Int_t GetOffset() const
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
virtual void SetAddress(void *addobj)
Point this branch at an object.
virtual Int_t MakeProxy(const char *classname, const char *macrofilename=0, const char *cutfilename=0, const char *option=0, Int_t maxUnrolling=3)
Generate a skeleton analysis class for this Tree using TBranchProxy.
virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor) const =0
Short_t Min(Short_t a, Short_t b)
virtual void SetTargetClass(const char *name)
Set the name of the class of the in-memory object into which the data will loaded.
void ToLower()
Change string to lower-case.
static TBranch * R__FindBranchHelper(TObjArray *list, const char *branchname)
Search in the array for a branch matching the branch name, with the branch possibly expressed as a 'f...
R__EXTERN TVirtualMutex * gROOTMutex
virtual void Browse(TBrowser *)
Browse content of the TTree.
constexpr std::array< decltype(std::declval< F >)(std::declval< int >))), N > make(F f)
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void StopLearningPhase()
This is the counterpart of StartLearningPhase() and can be used to stop the learning phase...
static void SetMaxTreeSize(Long64_t maxsize=100000000000LL)
Set the maximum size in bytes of a Tree file (static function).
TIOFeatures provides the end-user with the ability to change the IO behavior of data written via a TT...
Int_t fScanField
Number of runs before prompting in Scan.
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
TObject * At(Int_t idx) const
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Copy a tree with selection.
virtual void KeepCircular()
Keep a maximum of fMaxEntries in memory.
TArrayD fIndexValues
Sorted index values.
void SetAutoCreated(Bool_t val)
virtual EDataType GetType() const =0
constexpr Int_t kNEntriesResort
virtual Long64_t GetEntries(const char *)=0
Long64_t fMaxEntryLoop
Maximum number of entries to process.
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
virtual void SetMaxVirtualSize(Long64_t size=0)
virtual TSQLResult * Query(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Loop over entries and return a TSQLResult object containing entries following selection.
Streamer around an arbitrary STL like container, which implements basic container functionality...
void ToHumanReadableSize(value_type bytes, Bool_t si, Double_t *coeff, const char **units)
Return the size expressed in 'human readable' format.
virtual Int_t AddBranch(TBranch *b, Bool_t subgbranches=kFALSE)
Add a branch to the list of branches to be stored in the cache this function is called by TBranch::Ge...
virtual Int_t DeleteGlobal(void *obj)=0
virtual void SetupAddresses()
If the branch address is not set, we set all addresses starting with the top level parent branch...
virtual void SetTree(const TTree *tree)
If a list for a tree with such name and filename exists, sets it as the current sublist If not...
Iterator abstract base class.
virtual Width_t GetLineWidth() const
Return the line width.
void BypassStreamer(Bool_t bypass=kTRUE)
When the kBypassStreamer bit is set, the automatically generated Streamer can call directly TClass::W...
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Reset(Option_t *option="")
virtual Int_t Fit(const char *formula, const char *varexp, const char *selection, Option_t *option, Option_t *goption, Long64_t nentries, Long64_t firstentry)=0
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
Width_t GetHistLineWidth() const
if object in a list can be deleted
virtual void SetFileNumber(Int_t number=0)
Set fFileNumber to number.
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual void Print(Option_t *option="") const
Print the TRefTable branch.
virtual void DirectoryAutoAdd(TDirectory *)
Called by TKey and TObject::Clone to automatically add us to a directory when we are read from a file...
static Bool_t IsParallelUnzip()
Static function that tells wether the multithreading unzipping is activated.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
virtual void SetTree(TTree *tree)
virtual void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
static void SetRefTable(TRefTable *table)
Static function setting the current TRefTable.
Bool_t fIMTFlush
! True if we are doing a multithreaded flush.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void StartViewer()
Start the TTreeViewer on this tree.
virtual Long64_t Merge(TCollection *list, Option_t *option="")
Merge the trees in the TList into this tree.
static TVirtualTreePlayer * TreePlayer(TTree *obj)
Static function returning a pointer to a Tree player.
virtual void SetBranchFolder()
virtual Style_t GetLineStyle() const
Return the line style.
virtual Int_t GetEntryWithIndex(Int_t major, Int_t minor=0)
Read entry corresponding to major and minor number.
TList * fAliases
List of aliases for expressions based on the tree branches.
EFromHumanReadableSize FromHumanReadableSize(std::string_view str, T &value)
Convert strings like the following into byte counts 5MB, 5 MB, 5M, 3.7GB, 123b, 456kB, 3.7GiB, 5MiB with some amount of forgiveness baked into the parsing.
Long64_t GetTotBytes(Option_t *option="") const
Return total number of bytes in the branch (excluding current buffer) if option ="*" includes all sub...
virtual Long64_t DrawSelect(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual Int_t FlushBaskets() const
Write to disk all the basket that have not yet been individually written.
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
Bool_t fCacheDoClusterPrefetch
! true if cache is prefetching whole clusters
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
virtual TObjArray * GetListOfBranches()
Helper class to iterate over cluster of baskets.
TVirtualTreePlayer * fPlayer
! Pointer to current Tree player
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Fill Area Attributes class.
void ImportClusterRanges(TTree *fromtree)
Appends the cluster range information stored in 'fromtree' to this tree, including the value of fAuto...
virtual void SetAutoFlush(Long64_t autof=-30000000)
This function may be called at the start of a program to change the default value for fAutoFlush...
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
Bool_t IsAutoCreated() const
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="")
Copy nentries from given tree to this tree.
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr=0)
Change branch address, dealing with clone trees properly.
void SetHistFillColor(Color_t color=1)
Int_t fNfill
! Local for EntryLoop
UChar_t GetFeatures() const
virtual Double_t GetValue(Int_t i=0) const
virtual void SetObject(const char *name, const char *title)
Change the name and title of this tree.
virtual Bool_t IsWritable() const
The TNamed class is the base class for all named ROOT classes.
virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
virtual Bool_t Notify()
This method must be overridden to handle object notification.
virtual Long64_t GetReadEntry() const
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
virtual TLeaf * GetLeaf(const char *name) const
Return pointer to the 1st Leaf named name in thisBranch.
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
Bool_t fCacheUserSet
! true if the cache setting was explicitly given by user
virtual void SetTreeIndex(TVirtualIndex *index)
The current TreeIndex is replaced by the new index.
virtual Long64_t GetEntry(Int_t index) const
Return value of entry at index in the list.
Int_t fMaxClusterRange
! Memory allocated for the cluster range.
static Int_t GetBranchStyle()
Static function returning the current branch style.
virtual Int_t BuildIndex(const char *majorname, const char *minorname="0")
Build a Tree Index (default is TTreeIndex).
virtual Int_t UnbinnedFit(const char *funcname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Unbinned fit of one or more variable(s) from a tree.
virtual Bool_t SetMakeClass(Bool_t decomposeObj=kTRUE)
Set the branch in a mode where the object are decomposed (Also known as MakeClass mode)...
virtual TBranch * BranchOld(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1)
Create a new TTree BranchObject.
Bool_t IsLoaded() const
Return true if the shared library of this class is currently in the a process's memory.
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
virtual TBranch * FindBranch(const char *name)
Find the immediate sub-branch with passed name.
TBranchRef * fBranchRef
Branch supporting the TRefTable (if any)
virtual Int_t MakeClass(const char *classname=0, Option_t *option="")
Generate a skeleton analysis class for this tree.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
TIOFeatures * fIOFeatures
virtual Int_t GetN() const
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Style_t GetHistFillStyle() const
const Int_t kDoNotProcess
UInt_t fFriendLockStatus
! Record which method is locking the friend recursion
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
Long_t GetThisOffset() const
virtual Int_t MakeClass(const char *classname, const char *option)=0
Int_t fTimerInterval
Timer interval in milliseconds.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
TDataType * GetDataType() const
virtual Long64_t Scan(const char *varexp="", const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Loop over tree entries and print entries passing selection.
Long64_t fFlushedBytes
Number of auto-flushed bytes.
virtual Int_t GetLenType() const
TObjArray * GetListOfBranches()
UInt_t fNEntriesSinceSorting
! Number of entries processed since the last re-sorting of branches
Ssiz_t First(char c) const
Find first occurrence of a character c.
Specialization of TTreeCache for parallel Unzipping.
virtual TList * GetList() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Delete(Option_t *option="")
Delete an object from the file.
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
void Set(Int_t n)
Set size of this array to n ints.
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
virtual void SetAddress(void *add=0)
TCollection * GetListOfFolders() const
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
std::atomic< Long64_t > fIMTZipBytes
! Zip bytes for the IMT flush baskets.
virtual void SetCacheLearnEntries(Int_t n=10)
Interface to TTreeCache to set the number of entries for the learning phase.
A branch containing and managing a TRefTable for TRef autoloading.
Long64_t fZipBytes
Total number of bytes in all branches after compression.
virtual TFile * GetFile() const
Long64_t fDebugMax
! Last entry number to debug
virtual TBranch * BranchImp(const char *branchname, const char *classname, TClass *ptrClass, void *addobj, Int_t bufsize, Int_t splitlevel)
Same as TTree::Branch() with added check that addobj matches className.
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual TTree * GetTree() const
virtual void SetEventList(TEventList *list)
This function transfroms the given TEventList into a TEntryList The new TEntryList is owned by the TT...
void Expand(Int_t newsize, Bool_t copy=kTRUE)
Expand (or shrink) the I/O buffer to newsize bytes.
virtual Int_t GetTreeNumber() const
void UseCurrentStyle()
Replace current attributes by current style.
A specialized string object used for TTree selections.
virtual void ResetAfterMerge(TFileMergeInfo *)
Reset a Branch.
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
Bool_t fCacheDoAutoInit
! true if cache auto creation or resize check is needed
Int_t GetRecordHeader(char *buf, Long64_t first, Int_t maxbytes, Int_t &nbytes, Int_t &objlen, Int_t &keylen)
Read the logical record header starting at a certain postion.
TObjArray fLeaves
Direct pointers to individual branch leaves.
Long64_t * fClusterRangeEnd
[fNClusterRange] Last entry of a cluster range.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
void BuildRealData(void *pointer=0, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
Using a TBrowser one can browse all ROOT objects.
This class provides a simple interface to execute the same task multiple times in parallel...
Int_t fNClusterRange
Number of Cluster range in addition to the one defined by 'AutoFlush'.
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
TEntryList * fEntryList
! Pointer to event selection list (if one)
virtual Int_t GetLen() const
Return the number of effective elements of this leaf.
virtual Long64_t GetAutoSave() const
void SetParentClass(TClass *clparent)
virtual void SetEntryRange(Long64_t emin, Long64_t emax)
Set the minimum and maximum entry number to be processed this information helps to optimize the numbe...
Int_t GetReadBasket() const
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
virtual void SetEstimate(Long64_t nentries=1000000)
Set number of entries to estimate variable limits.
virtual void SetOffset(Int_t offset=0)
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual void UpdateFormulaLeaves()=0
virtual Int_t DropBranch(TBranch *b, Bool_t subbranches=kFALSE)
Remove a branch to the list of branches to be stored in the cache this function is called by TBranch:...
void SetHistFillStyle(Style_t styl=0)
void SetCompressionSettings(Int_t settings=1)
Set compression settings.
R__EXTERN TSystem * gSystem
Long64_t fChainOffset
! Offset of 1st entry of this Tree in a TChain
~TFriendLock()
Restore the state of tree the same as before we set the lock.
Long64_t * fClusterSize
[fNClusterRange] Number of entries in each cluster for a given range.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Basic data type descriptor (datatype information is obtained from CINT).
void TFriendElement__SetTree(TTree *tree, TList *frlist)
Set the fTree member for all friend elements.
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
TVirtualPerfStats * fPerfStats
! pointer to the current perf stats object
TClass * GetActualClass(const void *object) const
Return a pointer the the real class of the object.
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const =0
virtual TObject * RemoveAt(Int_t idx)
Remove object at index idx.
virtual Int_t ReadTObject(TObject *, const char *)
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Long64_t fReadEntry
! Number of the entry being processed
virtual TVirtualIndex * GetTreeIndex() const
virtual Bool_t HasPointers() const =0
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Int_t GetWriteBasket() const
virtual ~TTree()
Destructor.
TDataMember * GetDataMember() const
Collection abstract base class.
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
TList * fUserInfo
pointer to a list of user objects associated to this Tree
TObjArray fBranches
List of Branches.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Int_t GetEntriesFast() const
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
TFile * GetCurrentFile() const
Return pointer to the current file.
virtual Long64_t GetN() const =0
virtual Long64_t GetEntry(Int_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next()...
virtual void MakeFree(Long64_t first, Long64_t last)
Mark unused bytes on the file.
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual TLeaf * GetLeafCount() const
Manages buffers for branches of a Tree.
virtual void * GetValuePointer() const
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
Int_t GetMaxBaskets() const
A TEventList object is a list of selected events (entries) in a TTree.
virtual TLeaf * FindLeaf(const char *name)
Find leaf..
The TRealData class manages the effective list of all data members for a given class.
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall=0)
Read all leaves of entry and return total number of bytes read.
Bool_t CanIgnoreTObjectStreamer()
TArrayI fIndex
Index of sorted values.
The ROOT global object gROOT contains a list of all defined classes.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
static void SetLearnEntries(Int_t n=10)
Static function to set the number of entries to be used in learning mode The default value for n is 1...
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Bool_t fIMTEnabled
! true if implicit multi-threading is enabled for this tree
Option_t * GetOption() const
Returns the object option stored in the list.
virtual TBranchRef * GetBranchRef() const
Bool_t InheritsFrom(const char *cl) const
Return kTRUE if this class inherits from a class with name "classname".
void SetName(const char *name)
virtual void ResetBranchAddress(TBranch *)
Tell all of our branches to set their addresses to zero.
ROOT::TIOFeatures GetIOFeatures() const
Returns the current set of IO settings.
Bool_t fDirection
iteration direction
TEventList * fEventList
! Pointer to event selection list (if one)
virtual TBranch * Bronch(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
Create a new TTree BranchElement.
virtual const char * GetTreeName() const
virtual Bool_t GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
if object destructor must call RecursiveRemove()
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Long64_t fMaxEntries
Maximum number of entries in case of circular buffers.
void AddClone(TTree *)
Add a cloned tree to our list of trees to be notified whenever we change our branch addresses or when...
void SetIOFeatures(TIOFeatures &features)
virtual void KeepCircular(Long64_t maxEntries)
keep a maximum of fMaxEntries in memory
Each class (see TClass) has a linked list of its base class(es).
char GetNewlineValue(std::istream &inputStream)
Determine which newline this file is using.
virtual TObjLink * FirstLink() const
A Branch for the case of an object.
virtual Long64_t GetBasketSeek(Int_t basket) const
Return address of basket in the file.
virtual Int_t DropBranchFromCache(const char *bname, Bool_t subbranches=kFALSE)
Remove the branch with name 'bname' from the Tree cache.
void InitializeBranchLists(bool checkLeafCount)
Divides the top-level branches into two vectors: (i) branches to be processed sequentially and (ii) b...
Long64_t fAutoSave
Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced.
virtual void SaveSelf(Bool_t=kFALSE)
virtual void SetBasketSize(Int_t buffsize)
Set the basket size The function makes sure that the basket size is greater than fEntryOffsetlen.
virtual Int_t CheckBranchAddressType(TBranch *branch, TClass *ptrClass, EDataType datatype, Bool_t ptr)
Check whether or not the address described by the last 3 parameters matches the content of the branch...
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999)
Set the debug level and the debug range.
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Process this tree executing the TSelector code in the specified filename.
static unsigned int total
static const Ssiz_t kNPOS
TString & Remove(Ssiz_t pos)
virtual void DropBuffers(Int_t nbytes)
Drop branch buffers to accommodate nbytes below MaxVirtualsize.
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode)...
virtual void SetWeight(Double_t w=1, Option_t *option="")
Set tree weight.
Color_t GetHistFillColor() const
Version_t GetClassVersion() const
TObjArray * Tokenize(const TString &delim) const
This function is used to isolate sequential tokens in a TString.
Long64_t Next()
Move on to the next cluster and return the starting entry of this next cluster.
TIterator * MakeIterator(Bool_t dir=kIterForward) const
Returns an array iterator.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
virtual Long64_t LoadTreeFriend(Long64_t entry, TTree *T)
Load entry on behalf of our master tree, we may use an index.
virtual void SetEstimate(Long64_t n)=0
TObject * UncheckedAt(Int_t i) const
virtual void Print(Option_t *option="") const
Print cache statistics.
Long64_t fMaxVirtualSize
Maximum total size of buffers kept in memory.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
virtual Int_t GetMaximum() const
virtual void StartViewer(Int_t ww, Int_t wh)=0
virtual void SetEntryList(TEntryList *list, Option_t *opt="")
Set an EntryList.
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator. Does NOT copy the 'cursor' location!
virtual void ResetAddress()
Reset the address of the branch.
virtual TKey * GetKey(const char *, Short_t=9999) const
virtual void Clear(Option_t *option="")
Clear entries in the TRefTable.
Ssiz_t Last(char c) const
Find last occurrence of a character c.
static TRefTable * GetRefTable()
Static function returning the current TRefTable.
Long64_t GetCacheAutoSize(Bool_t withDefault=kFALSE) const
Used for automatic sizing of the cache.
void SetHistLineStyle(Style_t styl=0)
Long64_t fTotBytes
Total number of bytes in all branches before compression.
virtual void WaitFinishPrefetch()
Data member is a pointer to an array of basic types.
Color_t GetHistLineColor() const
std::vector< TBranch * > fSeqBranches
! Branches to be processed sequentially when IMT is on
Describe directory structure in memory.
virtual void SetPerfStats(TVirtualPerfStats *perf)
Set perf stats.
std::vector< std::pair< Long64_t, TBranch * > > fSortedBranches
! Branches to be processed in parallel when IMT is on, sorted by average task time ...
TDirectory * GetDirectory() const
virtual const char * GetClassName() const
Return the name of the user class whose content is stored in this branch, if any. ...
static void TBranch__SetTree(TTree *tree, TObjArray &branches)
Set the fTree member for all branches and sub branches.
Wrapper around a TObject so it can be stored in a TList.
void SortBranchesByTime()
Sorts top-level branches by the last average task time recorded per branch.
virtual Int_t GetBufferSize() const
unsigned long long ULong64_t
virtual Long64_t ReadFile(const char *filename, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from filename.
TList * GetListOfRealData() const
Bool_t HasDataMemberInfo() const
Long64_t fAutoFlush
Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced...
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.
virtual void Draw(Option_t *opt)
Default Draw method for all objects.
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
A TRefTable maintains the association between a referenced object and the parent object supporting th...
virtual Color_t GetFillColor() const
Return the fill area color.
Int_t fDefaultEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
static constexpr double s
#define R__LOCKGUARD(mutex)
void Browse(TBrowser *b)
Browse this collection (called by TBrowser).
TObjArray * GetListOfLeaves()
Long64_t fEstimate
Number of entries to estimate histogram limits.
static void SetUnzipRelBufferSize(Float_t relbufferSize)
static function: Sets the unzip relatibe buffer size
Helper class to prevent infinite recursion in the usage of TTree Friends.
virtual Bool_t Enter(Long64_t entry, TTree *tree=0)
Add entry #entry to the list.
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.
virtual Int_t SetBufferSize(Int_t buffersize)
Change the underlying buffer size of the cache.
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache .
Int_t fDebug
! Debug level
virtual Int_t UnbinnedFit(const char *formula, const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
Int_t SetCacheSizeAux(Bool_t autocache=kTRUE, Long64_t cacheSize=0)
Set the size of the file cache and create it if possible.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Long64_t GetEntries() const
Bool_t IsPersistent() const
TClass * GetClass() const
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
virtual void SetBasketSize(const char *bname, Int_t buffsize=16000)
Set a branch's basket size.
virtual TFile * GetFile()
Return pointer to TFile containing this friend TTree.
virtual TBranch * BranchRef()
Build the optional branch supporting the TRefTable.
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this TTree after a merge (keep the customization but forget the data)...
virtual Bool_t SetAlias(const char *aliasName, const char *aliasFormula)
Set a tree variable alias.
Int_t fFileNumber
! current file number (if file extensions)
Mother of all ROOT objects.
TObjArray * GetElements() const
Int_t fUpdate
Update frequency for EntryLoop.
virtual void ReadValue(std::istream &, Char_t=' ')
virtual Long64_t GetEND() const
A Branch handling STL collection of pointers (vectors, lists, queues, sets and multisets) while stori...
static void * ReAlloc(void *vp, size_t size)
Reallocate (i.e.
virtual Int_t Branch(TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="")
Create one branch for each element in the collection.
TDirectory * fOutputDirectory
TObject * GetObject() const
virtual void SetEntryOffsetLen(Int_t len, Bool_t updateSubBranches=kFALSE)
Update the default value for the branch's fEntryOffsetLen if and only if it was already non zero (and...
virtual Long64_t Scan(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual const char * GetTitle() const
Returns title of object.
virtual void SetFile(TFile *file=0)
Set file where this branch writes/reads its buffers.
Long64_t fEntries
Number of entries.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
TList * fClones
! List of cloned trees which share our addresses
virtual void Refresh(TBranch *b)
Refresh this branch using new information in b This function is called by TTree::Refresh.
Long64_t GetEntries() const
Style_t GetHistLineStyle() const
virtual Int_t MakeSelector(const char *selector=0, Option_t *option="")
Generate skeleton selector class for this tree.
An array of clone (identical) objects.
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TTree for reading/writing baskets.
virtual Long64_t GetTotBytes() const
Class implementing or helping the various TTree cloning method.
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
virtual Int_t DropBuffers()
Drop buffers of this basket if it is not the current basket.
ROOT::ESTLType IsSTLContainer()
Return which type (if any) of STL container the data member is.
Abstract base class defining the interface for the plugins that implement Draw, Scan, Process, MakeProxy, etc.
A Branch for the case of an array of clone objects.
virtual void Add(TObject *obj)
#define R__unlikely(expr)
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
TClusterIterator(TTree *tree, Long64_t firstEntry)
Regular constructor.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
Short_t Max(Short_t a, Short_t b)
virtual void Reset(Option_t *option="")
Reset a Branch.
A TFriendElement TF describes a TTree object TF in a file.
virtual Long64_t GetZipBytes() const
virtual TObject * Next()=0
virtual const char * GetMinorName() const =0
Iterator on all the leaves in a TTree and its friend.
virtual TBranch * BronchExec(const char *name, const char *classname, void *addobj, Bool_t isptrptr, Int_t bufsize, Int_t splitlevel)
Helper function implementing TTree::Bronch and TTree::Branch(const char *name, T &obj);.
virtual void RecursiveRemove(TObject *obj)
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree...
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual Int_t LoadBaskets()
Baskets associated to this branch are forced to be in memory.
Int_t GetEntries() const
Return the number of objects in array (i.e.
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
Int_t GetBufferSize() const
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
virtual const char * GetMajorName() const =0
std::atomic< Long64_t > fTotalBuffers
! Total number of bytes in branch buffers
TFileCacheRead * GetCacheRead(TObject *tree=0) const
Return a pointer to the current read cache.
virtual char * GetAddress() const
TObject * fNotify
! Object to be notified when loading a Tree
virtual Int_t SetCacheEntryRange(Long64_t first, Long64_t last)
interface to TTreeCache to set the cache entry range
Double_t Atof() const
Return floating-point value contained in string.
A TTree object has a header with a name and a title.
TVirtualIndex * fTreeIndex
Pointer to the tree Index (if any)
TFriendLock & operator=(const TFriendLock &)
Assignment operator.
Int_t SetBranchAddressImp(TBranch *branch, void *addr, TBranch **ptr)
Change branch address, dealing with clone trees properly.
virtual TVirtualIndex * BuildIndex(const TTree *T, const char *majorname, const char *minorname)=0
virtual void SetDefaultEntryOffsetLen(Int_t newdefault, Bool_t updateExisting=kFALSE)
Update the default value for the branch's fEntryOffsetLen.
virtual TObject ** GetObjectRef(const TObject *obj) const =0
const ROOT::Detail::TSchemaRuleSet * GetSchemaRules() const
Return the set of the schema rules if any.
TObject * Next()
Go the next friend element.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual void DropBaskets()
Remove some baskets from memory.
Int_t FlushBaskets()
Flush to disk all the baskets of this branch and any of subbranches.
virtual TSQLResult * Query(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
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...
static Long64_t fgMaxTreeSize
Maximum size of a file containing a Tree.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual Long64_t GetEntryNumberFriend(const TTree *)=0
virtual TFile * GetFile(Int_t mode=0)
Return pointer to the file where branch buffers reside, returns 0 in case branch buffers reside in th...
virtual Long64_t SetEntries(Long64_t n=-1)
Change number of entries in the tree.
R__EXTERN TInterpreter * gCling
TBranch * GetBranch() const
virtual void Compress()
Remove empty slots from array.
virtual TFile * ChangeFile(TFile *file)
Called by TTree::Fill() when file has reached its maximum fgMaxTreeSize.
virtual const char * GetName() const
Returns name of object.
static TTree * MergeTrees(TList *list, Option_t *option="")
Static function merging the trees in the TList into a new tree.
virtual Int_t GetSize() const
A TTree is a list of TBranches.
virtual const char * GetName() const
Returns name of object.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
void SetHistLineColor(Color_t color=1)
Bool_t IsaPointer() const
Return true if data member is a pointer.
virtual void Print(Option_t *option="") const
Print TBranch parameters.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
A List of entry numbers in a TTree or TChain.
virtual Int_t AddBranchToCache(const char *bname, Bool_t subbranches=kFALSE)
Add branch with name bname to the Tree cache.
Int_t fPacketSize
! Number of entries in one packet for parallel root
void Set(Int_t n)
Set size of this array to n doubles.
virtual Long64_t Project(const char *hname, const char *varexp, const char *selection="", Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Make a projection of a tree using selections.
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor) const =0
TIOFeatures fIOFeatures
IO features to define for newly-written baskets and branches.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
static constexpr Long64_t kMaxEntries
TBranch * GetMother() const
Get our top-level parent branch in the tree.
TFriendLock(const TFriendLock &)
Copy constructor.
virtual void SetObject(void *objadd)
Set object this branch is pointing to.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual const char * GetName() const
Return name of this collection.
virtual Long64_t GetEntriesFriend() const
Return pointer to the 1st Leaf named name in any Branch of this Tree or any branch in the list of fri...
virtual void SetName(const char *name)
Change the name of this tree.
Int_t GetCompressionSettings() const
Long64_t GetEstimatedClusterSize()
In the case where the cluster size was not fixed (old files and case where autoflush was explicitly s...
virtual const char * GetTitle() const
Returns title of object.
virtual void PrintCacheStats(Option_t *option="") const
Print statistics about the TreeCache for this tree.
void MoveReadCache(TFile *src, TDirectory *dir)
Move a cache from a file to the current file in dir.
virtual void CopyAddresses(TTree *, Bool_t undo=kFALSE)
Set branch addresses of passed tree equal to ours.
virtual TObjArray * GetListOfLeaves()
static void ResetCount()
Static function resetting fgCount.
Long64_t fSavedBytes
Number of autosaved bytes.
Long64_t fCacheSize
! Maximum size of file buffers
virtual const char * GetFriendAlias(TTree *) const
If the 'tree' is a friend, this method returns its alias name.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.
const char * Data() const
std::atomic< Long64_t > fIMTTotBytes
! Total bytes for the IMT flush baskets