82 std::vector<std::tuple<Long64_t, Long64_t, size_t>> vTuple;
90 vTuple.emplace_back(start, end, i);
94 auto mapFunction = [
this, &
func](
const std::tuple<Long64_t, Long64_t, size_t> &t) {
102 pool.
Foreach(mapFunction, vTuple);
void Foreach(F func, unsigned nTimes)
Execute func (with no arguments) nTimes in parallel.
TTreeReader is a simple, robust and fast interface to read values from a TTree, TChain or TNtuple...
Namespace for new ROOT classes and functions.
size_t GetNumFiles() const
Get the number of files of this view.
std::unique_ptr< TTreeReader > GetTreeReader(Long64_t start, Long64_t end)
Get a TTreeReader for the current tree of this view.
void SetCurrent(unsigned int i)
Set the current file and tree of this view.
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
This class provides a simple interface to execute the same task multiple times in parallel...
TTree::TClusterIterator GetClusterIterator()
Get the cluster iterator for the current tree of this view, starting from entry zero.
Long64_t GetEntries() const
Get the number of entries of the current tree of this view.
void Process(std::function< void(TTreeReader &)> func)
Process the entries of a TTree in parallel.
double func(double *x, double *p)
ROOT::TThreadedObject< ROOT::Internal::TTreeView > treeView
! Threaded object with <file,tree> per thread
TTreeProcessorMT(std::string_view filename, std::string_view treename="")
Constructor based on a file name.
A List of entry numbers in a TTree or TChain.