12#ifndef ROOT_TTreeProcessorMT
13#define ROOT_TTreeProcessorMT
52using NameAlias = std::pair<std::string, std::string>;
69 void MakeChain(
const std::vector<std::string> &treeName,
const std::vector<std::string> &fileNames,
70 const FriendInfo &friendInfo,
const std::vector<Long64_t> &nEntries,
71 const std::vector<std::vector<Long64_t>> &friendEntries);
78 const std::vector<std::string> &fileNames,
const FriendInfo &friendInfo,
79 const TEntryList &entryList,
const std::vector<Long64_t> &nEntries,
80 const std::vector<std::vector<Long64_t>> &friendEntries);
104 TTreeProcessorMT(
const std::vector<std::string_view> &filenames, std::string_view treename =
"",
111 R__DEPRECATED(6, 26,
"Please use SetTasksPerWorkerHint instead. This setting will be ignored.")
#define R__DEPRECATED(MAJOR, MINOR, REASON)
TTreeView(const TTreeView &)
std::unique_ptr< TChain > fChain
Chain on which to operate.
std::unique_ptr< TTreeReader > GetTreeReader(Long64_t start, Long64_t end, const std::vector< std::string > &treeName, const std::vector< std::string > &fileNames, const FriendInfo &friendInfo, const TEntryList &entryList, const std::vector< Long64_t > &nEntries, const std::vector< std::vector< Long64_t > > &friendEntries)
Get a TTreeReader for the current tree of this view.
std::vector< std::unique_ptr< TChain > > fFriends
Friends of the tree/chain, if present.
std::unique_ptr< TEntryList > fEntryList
TEntryList for fChain, if present.
void MakeChain(const std::vector< std::string > &treeName, const std::vector< std::string > &fileNames, const FriendInfo &friendInfo, const std::vector< Long64_t > &nEntries, const std::vector< std::vector< Long64_t > > &friendEntries)
Construct fChain, also adding friends if needed and injecting knowledge of offsets if available.
This class provides a simple interface to execute the same task multiple times in parallel threads,...
A wrapper to make object instances thread private, lazily.
A class to process the entries of a TTree in parallel.
const std::vector< std::string > fTreeNames
TTree names (always same size and ordering as fFileNames)
static unsigned int GetMaxTasksPerFilePerWorker()
This function is deprecated in favor of GetTasksPerWorkerHint().
std::vector< std::string > FindTreeNames()
Retrieve the names of the TTrees in each of the input files, throw if a TTree cannot be found.
const std::vector< std::string > fFileNames
Names of the files.
static unsigned int fgTasksPerWorkerHint
static void SetMaxTasksPerFilePerWorker(unsigned int m)
This function is deprecated in favor of SetTasksPerWorkerHint().
Internal::FriendInfo GetFriendInfo(TTree &tree)
Get and store the names, aliases and file names of the friends of the tree.
static unsigned int fgMaxTasksPerFilePerWorker
ROOT::TThreadExecutor fPool
! Thread pool for processing.
TEntryList fEntryList
User-defined selection of entry numbers to be processed, empty if none was provided.
static void SetTasksPerWorkerHint(unsigned int m)
Set the hint for the desired number of tasks created per worker.
ROOT::TThreadedObject< ROOT::Internal::TTreeView > fTreeView
Thread-local TreeViews.
void Process(std::function< void(TTreeReader &)> func)
Process the entries of a TTree in parallel.
const Internal::FriendInfo fFriendInfo
static unsigned int GetTasksPerWorkerHint()
Retrieve the current value for the desired number of tasks per worker.
A List of entry numbers in a TTree or TChain.
A simple, robust and fast interface to read values from ROOT columnar datasets such as TTree,...
A TTree represents a columnar dataset.
std::pair< std::string, std::string > NameAlias
Names, aliases, and file names of a TTree's or TChain's friends.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
UInt_t GetThreadPoolSize()
Returns the size of ROOT's thread pool.
std::vector< std::vector< std::string > > fFriendFileNames
Names of the files where each friend is stored.
std::vector< Internal::NameAlias > fFriendNames
Pairs of names and aliases of friend trees/chains.
Defines the number of threads in some of ROOT's interfaces.