103 Warning(
"Process",
"support for generic 'first entry' (jFirst > 0) not implemented yet - ignoring");
110 selector.
Begin(
nullptr);
116 bool ok =
Fork(worker);
118 Error(
"TTreeProcessorMP::Process",
"[E][C] Could not fork. Aborting operation");
128 std::iota(args.begin(), args.end(), 0);
131 Error(
"TTreeProcessorMP::Process",
"[E][C] There was an error while sending tasks to workers."
132 " Some entries might not be processed.");
166 Warning(
"Process",
"support for generic 'first entry' (jFirst > 0) not implemented yet - ignoring");
173 selector.
Begin(
nullptr);
179 bool ok =
Fork(worker);
181 Error(
"TTreeProcessorMP::Process",
"[E][C] Could not fork. Aborting operation");
194 std::iota(args.begin(), args.end(), 0);
197 Error(
"TTreeProcessorMP::Process",
"[E][C] There was an error while sending tasks to workers."
198 " Some entries might not be processed");
204 std::iota(args.begin(), args.end(), 0);
207 Error(
"TTreeProcessorMP::Process",
"[E][C] There was an error while sending tasks to workers."
208 " Some entries might not be processed.");
216 std::iota(args.begin(), args.end(), 0);
219 Error(
"TTreeProcessorMP::Process",
"[E][C] There was an error while sending tasks to workers."
220 " Some entries might not be processed.");
int MPSend(TSocket *s, unsigned code)
Send a message with the specified code on the specified socket.
unsigned long long ULong64_t
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Merge collection of TObjects.
const_iterator begin() const
unsigned fNProcessed
number of arguments already passed to the workers
void Reset()
Reset TTreeProcessorMP's state.
void FixLists(std::vector< TObject * > &lists)
Fix list of lists before merging (to avoid errors about duplicated objects)
void Collect(std::vector< T > &reslist)
Listen for messages sent by the workers and call the appropriate handler function.
TTreeProcessorMP(UInt_t nWorkers=0)
Class constructor.
@ kNoTask
no task is being executed
@ kProcByRange
a Process method is being executed and each worker will process a certain range of each file
@ kProcByFile
a Process method is being executed and each worker will process a different file
ETask fTaskType
the kind of task that is being executed, if any
unsigned fNToProcess
total number of arguments to pass to the workers
void ReplyToIdle(TSocket *s)
Reply to a worker who is idle.
unsigned GetNWorkers() const
auto Process(const std::vector< std::string > &fileNames, F procFunc, TEntryList &entries, const std::string &treeName="", ULong64_t nToProcess=0, ULong64_t jFirst=0) -> InvokeResult_t< F, std::reference_wrapper< TTreeReader > >
Process a TTree dataset with a functor.
A chain is a collection of files containing TTree objects.
A List of entry numbers in a TTree or TChain.
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Class describing a generic file including meta information.
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Base class for multiprocess applications' clients.
unsigned Broadcast(unsigned code, unsigned nMessages=0)
Send a message with the specified code to at most nMessages workers.
void ReapWorkers()
Wait on worker processes and remove their pids from fWorkerPids.
bool Fork(TMPWorker &server)
This method forks the ROOT session into fNWorkers children processes.
Templated derivation of TMPWorkerTree handlign selector tree processing.
Mother of all ROOT objects.
A TSelector object is used by the TTree::Draw, TTree::Scan, TTree::Process to navigate in a TTree and...
virtual void ImportOutput(TList *output)
Imports the content of 'output' in the internal output list.
virtual TList * GetOutputList() const
virtual void Begin(TTree *)
A TTree represents a columnar dataset.
@ kSendResult
Ask for a kFuncResult/kProcResult.
@ kProcFile
Tell a TMPWorkerTree which tree to process. The object sent is a TreeInfo.
@ kProcRange
Tell a TMPWorkerTree which tree and entries range to process. The object sent is a TreeRangeInfo.
@ kProcTree
Tell a TMPWorkerTree to process the tree that was passed to it at construction time.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...