Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::Internal::TreeUtils Namespace Reference

Namespace hosting functions and classes to retrieve tree information for internal use. More...

Classes

class  RNoCleanupNotifier
 
class  RNoCleanupNotifierHelper
 

Functions

void ClearMustCleanupBits (TObjArray &branches)
 Reset the kMustCleanup bit of a TObjArray of TBranch objects (e.g.
 
std::vector< std::string > GetFileNamesFromTree (const TTree &tree)
 
ROOT::TreeUtils::RFriendInfo GetFriendInfo (const TTree &tree, bool retrieveEntries=false)
 
std::vector< std::string > GetTopLevelBranchNames (TTree &t)
 Get all the top-level branches names, including the ones of the friend trees.
 
std::vector< std::string > GetTreeFullPaths (const TTree &tree)
 
std::unique_ptr< TChainMakeChainForMT (const std::string &name, const std::string &title)
 Create a TChain object with options that avoid common causes of thread contention.
 
std::vector< std::unique_ptr< TChain > > MakeFriends (const ROOT::TreeUtils::RFriendInfo &finfo)
 Create friends from the main TTree.
 

Detailed Description

Namespace hosting functions and classes to retrieve tree information for internal use.

Function Documentation

◆ ClearMustCleanupBits()

void ROOT::Internal::TreeUtils::ClearMustCleanupBits ( TObjArray branches)

Reset the kMustCleanup bit of a TObjArray of TBranch objects (e.g.

returned by TTree::GetListOfBranches).

In some rare cases, all branches in a TTree can have their kMustCleanup bit set, which causes a large amount of contention at teardown due to concurrent calls to RecursiveRemove (which needs to take the global lock). This helper function checks the first branch of the array and if it has the kMustCleanup bit set, it resets it for all branches in the array, recursively going through sub-branches and leaves.

Definition at line 339 of file InternalTreeUtils.cxx.

◆ GetFileNamesFromTree()

std::vector< std::string > ROOT::Internal::TreeUtils::GetFileNamesFromTree ( const TTree tree)

Definition at line 83 of file InternalTreeUtils.cxx.

◆ GetFriendInfo()

ROOT::TreeUtils::RFriendInfo ROOT::Internal::TreeUtils::GetFriendInfo ( const TTree tree,
bool  retrieveEntries = false 
)

Definition at line 158 of file InternalTreeUtils.cxx.

◆ GetTopLevelBranchNames()

std::vector< std::string > ROOT::Internal::TreeUtils::GetTopLevelBranchNames ( TTree t)

Get all the top-level branches names, including the ones of the friend trees.

Definition at line 68 of file InternalTreeUtils.cxx.

◆ GetTreeFullPaths()

std::vector< std::string > ROOT::Internal::TreeUtils::GetTreeFullPaths ( const TTree tree)

Definition at line 298 of file InternalTreeUtils.cxx.

◆ MakeChainForMT()

std::unique_ptr< TChain > ROOT::Internal::TreeUtils::MakeChainForMT ( const std::string &  name,
const std::string &  title 
)

Create a TChain object with options that avoid common causes of thread contention.

In particular, set its kWithoutGlobalRegistration mode and reset its kMustCleanup bit.

Definition at line 359 of file InternalTreeUtils.cxx.

◆ MakeFriends()

std::vector< std::unique_ptr< TChain > > ROOT::Internal::TreeUtils::MakeFriends ( const ROOT::TreeUtils::RFriendInfo finfo)

Create friends from the main TTree.

Definition at line 368 of file InternalTreeUtils.cxx.