ROOT  6.06/09
Reference Guide
Public Member Functions | Private Attributes | List of all members
TPoolWorker< F, void, R > Class Template Reference

template<class F, class R>
class TPoolWorker< F, void, R >

Definition at line 88 of file TPoolWorker.h.

Public Member Functions

 TPoolWorker (F func, R redfunc)
 
 ~TPoolWorker ()
 
void HandleInput (MPCodeBufPair &msg)
 Handle a message with an EMPCode. More...
 
- Public Member Functions inherited from TMPWorker
 TMPWorker ()
 Class constructor. More...
 
virtual ~TMPWorker ()
 
 TMPWorker (const TMPWorker &)=delete
 
TMPWorkeroperator= (const TMPWorker &)=delete
 
virtual void Init (int fd, unsigned workerN)
 This method is called by children processes right after forking. More...
 
void Run ()
 
TSocketGetSocket ()
 
pid_t GetPid ()
 
unsigned GetNWorker () const
 

Private Attributes

F fFunc
 the function to be executed More...
 
R fRedFunc
 the reduce function More...
 
decltype(fFunc()) fReducedResult
 the result of the execution More...
 
bool fCanReduce
 true if fReducedResult can be reduced with a new result, false until we have produced one result More...
 

#include <TPoolWorker.h>

+ Inheritance diagram for TPoolWorker< F, void, R >:
+ Collaboration diagram for TPoolWorker< F, void, R >:

Constructor & Destructor Documentation

template<class F , class R >
TPoolWorker< F, void, R >::TPoolWorker ( F  func,
R  redfunc 
)
inline

Definition at line 90 of file TPoolWorker.h.

template<class F , class R >
TPoolWorker< F, void, R >::~TPoolWorker ( )
inline

Definition at line 94 of file TPoolWorker.h.

Member Function Documentation

template<class F , class R >
void TPoolWorker< F, void, R >::HandleInput ( MPCodeBufPair msg)
inlinevirtual

Handle a message with an EMPCode.

This method is called upon receiving a message with a code >= 1000 (i.e. EMPCode). It handles the most generic types of messages.
Classes inheriting from TMPWorker should implement their own HandleInput function, that should be able to handle codes specific to that application.
The appropriate version of the HandleInput method (TMPWorker's or the overriding version) is automatically called depending on the message code.

Parameters
msgExecute instructions received from a TProcPool client

Reimplemented from TMPWorker.

Definition at line 96 of file TPoolWorker.h.

Member Data Documentation

template<class F , class R >
bool TPoolWorker< F, void, R >::fCanReduce
private

true if fReducedResult can be reduced with a new result, false until we have produced one result

Definition at line 125 of file TPoolWorker.h.

template<class F , class R >
F TPoolWorker< F, void, R >::fFunc
private

the function to be executed

Definition at line 122 of file TPoolWorker.h.

template<class F , class R >
R TPoolWorker< F, void, R >::fRedFunc
private

the reduce function

Definition at line 123 of file TPoolWorker.h.

template<class F , class R >
decltype(fFunc()) TPoolWorker< F, void, R >::fReducedResult
private

the result of the execution

Definition at line 124 of file TPoolWorker.h.


The documentation for this class was generated from the following file: