A++ » ROOT » ROOT::TProcessExecutor

class ROOT::TProcessExecutor: public ROOT::TExecutor<ROOT::TProcessExecutor>, private TMPClient

 Execute func (with no arguments) nTimes in parallel.
 A vector containg executions' results is returned.
 Functions that take more than zero arguments can be executed (with
 fixed arguments) by wrapping them in a lambda or with std::bind.

This class is also known as (typedefs to this class)

TProcPool

Function Members (Methods)

public:
~TProcessExecutor()
unsigned intGetNWorkers() const
ROOT::TProcessExecutor&operator=(const ROOT::TProcessExecutor&)
TList*ProcTree(TTree& tree, TSelector& selector, ULong64_t nToProcess = 0)
TList*ProcTree(const vector<string>& fileNames, TSelector& selector, const string& treeName = "", ULong64_t nToProcess = 0)
TList*ProcTree(const string& fileName, TSelector& selector, const string& treeName = "", ULong64_t nToProcess = 0)
TList*ProcTree(TFileCollection& files, TSelector& selector, const string& treeName = "", ULong64_t nToProcess = 0)
TList*ProcTree(TChain& files, TSelector& selector, const string& treeName = "", ULong64_t nToProcess = 0)
voidSetNWorkers(unsigned int n)
ROOT::TExecutor<ROOT::TProcessExecutor>ROOT::TExecutor<ROOT::TProcessExecutor>::TExecutor<ROOT::TProcessExecutor>()
ROOT::TExecutor<ROOT::TProcessExecutor>ROOT::TExecutor<ROOT::TProcessExecutor>::TExecutor<ROOT::TProcessExecutor>(size_t)
ROOT::TExecutor<ROOT::TProcessExecutor>ROOT::TExecutor<ROOT::TProcessExecutor>::TExecutor<ROOT::TProcessExecutor>(const ROOT::TExecutor<ROOT::TProcessExecutor>&)
ROOT::TExecutor<ROOT::TProcessExecutor>ROOT::TExecutor<ROOT::TProcessExecutor>::TExecutor<ROOT::TProcessExecutor>(ROOT::TExecutor<ROOT::TProcessExecutor>&&)
ROOT::TProcessExecutorTProcessExecutor(unsigned int nWorkers = 0)
ROOT::TProcessExecutorTProcessExecutor(const ROOT::TProcessExecutor&)
private:
unsigned intTMPClient::Broadcast(unsigned int code, unsigned int nMessages = 0)
unsigned intTMPClient::Broadcast<std::vector<unsigned int, std::allocator<unsigned int> > >(unsigned int code, vector<unsigned int> obj, unsigned int nMessages = 0)
unsigned intTMPClient::Broadcast<unsigned int>(unsigned int code, const vector<unsigned int>& args)
unsigned intTMPClient::Broadcast<unsigned int>(unsigned int code, unsigned int obj, unsigned int nMessages = 0)
voidCollect<TObject *>(vector<TObject*>& reslist)
voidTMPClient::DeActivate(TSocket* s)
voidFixLists(vector<TObject*>& lists)
boolTMPClient::Fork(TMPWorker& server)
boolTMPClient::GetIsParent() const
TMonitor&TMPClient::GetMonitor()
voidTMPClient::HandleMPCode(MPCodeBufPair& msg, TSocket* sender)
voidTMPClient::ReapWorkers()
voidTMPClient::Remove(TSocket* s)
voidReplyToFuncResult(TSocket* s)
voidReplyToIdle(TSocket* s)
voidReset()

Data Members

private:
unsigned intfNProcessednumber of arguments already passed to the workers
unsigned intfNToProcesstotal number of arguments to pass to the workers
ROOT::TProcessExecutor::ETaskfTaskTypethe kind of task that is being executed, if any

Class Charts

Inheritance Chart:
ROOT::TExecutor
TMPClient
ROOT::TProcessExecutor

Function documentation

explicit TProcessExecutor(unsigned nWorkers = 0)
~TProcessExecutor()
it doesn't make sense for a TProcessExecutor to be copied
TProcessExecutor(const TProcessExecutor &)
TProcessExecutor & operator=(const ROOT::TProcessExecutor& )
template<class F> auto ProcTree(const std::vector<std::string>& fileNames, F procFunc, const std::string& treeName = "", ULong64_t nToProcess = 0)
 ProcTree
 these versions requires that procFunc returns a ptr to TObject or inheriting classes and takes a TTreeReader& (both enforced at compile-time)
template<class F> auto ProcTree(const std::string& fileName, F procFunc, const std::string& treeName = "", ULong64_t nToProcess = 0)
template<class F> auto ProcTree(TFileCollection& files, TSelector& selector, const string& treeName = "", ULong64_t nToProcess = 0)
template<class F> auto ProcTree(TChain& files, TSelector& selector, const string& treeName = "", ULong64_t nToProcess = 0)
template<class F> auto ProcTree(TTree& tree, TSelector& selector, ULong64_t nToProcess = 0)
 these versions require a TSelector
void SetNWorkers(unsigned int n)
unsigned GetNWorkers() const
{ return TMPClient::GetNWorkers(); }
void FixLists(vector<TObject*>& lists)
void Reset()
void ReplyToFuncResult(TSocket* s)
void ReplyToIdle(TSocket* s)