504 case kchar:
return 0;
509 case kBits:
return 0;
545 fMethodBit(
tfl.fMethodBit),
546 fPrevious(
tfl.fPrevious)
557 fMethodBit=
tfl.fMethodBit;
558 fPrevious=
tfl.fPrevious;
570 fTree->fFriendLockStatus &= ~(fMethodBit &
kBitMask);
642 if (fEstimatedSize > 0)
return fEstimatedSize;
646 fEstimatedSize = fTree->GetEntries() - 1;
647 if (fEstimatedSize <= 0)
651 Long64_t cacheSize = fTree->GetCacheSize();
652 if (cacheSize == 0) {
654 TFile *file = fTree->GetCurrentFile();
663 if (cacheSize <= 0) {
664 cacheSize = 30000000;
670 return fEstimatedSize;
679 fStartEntry = fNextEntry;
680 if (fTree->fNClusterRange || fTree->GetAutoFlush() > 0) {
681 if (fClusterRange == fTree->fNClusterRange) {
684 fNextEntry += GetEstimatedClusterSize();
686 if (fStartEntry > fTree->fClusterRangeEnd[fClusterRange]) {
689 if (fClusterRange == fTree->fNClusterRange) {
692 fNextEntry += GetEstimatedClusterSize();
699 if (fNextEntry > fTree->fClusterRangeEnd[fClusterRange]) {
703 fNextEntry = fTree->fClusterRangeEnd[fClusterRange] + 1;
709 fNextEntry = fStartEntry + GetEstimatedClusterSize();
711 if (fNextEntry > fTree->GetEntries()) {
712 fNextEntry = fTree->GetEntries();
723 fNextEntry = fStartEntry;
724 if (fTree->fNClusterRange || fTree->GetAutoFlush() > 0) {
725 if (fClusterRange == 0 || fTree->fNClusterRange == 0) {
728 fStartEntry -= GetEstimatedClusterSize();
733 if (fClusterRange == 0) {
746 fStartEntry = fNextEntry - GetEstimatedClusterSize();
748 if (fStartEntry < 0) {
859, fDefaultEntryOffsetLen(1000)
865, fAutoSave( -300000000)
866, fAutoFlush(-30000000)
868, fClusterRangeEnd(nullptr)
869, fClusterSize(nullptr)
892, fExternalFriends(nullptr)
898, fFriendLockStatus(0)
899, fTransientBuffer(nullptr)
900, fCacheDoAutoInit(
true)
901, fCacheDoClusterPrefetch(
false)
902, fCacheUserSet(
false)
903, fIMTEnabled(
ROOT::IsImplicitMTEnabled())
904, fNEntriesSinceSorting(0)
938 if (title[0] ==
'/') {
954#ifdef R__TRACK_BASKET_ALLOC_TIME
1090 Error(
"AddBranchToCache",
"Could not load a tree");
1099 Error(
"AddBranchToCache",
"No tree is available. Branch was not added to the cache");
1105 Error(
"AddBranchToCache",
"No file is available. Branch was not added to the cache");
1110 Error(
"AddBranchToCache",
"No cache is available, branch not added");
1129 Error(
"AddBranchToCache",
"Could not load a tree");
1137 Error(
"AddBranchToCache",
"Error adding branch");
1142 Error(
"AddBranchToCache",
"No tree is available. Branch was not added to the cache");
1148 Error(
"AddBranchToCache",
"No file is available. Branch was not added to the cache");
1153 Error(
"AddBranchToCache",
"No cache is available, branch not added");
1173 Error(
"DropBranchFromCache",
"Could not load a tree");
1182 Error(
"DropBranchFromCache",
"No tree is available. Branch was not dropped from the cache");
1188 Error(
"DropBranchFromCache",
"No file is available. Branch was not dropped from the cache");
1193 Error(
"DropBranchFromCache",
"No cache is available, branch not dropped");
1212 Error(
"DropBranchFromCache",
"Could not load a tree");
1220 Error(
"DropBranchFromCache",
"Error dropping branch");
1225 Error(
"DropBranchFromCache",
"No tree is available. Branch was not dropped from the cache");
1231 Error(
"DropBranchFromCache",
"No file is available. Branch was not dropped from the cache");
1236 Error(
"DropBranchFromCache",
"No cache is available, branch not dropped");
1273 return idx ? idx->IsValidFor(&
mainTree) :
false;
1279 "Tree '%s' has the kEntriesReshuffled bit set and cannot have friends nor can be added as a friend unless the "
1280 "main tree has a TTreeIndex on the friend tree '%s'. You can also unset the bit manually if you know what you "
1281 "are doing; note that you risk associating wrong TTree entries of the friend with those of the main TTree!";
1371 Warning(
"AddFriend",
"FriendElement %s in file %s has less entries %lld than its parent Tree: %lld",
treename,
1405 Warning(
"AddFriend",
"FriendElement %s in file %s has less entries %lld than its parent tree: %lld",
treename,
1409 Error(
"AddFriend",
"Cannot find tree '%s' in file '%s', friend not added",
treename, file->
GetName());
1436 Warning(
"AddFriend",
"FriendElement '%s' in file '%s' has less entries %lld than its parent tree: %lld",
1536 if (opt.
Contains(
"flushbaskets")) {
1537 if (
gDebug > 0)
Info(
"AutoSave",
"calling FlushBaskets \n");
1571 " is an instance of an stl collection and does not have a compiled CollectionProxy."
1572 " Please generate the dictionary for this collection (%s) to avoid to write corrupted data.";
1604 Error(
"Branch",
"The class requested (%s) for \"%s\" is different from the type of the pointer passed (%s)",
1612 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s",
1632 Error(
"Branch",
"The pointer specified for %s is not of a class known to ROOT",
branchname);
1640 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",
1644 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());
1670 }
else if (
claim ==
nullptr) {
1671 Error(
"Branch",
"The pointer specified for %s is not of a class known to ROOT and %s is not a known class",
branchname, classname);
1678 Error(
"Branch",
"Reference interface requires a valid object (for branch: %s)!",
branchname);
1689 Error(
"Branch",
"The class requested (%s) for \"%s\" is different from the type of the object passed (%s)",
1697 Error(
"Branch",
"The actual class (%s) of the object provided for the definition of the branch \"%s\" does not inherit from %s",
1703 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",
1707 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());
1726 Error(
"Branch",
"The pointer specified for %s is not of a class or type known to ROOT",
branchname);
1735 Error(
"Branch",
"Reference interface requires a valid object (for branch: %s)!",
branchname);
1740 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",
1744 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());
1763 "The inner type of the std::array passed specified for %s is not of a class or type known to ROOT",
1872 Error(
"Branch",
"Cannot call this constructor for a TClonesArray");
1878 while ((obj = next())) {
1923 char*
curname =
new char[1000];
1925 while ((obj = next())) {
1930 void* add = (
void*)
folder->GetListOfFolders()->GetObjectRef(obj);
1931 for (
Int_t i = 0; i < 1000; ++i) {
1945 if (
br)
br->SetBranchFolder();
2019 if (
branch->IsZombie()) {
2108 Error(
"BranchOld",
"Cannot find class: '%s'", classname);
2113 Fatal(
"BranchOld",
"The requested class ('%s') does not inherit from TObject.\n"
2114 "\tfgBranchStyle is set to zero requesting by default to use BranchOld.\n"
2115 "\tIf this is intentional use Bronch instead of Branch or BranchOld.", classname);
2117 Fatal(
"BranchOld",
"The requested class ('%s') does not inherit from TObject.\n"
2118 "\tYou can not use BranchOld to store objects of this type.",classname);
2129 const char*
rdname =
nullptr;
2130 const char*
dname =
nullptr;
2164 if (
rd->IsObject()) {
2208 char* pointer = ((
char*) obj) +
offset;
2241 if (!
clobj->IsTObject()) {
2290 Error(
"BranchOld",
"Cannot create branch for rdname: %s code: %d",
branchname.Data(), code);
2313 leaf->SetAddress((
void**) pointer);
2323 Error(
"BranchOld",
"Cannot create branch for rdname: %s code: %d",
branchname.Data(), code);
2337 Warning(
"BranchOld",
"Cannot process member: '%s'",
rdname);
2446 Error(
"Bronch",
"Cannot find class:%s", classname);
2465 Error(
"Bronch",
"Pointer to TClonesArray is null");
2468 if (!
clones->GetClass()) {
2469 Error(
"Bronch",
"TClonesArray with no class defined in branch: %s",
name);
2472 if (!
clones->GetClass()->HasDataMemberInfo()) {
2473 Error(
"Bronch",
"TClonesArray with no dictionary defined in branch: %s",
name);
2479 Warning(
"Bronch",
"Using split mode on a class: %s with a custom Streamer",
clones->GetClass()->GetName());
2495 Error(
"Bronch",
"%s with no class defined in branch: %s", classname,
name);
2501 if (!
inklass->HasDataMemberInfo()) {
2502 Error(
"Bronch",
"Container with no dictionary defined in branch: %s",
name);
2505 if (
inklass->HasCustomStreamerMember()) {
2506 Warning(
"Bronch",
"Using split mode on a class: %s with a custom Streamer",
inklass->GetName());
2531 Error(
"Bronch",
"Cannot find dictionary for class: %s", classname);
2581 Warning(
"Bronch",
"%s cannot be split, resetting splitlevel to 0", cl->
GetName());
2595 Error(
"Bronch",
"Cannot build the StreamerInfo for class: %s", cl->
GetName());
2792 for (
Int_t i = 0; i < 10; ++i) {
2830 Warning(
"ChangeFile",
"file %s already exists, trying with %d underscores",
fname,
nus + 1);
2835 Error(
"Fill",
"Failed to open new file %s, continuing as a memory tree.",
fname);
2843 while ((obj = file->
GetList()->First())) {
2872 file->TObject::Delete();
2922 Error(
"SetBranchAddress",
"Unable to determine the type given for the address for \"%s\". "
2923 "The class expected (%s) refers to an stl collection and do not have a compiled CollectionProxy. "
2924 "Please generate the dictionary for this class (%s)",
2931 Error(
"SetBranchAddress",
"Unable to determine the type given for the address for \"%s\". "
2932 "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."
2933 "Please generate the dictionary for this class (%s)",
2936 Error(
"SetBranchAddress",
"Unable to determine the type given for the address for \"%s\". "
2937 "This is probably due to a missing dictionary, the original data class for this branch is %s.",
branch->GetName(),
expectedClass->GetName());
2944 Error(
"SetBranchAddress",
"The address for \"%s\" should be the address of a pointer!",
branch->GetName());
2973 Info(
"SetBranchAddress",
"Matching STL collection (at least according to the SchemaRuleSet when "
2981 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());
2997 ptrClass->GetCollectionProxy()->GetValueClass() )
3014 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());
3024 Error(
"SetBranchAddress",
"The pointer type given \"%s\" (%d) does not correspond to the type needed \"%s\" (%d) by the branch: %s",
3032 Error(
"SetBranchAddress",
"The pointer type given \"%s\" (%d) does not correspond to the type needed \"%s\" by the branch: %s",
3046 if (
rdm->GetThisOffset() == 0) {
3081 Error(
"SetBranchAddress",
"The pointer type given \"%s\" does not correspond to the type needed \"%s\" (%d) by the branch: %s",
3187 if (res < -2 || res == -1) {
3191 Error(
"CloneTree",
"returning nullptr since LoadTree failed with code %lld.", res);
3214 for (
Int_t i = 0; i <
nb; ++i) {
3319 if (
newtree->CopyEntries(
this, -1,
option,
false ) < 0 ) {
3321 Error(
"CloneTTree",
"TTree has not been cloned\n");
3367 branch->SetAddress(
nullptr);
3372 if (
br->GetMakeClass() !=
branch->GetMakeClass())
3373 br->SetMakeClass(
branch->GetMakeClass());
3380 Warning(
"CopyAddresses",
"Could not find branch named '%s' in tree named '%s'",
branch->GetName(), tree->
GetName());
3413 if (
leaf->GetLeafCount()->GetMaximum() <
tleaf->GetLeafCount()->GetMaximum()) {
3414 leaf->GetLeafCount()->IncludeRange(
tleaf->GetLeafCount() );
3425 leaf->SetAddress(
nullptr);
3427 if (!
branch->GetAddress() && !
leaf->GetValuePointer()) {
3435 branch->SetupAddresses();
3437 if (
branch->GetAddress()) {
3444 "Branch kind mismatch between input tree '%s' and output tree '%s' for branch '%s': '%s' vs '%s'",
3445 tree->
GetName(),
br->GetTree()->GetName(),
br->GetName(),
branch->IsA()->GetName(),
3446 br->IsA()->GetName());
3454 Warning(
"CopyAddresses",
"Could not find branch named '%s' in tree named '%s'",
branch->GetName(), tree->
GetName());
3457 tleaf->SetAddress(
leaf->GetValuePointer());
3479 if (
newtree->GetTreeIndex() ) {
3480 if (
oldtree->GetTree()->GetTreeIndex() ==
nullptr ) {
3483 delete newtree->GetTreeIndex();
3484 newtree->SetTreeIndex(
nullptr);
3492 if (
oldtree->GetTree()->BuildIndex(
newtree->GetTreeIndex()->GetMajorName(),
newtree->GetTreeIndex()->GetMinorName())) {
3493 newtree->GetTreeIndex()->Append(
oldtree->GetTree()->GetTreeIndex(),
true);
3495 delete oldtree->GetTree()->GetTreeIndex();
3496 oldtree->GetTree()->SetTreeIndex(
nullptr);
3501 newtree->GetTreeIndex()->Append(
oldtree->GetTree()->GetTreeIndex(),
true);
3503 }
else if (
oldtree->GetTree()->GetTreeIndex() !=
nullptr ) {
3516 if (
newtree->GetEntries() == 0) {
3523 if (
newtree->BuildIndex(
oldtree->GetTree()->GetTreeIndex()->GetMajorName(),
oldtree->GetTree()->GetTreeIndex()->GetMinorName())) {
3524 newtree->GetTreeIndex()->Append(
oldtree->GetTree()->GetTreeIndex(),
true);
3587 }
else if (opt.
Contains(
"buildindex")) {
3589 }
else if (opt.
Contains(
"dropindex")) {
3602 Warning(
"CopyEntries",
"The cachesize option can not be parsed: %s. The default size will be used.",
cacheSizeStr.String().Data());
3605 const char *
munit =
nullptr;
3608 Warning(
"CopyEntries",
"The cachesize option is too large: %s (%g%s max). The default size will be used.",
cacheSizeStr.String().Data(),
m,
munit);
3611 if (
gDebug > 0 && cacheSize != -1)
Info(
"CopyEntries",
"Using Cache size: %lld\n",cacheSize);
3642 if (cacheSize != -1)
cloner.SetCacheSize(cacheSize);
3651 if (
cloner.NeedConversion()) {
3666 if (needCopyAddresses)
3715 if (needCopyAddresses)
3794 Error(
"Delete",
"File : %s is not writable, cannot delete Tree:%s", file->
GetName(),
GetName());
3821 if (
nbytes <= 0)
continue;
3837 if (
gDebug)
Info(
"TTree::Delete",
"Deleting Tree: %s: %d baskets deleted. Total space freed = %d bytes\n",
GetName(),
nbask,
ntot);
4594 for (
Int_t i = 0; i <
nb; ++i) {
4596 branch->DropBaskets(
"all");
4612 if ((
j ==
branch->GetReadBasket()) || (
j ==
branch->GetWriteBasket())) {
4714 Error(
"Fill",
"Failed filling branch:%s.%s, nbytes=%d, entry=%lld\n"
4715 " This error is symptomatic of a Tree created as a memory-resident Tree\n"
4716 " Instead of doing:\n"
4717 " TTree *T = new TTree(...)\n"
4718 " TFile *f = new TFile(...)\n"
4720 " TFile *f = new TFile(...)\n"
4721 " TTree *T = new TTree(...)\n\n",
4786 Info(
"TTree::Fill",
"OptimizeBaskets called at entry %lld, fZipBytes=%lld, fFlushedBytes=%lld\n",
4835 Info(
"TTree::Fill",
"FlushBaskets() called at entry %lld, fZipBytes=%lld, fFlushedBytes=%lld\n",
fEntries,
4843 Info(
"TTree::Fill",
"AutoSave called at entry %lld, fZipBytes=%lld, fSavedBytes=%lld\n",
fEntries,
4893 if (next)
return next;
4951 std::ostringstream
name;
5035 if (dim >= 0)
leafname.Remove(dim);
5166struct BoolRAIIToggle {
5169 BoolRAIIToggle(
bool &val) : m_val(val) { m_val =
true; }
5244 std::atomic<Int_t>
nerrpar(0);
5245 std::atomic<Int_t>
nbpar(0);
5246 std::atomic<Int_t> pos(0);
5254 Int_t j = pos.fetch_add(1);
5260 std::stringstream
ss;
5261 ss << std::this_thread::get_id();
5262 Info(
"FlushBaskets",
"[IMT] Thread %s",
ss.str().c_str());
5263 Info(
"FlushBaskets",
"[IMT] Running task for branch #%d: %s",
j,
branch->GetName());
5313 return alias->GetTitle();
5350 for (
Int_t i = 0; i <
nb; i++) {
5527 if (cacheSize >= (
INT_MAX / 4)) {
5548 if (cacheSize < 0) {
5625 if (t==
nullptr)
return 0;
5785 if (
nb < 0)
return nb;
5791 std::atomic<Int_t> pos(0);
5792 std::atomic<Int_t>
nbpar(0);
5800 Int_t j = pos.fetch_add(1);
5806 std::stringstream
ss;
5807 ss << std::this_thread::get_id();
5808 Info(
"GetEntry",
"[IMT] Thread %s",
ss.str().c_str());
5809 Info(
"GetEntry",
"[IMT] Running task for branch #%d: %s",
j,
branch->GetName());
5812 std::chrono::time_point<std::chrono::system_clock> start, end;
5814 start = std::chrono::system_clock::now();
5816 end = std::chrono::system_clock::now();
5848 if (
nb < 0)
return nb;
5865 if (
nb < 0)
return nb;
5930 [](std::pair<Long64_t,TBranch*>
a, std::pair<Long64_t,TBranch*>
b) {
5931 return a.first > b.first;
5950 [](std::pair<Long64_t,TBranch*>
a, std::pair<Long64_t,TBranch*>
b) {
5951 return a.first > b.first;
6060 if (
nb < 0)
return nb;
6072 if (serial <0)
return -
nbytes;
6074 if (
nb < 0)
return nb;
6101 return fe->GetTree();
6143 if ((tree ==
this) || (tree ==
GetTree())) {
6164 return frEl->GetName();
6167 return frEl->GetName();
6235 if (!
strcmp(
br->GetFullName(), branchName))
6238 const char*
brname =
br->GetName();
6282 if (
auto *t =
frEl->GetTree())
6328 if (
leafname ==
nullptr)
return nullptr;
6364 std::string path(
name);
6365 const auto sep = path.find_last_of(
'/');
6366 if (sep != std::string::npos)
6367 return GetLeaf(path.substr(0, sep).c_str(),
name + sep + 1);
6406 bool fChanged =
true;
6410 FileTransitionDetector(
TTree &chain) : fChain(chain) { PrependLink(fChain); }
6413 FileTransitionDetector(
const FileTransitionDetector &) =
delete;
6414 FileTransitionDetector &operator=(
const FileTransitionDetector &) =
delete;
6415 FileTransitionDetector(FileTransitionDetector &&) =
delete;
6416 FileTransitionDetector &operator=(FileTransitionDetector &&) =
delete;
6424 return fNext->Notify();
6519 auto val =
leaf->GetValue(
j);
6589 if (create && !
pe) {
6674 for (
Int_t i = 0; i <
nb; ++i) {
6773 if (
fe->IsUpdated()) {
6905 Warning(
"MakeCode",
"MakeCode is obsolete. Use MakeClass or MakeSelector instead");
7118 if (!
li)
return nullptr;
7123 while ((obj=next())) {
7128 tree->
Warning(
"MergeTrees",
"TTree %s has no branches, skipping.", tree->
GetName());
7145 newtree->ResetBranchAddresses();
7150 newtree->CopyEntries(tree, -1, options,
true);
7153 newtree->GetTreeIndex()->Append(
nullptr,
false);
7168 if (!
li ||
li->IsEmpty())
7173 while ((tree = (
TTree *)next())) {
7176 Warning(
"Merge",
"TTree %s has no branches, skipping.", tree->
GetName());
7208 while ((tree = (
TTree*)next())) {
7209 if (tree==
this)
continue;
7239 if (!
li ||
li->IsEmpty())
7244 while ((tree = (
TTree *)next())) {
7247 Warning(
"Merge",
"TTree %s has no branches, skipping.", tree->
GetName());
7260 info->fOutputDirectory->GetFile()->Flush();
7263 info->fOutputDirectory->ReadTObject(
this, this->
GetName());
7268 const char *options =
info ?
info->fOptions.Data() :
"";
7275 }
else if (
info->fOptions.Contains(
"fast")) {
7281 if (
info->fIOFeatures)
7290 info->fOutputDirectory->GetFile()->Flush();
7291 info->fOutputDirectory->ReadTObject(
this,this->
GetName());
7303 while ((tree = (
TTree*)next())) {
7304 if (tree==
this)
continue;
7330 src->SetCacheRead(
nullptr,
this);
7331 dst->SetCacheRead(
pf,
this);
7334 pf->WaitFinishPrefetch();
7336 src->SetCacheRead(
nullptr,
this);
7378 leaf->GetBranch()->Notify();
7408 if (nleaves == 0 ||
treeSize == 0) {
7433 if (
branch->GetEntries() == 0) {
7457 if (
branch->GetEntryOffsetLen()) {
7481 if (
pass == 0)
continue;
7486 if (
pDebug)
Info(
"OptimizeBaskets",
"Disabling compression for branch : %s\n",
branch->GetName());
7587 Printf(
"******************************************************************************");
7589 Printf(
"*Entries : %8lld : Total = %15lld bytes File Size = %10lld *",
fEntries,
total, file);
7590 Printf(
"* : : Tree compression factor = %6.2f *",
cx);
7591 Printf(
"******************************************************************************");
7597 if (
strncmp(
option,
"clusters",std::char_traits<char>::length(
"clusters"))==0) {
7598 Printf(
"%-16s %-16s %-16s %8s %20s",
7599 "Cluster Range #",
"Entry Start",
"Last Entry",
"Size",
"Number of clusters");
7609 Printf(
"%-16d %-16lld %-16lld %8lld %10lld",
7618 Printf(
"%-16d %-16lld %-16lld %8lld %10lld (estimated)",
7622 Printf(
"%-16d %-16lld %-16lld %8lld (unknown)",
7638 Printf(
"Total number of clusters: (unknown)");
7652 for (
l=0;
l<
nl;
l++) {
7656 if (
br !=
br->GetMother()) {
7658 count[
keep] +=
br->GetZipBytes();
7661 count[
keep] =
br->GetZipBytes();
7664 for (
l=0;
l<
nl;
l++) {
7665 if (count[
l] < 0)
continue;
7668 Printf(
"branch: %-20s %9lld",
br->GetName(),count[
l]);
7679 st.ReplaceAll(
"/",
"_");
7680 if (
st.Index(re) ==
kNPOS)
continue;
7904 Error(
"ReadFile",
"File name not specified");
7933 Error(
"ReadStream",
"Error reading stream: no newline found.");
7955 std::stringstream
ss;
7959 Error(
"ReadStream",
"Error reading stream");
7963 ss << std::cin.rdbuf();
7970 std::istream& in = *
inTemp;
7976 char *
bdname =
new char[4000];
7977 char *
bd =
new char[100000];
7987 Error(
"ReadStream",
"Error reading stream");
8006 void *address = &
bd[90000];
8034 if (
branch->IsZombie()) {
8036 Warning(
"ReadStream",
"Illegal branch definition: %s",
bdcur);
8039 branch->SetAddress(
nullptr);
8051 Info(
"ReadStream",
"Will use branches:");
8054 Info(
"ReadStream",
" %s: %s [%s]",
br->GetName(),
8055 br->GetTitle(),
br->GetListOfLeaves()->At(0)->IsA()->GetName());
8058 Info(
"ReadStream",
"Dumping read tokens, format:");
8059 Info(
"ReadStream",
"LLLLL:BBB:gfbe:GFBE:T");
8060 Info(
"ReadStream",
" L: line number");
8061 Info(
"ReadStream",
" B: branch number");
8062 Info(
"ReadStream",
" gfbe: good / fail / bad / eof of token");
8063 Info(
"ReadStream",
" GFBE: good / fail / bad / eof of file");
8064 Info(
"ReadStream",
" T: Token being read");
8078 if (
newline ==
'\r' && in.peek() ==
'\n') {
8087 if (
sLine.IsNull()) {
8089 Info(
"ReadStream",
"Skipping empty line number %lld",
nlines);
8093 if (
sLine[0] ==
'#') {
8095 Info(
"ReadStream",
"Skipping comment line number %lld: '%s'",
8101 Info(
"ReadStream",
"Parsing line number %lld: '%s'",
8109 std::stringstream
sToken;
8130 if (
leaf->GetMaximum() > 0) {
8151 sToken.seekp(0, std::ios_base::beg);
8153 sToken.seekg(0, std::ios_base::beg);
8156 Info(
"ReadStream",
"%5lld:%3d:%d%d%d%d:%d%d%d%d:%s",
8160 (
int)in.good(), (
int)in.fail(),
8161 (
int)in.bad(), (
int)in.eof(),
8169 "Buffer error while reading data for branch %s on line %lld",
8171 }
else if (!
sToken.eof()) {
8174 "Couldn't read formatted data in \"%s\" for branch %s on line %lld; ignoring line",
8178 std::string remainder;
8180 if (!remainder.empty()) {
8182 "Ignoring trailing \"%s\" while reading data for branch %s on line %lld",
8191 "Read too few columns (%d < %d) in line %lld; ignoring line",
8194 }
else if (pos !=
kNPOS) {
8196 if (pos <
sLine.Length()) {
8198 "Ignoring trailing \"%s\" while reading line %lld",
8199 sLine.Data() + pos - 1 ,
8357 for (
Int_t i = 0; i <
nb; ++i) {
8387 for (
Int_t i = 0; i <
nb; ++i) {
8404 if (
br &&
br->GetTree()) {
8430 frTree->ResetBranchAddresses();
8725 Error(
"SetBasketSize",
"unknown branch -> '%s'", bname);
8740 if (ptr) *ptr =
nullptr;
8741 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
8782 if (
auto *tree =
fe->GetTree()) {
8815 Error(
"SetBranchAddress",
"unknown branch -> %s", bname);
8842 TTree* clone =
nullptr;
8843 const char *bname =
branch->GetName();
8844 while ((clone = (
TTree*) next())) {
8931 if (!bname || !*bname) {
8932 Error(
"SetBranchStatus",
"Input regexp is an empty string: no match against branch names will be attempted.");
9006 if (
strchr(bname,
'*') !=
nullptr)
9007 Error(
"SetBranchStatus",
"No branch name is matching wildcard -> %s", bname);
9009 Error(
"SetBranchStatus",
"unknown branch -> %s", bname);
9011 if (
strchr(bname,
'*') !=
nullptr)
9012 Warning(
"SetBranchStatus",
"No branch name is matching wildcard -> %s", bname);
9014 Warning(
"SetBranchStatus",
"unknown branch -> %s", bname);
9023 for (i = 0; i <
nleaves; i++) {
9037 if (!
bson)
continue;
9039 if (
bson->GetNleaves() <= 0)
continue;
9118 if (cacheSize < 0) {
9122 if (cacheSize == 0) {
9124 }
else if (cacheSize < 0) {
9130 if (!file ||
GetTree() !=
this) {
9140 Warning(
"SetCacheSizeAux",
"A TTreeCache could not be created because the TTree has no file");
9161 pf->SetAutoCreated(
false);
9175 if (cacheSize == 0) {
9177 pf->WaitFinishPrefetch();
9183 Int_t res =
pf->SetBufferSize(cacheSize);
9187 cacheSize =
pf->GetBufferSize();
9198 Error(
"SetCacheSizeAux",
"Not setting up an automatically sized TTreeCache because of missing cache previously set");
9206 if (cacheSize == 0 ||
pf) {
9233 Error(
"SetCacheEntryRange",
"Could not load a tree");
9239 return GetTree()->SetCacheEntryRange(first, last);
9242 Error(
"SetCacheEntryRange",
"No tree is available. Could not set cache entry range");
9248 Error(
"SetCacheEntryRange",
"No file is available. Could not set cache entry range");
9253 Error(
"SetCacheEntryRange",
"No cache is available. Could not set entry range");
9256 tc->SetEntryRange(first,last);
9307 for (
Int_t i = 0; i <
nb; i++) {
9347 while ( (
b = (
TBranch*)next() ) ) {
9380 TFile* file =
nullptr;
9434 Warning(
"SetEntries",
"Tree branches have different numbers of entries, eg %s has %lld entries while %s has %lld entries.",
9554 Warning(
"SetFileNumber",
"file number must be positive. Set to 0");
9591 for (
Int_t i = 0; i <
nb; ++i) {
9593 branch->SetMakeClass(make);
9621 TFile *file =
nullptr;
9647 "The tree or chain already has a fNotify registered and it is a TNotifyLink, while the new object is "
9648 "not a TNotifyLink. Setting fNotify to the new value will lead to an orphan linked list of "
9649 "TNotifyLinks and it is most likely not intended. If this is the intended goal, please call "
9650 "SetNotify(nullptr) first to silence this warning.");
9656 "The tree or chain already has a TNotifyLink registered, and the new TNotifyLink `obj` does not link "
9657 "to it. Setting fNotify to the new value will lead to an orphan linked list of TNotifyLinks and it is "
9658 "most likely not intended. If this is the intended goal, please call SetNotify(nullptr) first to "
9659 "silence this warning.");
9677 TFile *file =
nullptr;
9799 Error(
"Show()",
"Cannot read entry %lld (entry does not exist)",
entry);
9801 }
else if (
ret == -1) {
9802 Error(
"Show()",
"Cannot read entry %lld (I/O error)",
entry);
9807 Error(
"Show()",
"Cannot read entry %lld (I/O error)",
entry);
9809 }
else if (
ret == 0) {
9810 Error(
"Show()",
"Cannot read entry %lld (no data read)",
entry);
9833 if (
branch->GetListOfBranches()->GetEntriesFast() > 0) {
9849 leaf->PrintValue(
l);
9850 if (
l == (
len - 1)) {
9887 Error(
"StopCacheLearningPhase",
"Could not load a tree");
9893 return GetTree()->StopCacheLearningPhase();
9896 Error(
"StopCacheLearningPhase",
"No tree is available. Could not stop cache learning phase");
9902 Error(
"StopCacheLearningPhase",
"No file is available. Could not stop cache learning phase");
9907 Error(
"StopCacheLearningPhase",
"No cache is available. Could not stop learning phase");
9910 tc->StopLearningPhase();
9920 for (
Int_t i = 0; i <
nb; ++i) {
9947 elem->fParentTree = tree;
9958 if (
b.IsReading()) {
9984 Warning(
"Streamer",
"Old style index in this tree is deleted. Rebuild the index via TTree::BuildIndex");
10182, fLeafIter(nullptr)
10183, fTreeIter(nullptr)
10194, fLeafIter(nullptr)
10195, fTreeIter(nullptr)
10196, fDirection(iter.fDirection)
10217 if (
this != &
rhs) {
10228 if (!
fTree)
return nullptr;
10235 if (!list)
return nullptr;
10244 if (!list)
return next;
#define R__unlikely(expr)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
int Int_t
Signed integer 4 bytes (int)
short Version_t
Class version identifier (short)
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
double Double_t
Double 8 bytes.
constexpr Ssiz_t kNPOS
The equivalent of std::string::npos for the ROOT class TString.
long long Long64_t
Portable signed long integer 8 bytes.
unsigned long long ULong64_t
Portable unsigned long integer 8 bytes.
const char Option_t
Option string (const char)
const Int_t kDoNotProcess
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
#define R__ASSERT(e)
Checks condition e and reports a fatal error if it's false.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
static unsigned int total
Option_t Option_t SetLineWidth
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t cursor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t SetFillStyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t SetLineColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t UChar_t len
Option_t Option_t SetFillColor
Option_t Option_t SetMarkerStyle
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t src
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void reg
R__EXTERN TInterpreter * gCling
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
R__EXTERN TVirtualMutex * gROOTMutex
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
constexpr Int_t kNEntriesResort
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...
static char DataTypeToChar(EDataType datatype)
void TFriendElement__SetTree(TTree *tree, TList *frlist)
Set the fTree member for all friend elements.
bool CheckReshuffling(TTree &mainTree, TTree &friendTree)
constexpr Float_t kNEntriesResortInv
#define R__LOCKGUARD(mutex)
A helper class for managing IMT work during TTree:Fill operations.
const_iterator end() const
TIOFeatures provides the end-user with the ability to change the IO behavior of data written via a TT...
UChar_t GetFeatures() const
bool Set(EIOFeatures bits)
Set a specific IO feature.
This class provides a simple interface to execute the same task multiple times in parallel threads,...
void Streamer(TBuffer &) override
Stream a TArrayD object.
void Set(Int_t n) override
Set size of this array to n doubles.
void Set(Int_t n) override
Set size of this array to n ints.
void Streamer(TBuffer &) override
Stream a TArrayI object.
Fill Area Attributes class.
virtual void Streamer(TBuffer &)
virtual Color_t GetFillColor() const
Return the fill area color.
virtual Style_t GetFillStyle() const
Return the fill area style.
virtual void Streamer(TBuffer &)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual Width_t GetLineWidth() const
Return the line width.
virtual Style_t GetLineStyle() const
Return the line style.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual Size_t GetMarkerSize() const
Return the marker size.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
virtual void Streamer(TBuffer &)
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
Each class (see TClass) has a linked list of its base class(es).
ROOT::ESTLType IsSTLContainer()
Return which type (if any) of STL container the data member is.
Manages buffers for branches of a Tree.
A Branch for the case of an array of clone objects.
A Branch for the case of an object.
A Branch for the case of an object.
A branch containing and managing a TRefTable for TRef autoloading.
void Reset(Option_t *option="") override
void Print(Option_t *option="") const override
Print the TRefTable branch.
void Clear(Option_t *option="") override
Clear entries in the TRefTable.
void ResetAfterMerge(TFileMergeInfo *) override
Reset a Branch after a Merge operation (drop data but keep customizations) TRefTable is cleared.
A Branch handling STL collection of pointers (vectors, lists, queues, sets and multisets) while stori...
A TTree is a list of TBranches.
TObjArray * GetListOfBranches()
virtual void SetTree(TTree *tree)
static void ResetCount()
Static function resetting fgCount.
virtual void SetFile(TFile *file=nullptr)
Set file where this branch writes/reads its buffers.
virtual void SetEntryOffsetLen(Int_t len, bool updateSubBranches=false)
Update the default value for the branch's fEntryOffsetLen if and only if it was already non zero (and...
virtual void UpdateFile()
Refresh the value of fDirectory (i.e.
Using a TBrowser one can browse all ROOT objects.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
Buffer base class used for serializing objects.
void Expand(Int_t newsize, Bool_t copy=kTRUE)
Expand (or shrink) the I/O buffer to newsize bytes.
TClass instances represent classes, structs and namespaces in the ROOT type system.
Bool_t CanSplit() const
Return true if the data member of this TClass can be saved separately.
ROOT::ESTLType GetCollectionType() const
Return the 'type' of the STL the TClass is representing.
void * New(ENewType defConstructor=kClassNew, Bool_t quiet=kFALSE) const
Return a pointer to a newly allocated object of this class.
Bool_t HasDataMemberInfo() const
Bool_t HasCustomStreamerMember() const
The class has a Streamer method and it is implemented by the user or an older (not StreamerInfo based...
void Destructor(void *obj, Bool_t dtorOnly=kFALSE)
Explicitly call destructor for object.
void BuildRealData(void *pointer=nullptr, Bool_t isTransient=kFALSE)
Build a full list of persistent data members.
TList * GetListOfRealData() const
Bool_t CanIgnoreTObjectStreamer()
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
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,...
Bool_t InheritsFrom(const char *cl) const override
Return kTRUE if this class inherits from a class with name "classname".
TVirtualCollectionProxy * GetCollectionProxy() const
Return the proxy describing the collection (if any).
Version_t GetClassVersion() 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.
Collection abstract base class.
void SetName(const char *name)
const char * GetName() const override
Return name of this collection.
virtual Int_t GetEntries() const
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
void Browse(TBrowser *b) override
Browse this collection (called by TBrowser).
A specialized string object used for TTree selections.
All ROOT classes may have RTTI (run time type identification) support added.
Bool_t IsPersistent() const
Bool_t IsBasic() const
Return true if data member is a basic type, e.g. char, int, long...
Bool_t IsaPointer() const
Return true if data member is a pointer.
TDataType * GetDataType() const
Longptr_t GetOffset() const
Get offset from "this".
const char * GetTypeName() const
Get the decayed type name of this data member, removing const and volatile qualifiers,...
const char * GetArrayIndex() const
If the data member is pointer and has a valid array size in its comments GetArrayIndex returns a stri...
const char * GetFullTypeName() const
Get the concrete type name of this data member, including const and volatile qualifiers.
Basic data type descriptor (datatype information is obtained from CINT).
TString GetTypeName()
Get basic type of typedef, e,g.: "class TDirectory*" -> "TDirectory".
Bool_t cd() override
Change current directory to "this" directory.
Bool_t IsWritable() const override
TDirectory::TContext keeps track and restore the current directory.
Describe directory structure in memory.
virtual TList * GetList() const
virtual void Append(TObject *obj, Bool_t replace=kFALSE)
Append object to this directory.
virtual Int_t WriteTObject(const TObject *obj, const char *name=nullptr, Option_t *="", Int_t=0)
Write an object with proper type checking.
virtual TFile * GetFile() const
virtual Int_t ReadKeys(Bool_t=kTRUE)
virtual Bool_t IsWritable() const
virtual TKey * GetKey(const char *, Short_t=9999) const
virtual Int_t ReadTObject(TObject *, const char *)
virtual void SaveSelf(Bool_t=kFALSE)
virtual TList * GetListOfKeys() const
void GetObject(const char *namecycle, T *&ptr)
Get an object with proper type checking.
virtual TObject * Remove(TObject *)
Remove an object from the in-memory list.
Streamer around an arbitrary STL like container, which implements basic container functionality.
A List of entry numbers in a TTree or TChain.
virtual bool Enter(Long64_t entry, TTree *tree=nullptr)
Add entry #entry to the list.
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,...
virtual TDirectory * GetDirectory() const
virtual void SetReapplyCut(bool apply=false)
virtual void SetDirectory(TDirectory *dir)
Add reference to directory dir. dir can be 0.
virtual Long64_t GetEntry(Long64_t index)
Return the number of the entry #index of this TEntryList in the TTree or TChain See also Next().
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
<div class="legacybox"><h2>Legacy Code</h2> TEventList is a legacy interface: there will be no bug fi...
A cache when reading files over the network.
virtual Int_t GetBufferSize() const
A class to pass information from the TFileMerger to the objects being merged.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
virtual void SetCacheRead(TFileCacheRead *cache, TObject *tree=nullptr, ECacheAction action=kDisconnect)
Set a pointer to the read cache.
Int_t GetCompressionSettings() const
Int_t GetCompressionLevel() const
virtual void WriteStreamerInfo()
Write the list of TStreamerInfo as a single object in this file The class Streamer description for al...
virtual void Flush()
Synchronize a file's in-memory and on-disk states.
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
virtual void WriteHeader()
Write File Header.
@ kCancelTTreeChangeRequest
TFileCacheRead * GetCacheRead(const TObject *tree=nullptr) const
Return a pointer to the current read cache.
<div class="legacybox"><h2>Legacy Code</h2> TFolder is a legacy interface: there will be no bug fixes...
A TFriendElement TF describes a TTree object TF in a file.
virtual TTree * GetTree()
Return pointer to friend TTree.
virtual Int_t DeleteGlobal(void *obj)=0
Iterator abstract base class.
virtual TObject * Next()=0
virtual Option_t * GetOption() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
void Delete(Option_t *option="") override
Delete an object from the file.
virtual const char * GetClassName() const
A TLeaf describes individual elements of a TBranch See TBranch structure in TTree.
virtual Int_t GetLenType() const
virtual Int_t GetLen() const
Return the number of effective elements of this leaf, for the current entry.
@ kNewValue
Set if we own the value buffer and so must delete it ourselves.
@ kIndirectAddress
Data member is a pointer to an array of basic types.
virtual Int_t GetOffset() const
void Clear(Option_t *option="") override
Remove all objects from the list.
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void RecursiveRemove(TObject *obj) override
Remove object from this collection and recursively remove the object from all other objects (and coll...
void Add(TObject *obj) override
TObject * Remove(TObject *obj) override
Remove object from the list.
virtual TObjLink * FirstLink() const
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
TObject * At(Int_t idx) const override
Returns the object at position idx. Returns 0 if idx is out of range.
A TMemFile is like a normal TFile except that it reads and writes only from memory.
The TNamed class is the base class for all named ROOT classes.
const char * GetName() const override
Returns name of object.
void Streamer(TBuffer &) override
Stream an object of class TObject.
const char * GetTitle() const override
Returns title of object.
Int_t GetEntriesFast() const
Int_t GetEntriesUnsafe() const
Return the number of objects in array (i.e.
void Clear(Option_t *option="") override
Remove all objects from the array.
void Streamer(TBuffer &) override
Stream all objects in the array to or from the I/O buffer.
Int_t GetEntries() const override
Return the number of objects in array (i.e.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
TObject * UncheckedAt(Int_t i) const
Bool_t IsEmpty() const override
TObject * FindObject(const char *name) const override
Find an object in this collection using its name.
void Add(TObject *obj) override
Wrapper around a TObject so it can be stored in a TList.
Mother of all ROOT objects.
virtual Bool_t Notify()
This method must be overridden to handle object notification (the base implementation is no-op).
virtual const char * GetName() const
Returns name of object.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
@ kOnlyPrepStep
Used to request that the class specific implementation of TObject::Write just prepare the objects to ...
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
R__ALWAYS_INLINE Bool_t IsZombie() const
virtual Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
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 void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual TClass * IsA() const
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Principal Components Analysis (PCA)
The TRealData class manages the effective list of all data members for a given class.
A TRefTable maintains the association between a referenced object and the parent object supporting th...
static void SetRefTable(TRefTable *table)
Static function setting the current TRefTable.
static TRefTable * GetRefTable()
Static function returning the current TRefTable.
Regular expression class.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
static void * ReAlloc(void *vp, size_t size, size_t oldsize)
Reallocate (i.e.
Describes a persistent version of a class.
void ToLower()
Change string to lower-case.
static constexpr Ssiz_t kNPOS
Double_t Atof() const
Return floating-point value contained in string.
const char * Data() const
Bool_t EqualTo(const char *cs, ECaseCompare cmp=kExact) const
TString & ReplaceAll(const TString &s1, const TString &s2)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void SetHistFillColor(Color_t color=1)
Color_t GetHistLineColor() const
void SetHistLineStyle(Style_t styl=0)
Style_t GetHistFillStyle() const
Color_t GetHistFillColor() const
void SetHistLineColor(Color_t color=1)
Style_t GetHistLineStyle() const
void SetHistFillStyle(Style_t styl=0)
Width_t GetHistLineWidth() const
void SetHistLineWidth(Width_t width=1)
A zero length substring is legal.
virtual const char * Getenv(const char *env)
Get environment variable.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
A TTreeCache which exploits parallelized decompression of its own content.
static bool IsParallelUnzip()
Static function that tells wether the multithreading unzipping is activated.
A cache to speed-up the reading of ROOT datasets.
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...
Class implementing or helping the various TTree cloning method.
Iterator on all the leaves in a TTree and its friend.
TTree * fTree
tree being iterated
TIterator & operator=(const TIterator &rhs) override
Overridden assignment operator. Does NOT copy the 'cursor' location!
TObject * Next() override
Go the next friend element.
TIterator * fLeafIter
current leaf sub-iterator.
Option_t * GetOption() const override
Returns the object option stored in the list.
TIterator * fTreeIter
current tree sub-iterator.
bool fDirection
iteration direction
Helper class to iterate over cluster of baskets.
Long64_t GetEstimatedClusterSize()
Estimate the cluster size.
Long64_t Previous()
Move on to the previous cluster and return the starting entry of this previous cluster.
Long64_t Next()
Move on to the next cluster and return the starting entry of this next cluster.
TClusterIterator(TTree *tree, Long64_t firstEntry)
Regular constructor.
Helper class to prevent infinite recursion in the usage of TTree Friends.
TFriendLock & operator=(const TFriendLock &)
Assignment operator.
TFriendLock(const TFriendLock &)
Copy constructor.
~TFriendLock()
Restore the state of tree the same as before we set the lock.
A TTree represents a columnar dataset.
virtual Int_t Fill()
Fill all branches.
virtual TFriendElement * AddFriend(const char *treename, const char *filename="")
Add a TFriendElement to the list of friends.
double ComputeExtremum(const char *columname, double errVal, bool(*cmp)(double, double))
Computes the extremum (minimum or maximum) for the input column name.
TBranchRef * fBranchRef
Branch supporting the TRefTable (if any)
TStreamerInfo * BuildStreamerInfo(TClass *cl, void *pointer=nullptr, bool canOptimize=true)
Build StreamerInfo for class cl.
TBranch * GetBranchFromFriends(const char *branchName)
Returns a pointer to the branch with the given name, if it can be found in the list of friends of thi...
virtual Int_t SetBranchAddress(const char *bname, void *add, TBranch **ptr, TClass *realClass, EDataType datatype, bool isptr, bool suppressMissingBranchError)
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 void SetBranchStatus(const char *bname, bool status=true, UInt_t *found=nullptr)
Set branch status to Process or DoNotProcess.
bool EnableCache()
Enable the TTreeCache unless explicitly disabled for this TTree by a prior call to SetCacheSize(0).
virtual TBranch * GetBranch(const char *name)
Return pointer to the branch with the given name in this tree or its friends.
static Int_t GetBranchStyle()
Static function returning the current branch style.
TList * fFriends
pointer to list of friend elements
bool fIMTEnabled
! true if implicit multi-threading is enabled for this tree
virtual bool GetBranchStatus(const char *branchname) const
Return status of branch with name branchname.
@ kSplitCollectionOfPointers
UInt_t fFriendLockStatus
! Record which method is locking the friend recursion
Long64_t fTotBytes
Total number of bytes in all branches before compression.
virtual Int_t FlushBaskets(bool create_cluster=true) const
Write to disk all the basket that have not yet been individually written and create an event cluster ...
Int_t fMaxClusterRange
! Memory allocated for the cluster range.
virtual void Show(Long64_t entry=-1, Int_t lenmax=20)
Print values of all active leaves for entry.
TEventList * fEventList
! Pointer to event selection list (if one)
virtual Long64_t GetAutoSave() const
virtual Int_t StopCacheLearningPhase()
Stop the cache learning phase.
virtual Int_t GetEntry(Long64_t entry, Int_t getall=0)
Read all branches of entry and return total number of bytes read.
std::vector< std::pair< Long64_t, TBranch * > > fSortedBranches
! Branches to be processed in parallel when IMT is on, sorted by average task time
virtual void SetCircular(Long64_t maxEntries)
Enable/Disable circularity for this tree.
Long64_t fSavedBytes
Number of autosaved bytes.
virtual Int_t AddBranchToCache(const char *bname, bool subbranches=false)
Add branch with name bname to the Tree cache.
Long64_t GetMedianClusterSize()
Estimate the median cluster size for the TTree.
virtual TClusterIterator GetClusterIterator(Long64_t firstentry)
Return an iterator over the cluster of baskets starting at firstentry.
virtual void ResetBranchAddress(TBranch *)
Tell a branch to set its address to zero.
bool fCacheUserSet
! true if the cache setting was explicitly given by user
char GetNewlineValue(std::istream &inputStream)
Determine which newline this file is using.
TIOFeatures fIOFeatures
IO features to define for newly-written baskets and branches.
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
Long64_t fDebugMin
! First entry number to debug
virtual Long64_t SetEntries(Long64_t n=-1)
Change number of entries in the tree.
virtual TObjArray * GetListOfLeaves()
TLeaf * SearchLeafInListOfLeaves(const char *branchName, const char *leafName)
virtual TBranch * BranchOld(const char *name, const char *classname, void *addobj, Int_t bufsize=32000, Int_t splitlevel=1)
Create a new TTree BranchObject.
virtual Int_t GetEntryWithIndex(Long64_t major, Long64_t minor=0)
Read entry corresponding to major and minor number.
Long64_t GetCacheAutoSize(bool withDefault=false)
Used for automatic sizing of the cache.
virtual TBranch * BranchRef()
Build the optional branch supporting the TRefTable.
TFile * GetCurrentFile() const
Return pointer to the current file.
TList * fAliases
List of aliases for expressions based on the tree branches.
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Copy a tree with selection.
virtual Int_t DropBranchFromCache(const char *bname, bool subbranches=false)
Remove the branch with name 'bname' from the Tree cache.
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.
Long64_t * fClusterRangeEnd
[fNClusterRange] Last entry of a cluster range.
void Streamer(TBuffer &) override
Stream a class object.
std::atomic< Long64_t > fIMTZipBytes
! Zip bytes for the IMT flush baskets.
void RecursiveRemove(TObject *obj) override
Make sure that obj (which is being deleted or will soon be) is no longer referenced by this TTree.
TVirtualTreePlayer * GetPlayer()
Load the TTreePlayer (if not already done).
virtual Int_t MakeProxy(const char *classname, const char *macrofilename=nullptr, const char *cutfilename=nullptr, const char *option=nullptr, Int_t maxUnrolling=3)
Generate a skeleton analysis class for this Tree using TBranchProxy.
virtual Long64_t ReadStream(std::istream &inputStream, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from an input stream.
virtual void SetDebug(Int_t level=1, Long64_t min=0, Long64_t max=9999999)
Set the debug level and the debug range.
Int_t fScanField
Number of runs before prompting in Scan.
void Draw(Option_t *opt) override
Default Draw method for all objects.
virtual TTree * GetFriend(const char *) const
Return a pointer to the TTree friend whose name or alias is friendname.
virtual void SetNotify(TObject *obj)
Sets the address of the object to be notified when the tree is loaded.
virtual Double_t GetMaximum(const char *columname)
Return maximum of column with name columname.
virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor=0) const
Return entry number corresponding to major and minor number.
static void SetMaxTreeSize(Long64_t maxsize=100000000000LL)
Set the maximum size in bytes of a Tree file (static function).
void Print(Option_t *option="") const override
Print a summary of the tree contents.
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.
Int_t fNClusterRange
Number of Cluster range in addition to the one defined by 'AutoFlush'.
virtual void PrintCacheStats(Option_t *option="") const
Print statistics about the TreeCache for this tree.
TVirtualTreePlayer * fPlayer
! Pointer to current Tree player
virtual TIterator * GetIteratorOnAllLeaves(bool dir=kIterForward)
Creates a new iterator that will go through all the leaves on the tree itself and its friend.
virtual void SetMakeClass(Int_t make)
Set all the branches in this TTree to be in decomposed object mode (also known as MakeClass mode).
virtual bool InPlaceClone(TDirectory *newdirectory, const char *options="")
Copy the content to a new new file, update this TTree with the new location information and attach th...
virtual void IncrementTotalBuffers(Int_t nbytes)
TObjArray fBranches
List of Branches.
TDirectory * GetDirectory() const
bool fCacheDoAutoInit
! true if cache auto creation or resize check is needed
TTreeCache * GetReadCache(TFile *file) const
Find and return the TTreeCache registered with the file and which may contain branches for us.
Long64_t fEntries
Number of entries.
virtual TFile * ChangeFile(TFile *file)
Called by TTree::Fill() when file has reached its maximum fgMaxTreeSize.
virtual TEntryList * GetEntryList()
Returns the entry list assigned to this tree.
virtual void SetWeight(Double_t w=1, Option_t *option="")
Set tree weight.
void InitializeBranchLists(bool checkLeafCount)
Divides the top-level branches into two vectors: (i) branches to be processed sequentially and (ii) b...
Long64_t * fClusterSize
[fNClusterRange] Number of entries in each cluster for a given range.
Long64_t fFlushedBytes
Number of auto-flushed bytes.
virtual void SetPerfStats(TVirtualPerfStats *perf)
Set perf stats.
std::atomic< Long64_t > fIMTTotBytes
! Total 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.
TEntryList * fEntryList
! Pointer to event selection list (if one)
TBranch * FindBranchFromFriends(const char *branchName)
virtual TVirtualIndex * GetTreeIndex() const
TList * fExternalFriends
! List of TFriendsElement pointing to us and need to be notified of LoadTree. Content not owned.
virtual Long64_t Merge(TCollection *list, Option_t *option="")
Merge the trees in the TList into this tree.
virtual void SetMaxVirtualSize(Long64_t size=0)
virtual void DropBaskets()
Remove some baskets from memory.
virtual void SetAutoSave(Long64_t autos=-300000000)
In case of a program crash, it will be possible to recover the data in the tree up to the last AutoSa...
Long64_t fMaxEntryLoop
Maximum number of entries to process.
virtual void SetParallelUnzip(bool opt=true, Float_t RelSize=-1)
Enable or disable parallel unzipping of Tree buffers.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
void SortBranchesByTime()
Sorts top-level branches by the last average task time recorded per branch.
void Delete(Option_t *option="") override
Delete this tree from memory or/and disk.
virtual TBranchRef * GetBranchRef() const
TLeaf * SearchLeafInListOfFriends(const char *branchName, const char *leafName)
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.
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 void SetEventList(TEventList *list)
This function transfroms the given TEventList into a TEntryList The new TEntryList is owned by the TT...
void MoveReadCache(TFile *src, TDirectory *dir)
Move a cache from a file to the current file in dir.
Long64_t fAutoFlush
Auto-flush tree when fAutoFlush entries written or -fAutoFlush (compressed) bytes produced.
Int_t fUpdate
Update frequency for EntryLoop.
virtual void ResetAfterMerge(TFileMergeInfo *)
Resets the state of this TTree after a merge (keep the customization but forget the data).
virtual Long64_t GetEntries() const
virtual void SetEstimate(Long64_t nentries=1000000)
Set number of entries to estimate variable limits.
Int_t fTimerInterval
Timer interval in milliseconds.
Int_t fDebug
! Debug level
Int_t SetCacheSizeAux(bool autocache=true, Long64_t cacheSize=0)
Set the maximum size of the file cache (TTreeCache) in bytes and create it if possible.
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.
virtual Long64_t GetEntryNumber(Long64_t entry) const
Return entry number corresponding to entry.
virtual TTree * CloneTree(Long64_t nentries=-1, Option_t *option="")
Create a clone of this tree and copy nentries.
Int_t fFileNumber
! current file number (if file extensions)
virtual TLeaf * GetLeaf(const char *branchname, const char *leafname)
Searches in this tree and any of its friends for a leaf named leafname in branch branchname ,...
virtual Long64_t GetZipBytes() const
TObjArray fLeaves
Direct pointers to individual branch leaves.
virtual void Reset(Option_t *option="")
Reset baskets, buffers and entries count in all branches and leaves.
virtual void KeepCircular()
Keep a maximum of fMaxEntries in memory.
virtual void SetDefaultEntryOffsetLen(Int_t newdefault, bool updateExisting=false)
Update the default value for the branch's fEntryOffsetLen.
virtual void DirectoryAutoAdd(TDirectory *)
Called by TKey and TObject::Clone to automatically add us to a directory when we are read from a file...
Long64_t fMaxVirtualSize
Maximum total size of buffers kept in memory.
virtual Long64_t GetTotBytes() const
virtual Int_t MakeSelector(const char *selector=nullptr, Option_t *option="")
Generate skeleton selector class for this tree.
virtual void SetObject(const char *name, const char *title)
Change the name and title of this tree.
TVirtualPerfStats * fPerfStats
! pointer to the current perf stats object
Double_t fWeight
Tree weight (see TTree::SetWeight)
std::vector< TBranch * > fSeqBranches
! Branches to be processed sequentially when IMT is on
Long64_t fDebugMax
! Last entry number to debug
Int_t fDefaultEntryOffsetLen
Initial Length of fEntryOffset table in the basket buffers.
TBranch * GetBranchFromSelf(const char *branchName)
Returns a pointer to the branch with the given name, if it can be found in this tree.
TTree()
Default constructor and I/O constructor.
Long64_t fAutoSave
Autosave tree when fAutoSave entries written or -fAutoSave (compressed) bytes produced.
TBranch * Branch(const char *name, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Add a new branch, and infer the data type from the type of obj being passed.
std::atomic< UInt_t > fAllocationCount
indicates basket should be resized to exact memory usage, but causes significant
static TTree * MergeTrees(TList *list, Option_t *option="")
Static function merging the trees in the TList into a new tree.
bool MemoryFull(Int_t nbytes)
Check if adding nbytes to memory we are still below MaxVirtualsize.
virtual Long64_t GetReadEntry() const
virtual TObjArray * GetListOfBranches()
Long64_t fZipBytes
Total number of bytes in all branches after compression.
virtual TTree * GetTree() const
TBuffer * fTransientBuffer
! Pointer to the current transient buffer.
virtual void SetEntryList(TEntryList *list, Option_t *opt="")
Set an EntryList.
bool Notify() override
Function called when loading a new class library.
virtual void AddZipBytes(Int_t zip)
virtual Long64_t LoadTree(Long64_t entry)
Set current entry.
virtual Long64_t ReadFile(const char *filename, const char *branchDescriptor="", char delimiter=' ')
Create or simply read branches from filename.
virtual const char * GetAlias(const char *aliasName) const
Returns the expanded value of the alias. Search in the friends if any.
ROOT::TIOFeatures SetIOFeatures(const ROOT::TIOFeatures &)
Provide the end-user with the ability to enable/disable various experimental IO features for this TTr...
virtual TBasket * CreateBasket(TBranch *)
Create a basket for this tree and given branch.
TList * fUserInfo
pointer to a list of user objects associated to this Tree
virtual Double_t GetMinimum(const char *columname)
Return minimum of column with name columname.
virtual void RemoveFriend(TTree *)
Remove a friend from the list of friends.
virtual Long64_t GetEntriesFast() const
Return a number greater or equal to the total number of entries in the dataset.
void Browse(TBrowser *) override
Browse content of the TTree.
virtual TList * GetUserInfo()
Return a pointer to the list containing user objects associated to this tree.
void RegisterBranchFullName(std::pair< std::string, TBranch * > &&kv)
Long64_t fChainOffset
! Offset of 1st entry of this Tree in a TChain
@ kOnlyFlushAtCluster
If set, the branch's buffers will grow until an event cluster boundary is hit, guaranteeing a basket ...
@ kEntriesReshuffled
If set, signals that this TTree is the output of the processing of another TTree, and the entries are...
virtual Long64_t GetEntriesFriend() const
Returns a number corresponding to:
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.
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 void SetBasketSize(const char *bname, Int_t buffsize=16000)
Set a branch's basket size.
static void SetBranchStyle(Int_t style=1)
Set the current branch style.
~TTree() override
Destructor.
void ImportClusterRanges(TTree *fromtree)
Appends the cluster range information stored in 'fromtree' to this tree, including the value of fAuto...
TClass * IsA() const override
Long64_t fEstimate
Number of entries to estimate histogram limits.
Int_t FlushBasketsImpl() const
Internal implementation of the FlushBaskets algorithm.
virtual Long64_t LoadTreeFriend(Long64_t entry, TTree *T)
Load entry on behalf of our master tree, we may use an index.
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override
Write this object to the current directory.
TVirtualIndex * fTreeIndex
Pointer to the tree Index (if any)
void UseCurrentStyle() override
Replace current attributes by current style.
virtual Int_t GetTreeNumber() const
TObject * fNotify
Object to be notified when loading a Tree.
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.
virtual TList * GetListOfClones()
Long64_t fCacheSize
! Maximum size of file buffers
TList * fClones
! List of cloned trees which share our addresses
std::atomic< Long64_t > fTotalBuffers
! Total number of bytes in branch buffers
virtual void SetTreeIndex(TVirtualIndex *index)
The current TreeIndex is replaced by the new index.
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.
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 Int_t SetCacheEntryRange(Long64_t first, Long64_t last)
interface to TTreeCache to set the cache entry range
static Long64_t GetMaxTreeSize()
Static function which returns the tree file size limit in bytes.
bool fCacheDoClusterPrefetch
! true if cache is prefetching whole clusters
virtual bool SetAlias(const char *aliasName, const char *aliasFormula)
Set a tree variable alias.
virtual void CopyAddresses(TTree *, bool undo=false)
Set branch addresses of passed tree equal to ours.
virtual Int_t BuildIndex(const char *majorname, const char *minorname="0", bool long64major=false, bool long64minor=false)
Build a Tree Index (default is TTreeIndex).
Long64_t fMaxEntries
Maximum number of entries in case of circular buffers.
virtual void DropBuffers(Int_t nbytes)
Drop branch buffers to accommodate nbytes below MaxVirtualsize.
virtual TList * GetListOfFriends() const
virtual void Refresh()
Refresh contents of this tree and its branches from the current status on disk.
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 Long64_t fgMaxTreeSize
Maximum size of a file containing a Tree.
Long64_t fReadEntry
! Number of the entry being processed
TArrayD fIndexValues
Sorted index values.
void MarkEventCluster()
Mark the previous event as being at the end of the event cluster.
TBranch * FindBranchFromSelf(const char *branchName)
UInt_t fNEntriesSinceSorting
! Number of entries processed since the last re-sorting of branches
virtual void SetFileNumber(Int_t number=0)
Set fFileNumber to number.
virtual TLeaf * FindLeaf(const char *name)
Find first leaf containing searchname.
virtual void StartViewer()
Start the TTreeViewer on this tree.
Int_t GetMakeClass() const
virtual Int_t MakeCode(const char *filename=nullptr)
Generate a skeleton function for this tree.
bool fIMTFlush
! True if we are doing a multithreaded flush.
TDirectory * fDirectory
! Pointer to directory holding this tree
@ kNeedEnableDecomposedObj
@ kMatchConversionCollection
@ kMissingCompiledCollectionProxy
static Int_t fgBranchStyle
Old/New branch style.
virtual void ResetBranchAddresses()
Tell all of our branches to drop their current objects and allocate new ones.
Int_t fNfill
! Local for EntryLoop
void SetName(const char *name) override
Change the name of this tree.
virtual void RegisterExternalFriend(TFriendElement *)
Record a TFriendElement that we need to warn when the chain switches to a new file (typically this is...
TArrayI fIndex
Index of sorted values.
Int_t SetBranchAddressImp(const char *bname, void *add, TBranch **ptr, TClass *realClass, EDataType datatype, bool isptr)
virtual Int_t SetCacheSize(Long64_t cachesize=-1)
Set maximum size of the file cache (TTreeCache) in bytes.
void AddClone(TTree *)
Add a cloned tree to our list of trees to be notified whenever we change our branch addresses or when...
virtual Int_t CheckBranchAddressType(TBranch *branch, TClass *ptrClass, EDataType datatype, bool ptr)
Check whether or not the address described by the last 3 parameters matches the content of the branch...
TBuffer * GetTransientBuffer(Int_t size)
Returns the transient buffer currently used by this TTree for reading/writing baskets.
ROOT::TIOFeatures GetIOFeatures() const
Returns the current set of IO settings.
virtual Int_t MakeClass(const char *classname=nullptr, Option_t *option="")
Generate a skeleton analysis class for this tree.
virtual const char * GetFriendAlias(TTree *) const
If the 'tree' is a friend, this method returns its alias name.
virtual void RemoveExternalFriend(TFriendElement *)
Removes external friend.
Int_t fPacketSize
! Number of entries in one packet for parallel root
virtual TBranch * BranchImpArr(const char *branchname, EDataType datatype, std::size_t N, void *addobj, Int_t bufsize, Int_t splitlevel)
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.
virtual TBranch * BronchExec(const char *name, const char *classname, void *addobj, bool isptrptr, Int_t bufsize, Int_t splitlevel)
Helper function implementing TTree::Bronch and TTree::Branch(const char *name, T &obj);.
virtual void AddTotBytes(Int_t tot)
virtual Long64_t CopyEntries(TTree *tree, Long64_t nentries=-1, Option_t *option="", bool needCopyAddresses=false)
Copy nentries from given tree to this tree.
Int_t fMakeClass
! not zero when processing code generated by MakeClass
virtual Int_t LoadBaskets(Long64_t maxmemory=2000000000)
Read in memory all baskets from all branches up to the limit of maxmemory bytes.
static constexpr Long64_t kMaxEntries
Used as the max value for any TTree range operation.
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.
std::unordered_map< std::string, TBranch * > fNamesToBranches
! maps names to their branches, useful when retrieving branches by name
virtual Long64_t GetAutoFlush() const
Defines a common interface to inspect/change the contents of an object that represents a collection.
Abstract interface for Tree Index.
virtual Long64_t GetEntryNumberWithIndex(Long64_t major, Long64_t minor) const =0
virtual Long64_t GetEntryNumberFriend(const TTree *)=0
virtual void SetTree(TTree *T)=0
virtual Long64_t GetN() const =0
virtual Long64_t GetEntryNumberWithBestIndex(Long64_t major, Long64_t minor) const =0
Provides the interface for the an internal performance measurement and event tracing.
Abstract base class defining the interface for the plugins that implement Draw, Scan,...
virtual Long64_t Scan(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual TVirtualIndex * BuildIndex(const TTree *T, const char *majorname, const char *minorname, bool long64major=false, bool long64minor=false)=0
virtual void UpdateFormulaLeaves()=0
virtual Long64_t DrawSelect(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual Int_t MakeCode(const char *filename)=0
virtual Int_t UnbinnedFit(const char *formula, const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual Long64_t GetEntries(const char *)=0
virtual Int_t MakeProxy(const char *classname, const char *macrofilename=nullptr, const char *cutfilename=nullptr, const char *option=nullptr, Int_t maxUnrolling=3)=0
virtual TSQLResult * Query(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry)=0
virtual TPrincipal * Principal(const char *varexp="", const char *selection="", Option_t *option="np", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual void StartViewer(Int_t ww, Int_t wh)=0
virtual Int_t MakeReader(const char *classname, Option_t *option)=0
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual Long64_t Process(const char *filename, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)=0
virtual void SetEstimate(Long64_t n)=0
static TVirtualTreePlayer * TreePlayer(TTree *obj)
Static function returning a pointer to a Tree player.
virtual Int_t MakeClass(const char *classname, const char *option)=0
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
Special implementation of ROOT::RRangeCast for TCollection, including a check that the cast target ty...
TBranch * CallBranchImp(TTree &tree, const char *branchname, TClass *ptrClass, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
TBranch * CallBranchImpRef(TTree &tree, const char *branchname, TClass *ptrClass, EDataType datatype, void *addobj, Int_t bufsize=32000, Int_t splitlevel=99)
void TBranch__SetTree(TTree *tree, TObjArray &branches)
Set the fTree member for all branches and sub branches.
Bool_t IsImplicitMTEnabled()
Returns true if the implicit multi-threading in ROOT is enabled.
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
void ToHumanReadableSize(value_type bytes, Bool_t si, Double_t *coeff, const char **units)
Return the size expressed in 'human readable' format.
EFromHumanReadableSize FromHumanReadableSize(std::string_view str, T &value)
Convert strings like the following into byte counts 5MB, 5 MB, 5M, 3.7GB, 123b, 456kB,...
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Median(Long64_t n, const T *a, const Double_t *w=nullptr, Long64_t *work=nullptr)
Returns the median of the array a where each entry i has weight w[i] .
Double_t Ceil(Double_t x)
Rounds x upward, returning the smallest integral value that is not less than x.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.
Long64_t BinarySearch(Long64_t n, const T *array, T value)
Binary search in an array of n values to locate value.
@ kUseGlobal
Use the global compression algorithm.
@ kInherit
Some objects use this value to denote that the compression algorithm should be inherited from the par...
@ kUseCompiledDefault
Use the compile-time default setting.