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

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

Definition at line 129 of file TPoolWorker.h.

Public Member Functions

 TPoolWorker (F func, const std::vector< T > &args)
 
 ~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...
 
std::vector< T > fArgs
 a vector containing the arguments that must be passed to fFunc More...
 

#include <TPoolWorker.h>

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

Constructor & Destructor Documentation

template<class F , class T >
TPoolWorker< F, T, void >::TPoolWorker ( F  func,
const std::vector< T > &  args 
)
inline

Definition at line 131 of file TPoolWorker.h.

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

Definition at line 132 of file TPoolWorker.h.

Member Function Documentation

template<class F , class T >
void TPoolWorker< F, T, void >::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 133 of file TPoolWorker.h.

Member Data Documentation

template<class F , class T >
std::vector<T> TPoolWorker< F, T, void >::fArgs
private

a vector containing the arguments that must be passed to fFunc

Definition at line 150 of file TPoolWorker.h.

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

the function to be executed

Definition at line 149 of file TPoolWorker.h.


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