66         Error(
"TMPWorker::Run", 
"Lost connection to client\n");
 
 
   88   unsigned code = 
msg.first;
 
  104      reply += 
": unknown code received. code=" + std::to_string(code);
 
 
MPCodeBufPair MPRecv(TSocket *s)
Receive message from a socket.
 
int MPSend(TSocket *s, unsigned code)
Send a message with the specified code on the specified socket.
 
std::pair< unsigned, std::unique_ptr< TBufferFile > > MPCodeBufPair
An std::pair that wraps the code and optional object contained in a message.
 
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.
 
R__EXTERN TSystem * gSystem
 
void SendError(const std::string &errmsg, unsigned int code=MPCode::kError)
Error sender.
 
unsigned GetNWorker() const
 
std::string fId
identifier string in the form W<nwrk>|P<proc id>
 
unsigned fNWorker
the ordinal number of this worker (0 to nWorkers-1)
 
virtual void HandleInput(MPCodeBufPair &msg)
Handle a message with an EMPCode.
 
pid_t fPid
the PID of the process in which this worker is running
 
std::unique_ptr< TSocket > fS
This worker's socket. The unique_ptr makes sure resources are released.
 
virtual void Init(int fd, unsigned workerN)
This method is called by children processes right after forking.
 
virtual void Exit(int code, Bool_t mode=kTRUE)
Exit the application.
 
@ kMessage
Generic message.
 
@ kRecvError
Error while reading from the socket.
 
@ kFatalError
Fatal error: whoever sends this message is terminating execution.
 
@ kShutdownOrder
Used by the client to tell servers to shutdown.
 
@ kShutdownNotice
Used by the workers to notify client of shutdown.