Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooFit::MultiProcess Namespace Reference

Namespaces

namespace  Detail
 

Classes

class  Channel
 One endpoint of a full-duplex interprocess message pipe. More...
 
class  Config
 Configuration for MultiProcess infrastructure. More...
 
class  FIFOQueue
 A Queue with simple FIFO behavior. More...
 
class  HeatmapAnalyzer
 Reads and processes logfiles produced by RooFit::MultiProcess::ProcessTimer. More...
 
class  Job
 interface class for defining the actual work that must be done More...
 
class  JobManager
 Main point of access for all MultiProcess infrastructure. More...
 
struct  JobTask
 combined job_object, state and task identifier type More...
 
class  Message
 A contiguous byte buffer used as the unit of interprocess communication. More...
 
class  Messenger
 Manages the interprocess communication channels and wraps send and receive calls. More...
 
struct  OrderedJobTask
 
class  Poller
 Waits for input on a set of registered Channels. More...
 
class  ppoll_error_t
 Thrown when a blocking wait on a Channel is interrupted, e.g. More...
 
class  PriorityQueue
 Queue that orders tasks according to specified task priorities. More...
 
class  ProcessManager
 Fork processes for queue and workers. More...
 
class  ProcessTimer
 Can be used to generate timings of multiple processes simultaneously and output logs. More...
 
class  Queue
 Keeps a queue of tasks for workers and manages the queue process through its event loop. More...
 

Typedefs

using State = std::size_t
 
using Task = std::size_t
 

Enumerations

enum class  M2Q : int { enqueue = 10 }
 
enum class  Q2W : int { dequeue_rejected = 40 , dequeue_accepted = 41 }
 
enum class  W2Q : int { dequeue = 30 }
 
enum class  X2X : int { ping = -1 , pong = -2 , initial_value = 0 }
 

Functions

std::tuple< std::vector< std::size_t >, boolcareful_poll (Poller &poller)
 
int chill_wait ()
 
pid_t fork_and_handle_errors ()
 
bool is_worker_loop_running ()
 
std::ostream & operator<< (std::ostream &out, const M2Q value)
 
std::ostream & operator<< (std::ostream &out, const Message &msg)
 
std::ostream & operator<< (std::ostream &out, const Q2W value)
 
std::ostream & operator<< (std::ostream &out, const W2Q value)
 
std::ostream & operator<< (std::ostream &out, const X2X value)
 
template<typename value_t >
value_t receive_item (Channel &channel, bool *more=nullptr)
 
void send_item (Channel &channel, const char *item, bool more)
 
void send_item (Channel &channel, const Message &item, bool more)
 
void send_item (Channel &channel, const std::string &item, bool more)
 
template<typename T , typename std::enable_if< std::is_trivially_copyable< typename std::decay< T >::type >::value &&!std::is_pointer< typename std::decay< T >::type >::value, bool >::type = true>
void send_item (Channel &channel, const T &item, bool more)
 
int wait_for_child (pid_t child_pid, bool may_throw, int retries_before_killing)
 
void worker_loop ()
 The worker processes' event loop.
 

Variables

static bool worker_loop_running = false
 

Typedef Documentation

◆ State

Definition at line 23 of file types.h.

◆ Task

Definition at line 22 of file types.h.

Enumeration Type Documentation

◆ M2Q

Enumerator
enqueue 

Definition at line 129 of file Messenger_decl.h.

◆ Q2W

Enumerator
dequeue_rejected 
dequeue_accepted 

Definition at line 137 of file Messenger_decl.h.

◆ W2Q

Enumerator
dequeue 

Definition at line 134 of file Messenger_decl.h.

◆ X2X

Enumerator
ping 
pong 
initial_value 

Definition at line 28 of file Messenger_decl.h.

Function Documentation

◆ careful_poll()

std::tuple< std::vector< std::size_t >, bool > RooFit::MultiProcess::careful_poll ( Poller & poller)

Definition at line 66 of file util.cxx.

◆ chill_wait()

int RooFit::MultiProcess::chill_wait ( )

Definition at line 383 of file ProcessManager.cxx.

◆ fork_and_handle_errors()

pid_t RooFit::MultiProcess::fork_and_handle_errors ( )

Definition at line 101 of file ProcessManager.cxx.

◆ is_worker_loop_running()

bool RooFit::MultiProcess::is_worker_loop_running ( )

Definition at line 35 of file worker.cxx.

◆ operator<<() [1/5]

std::ostream & RooFit::MultiProcess::operator<< ( std::ostream & out,
const M2Q value )

Definition at line 259 of file Messenger.cxx.

◆ operator<<() [2/5]

std::ostream & RooFit::MultiProcess::operator<< ( std::ostream & out,
const Message & msg )
inline

Definition at line 72 of file Message.h.

◆ operator<<() [3/5]

std::ostream & RooFit::MultiProcess::operator<< ( std::ostream & out,
const Q2W value )

Definition at line 279 of file Messenger.cxx.

◆ operator<<() [4/5]

std::ostream & RooFit::MultiProcess::operator<< ( std::ostream & out,
const W2Q value )

Definition at line 269 of file Messenger.cxx.

◆ operator<<() [5/5]

std::ostream & RooFit::MultiProcess::operator<< ( std::ostream & out,
const X2X value )

Definition at line 290 of file Messenger.cxx.

◆ receive_item()

template<typename value_t >
value_t RooFit::MultiProcess::receive_item ( Channel & channel,
bool * more = nullptr )

Definition at line 141 of file Channel.h.

◆ send_item() [1/4]

void RooFit::MultiProcess::send_item ( Channel & channel,
const char * item,
bool more )
inline

Definition at line 130 of file Channel.h.

◆ send_item() [2/4]

void RooFit::MultiProcess::send_item ( Channel & channel,
const Message & item,
bool more )
inline

Definition at line 135 of file Channel.h.

◆ send_item() [3/4]

void RooFit::MultiProcess::send_item ( Channel & channel,
const std::string & item,
bool more )
inline

Definition at line 125 of file Channel.h.

◆ send_item() [4/4]

template<typename T , typename std::enable_if< std::is_trivially_copyable< typename std::decay< T >::type >::value &&!std::is_pointer< typename std::decay< T >::type >::value, bool >::type = true>
void RooFit::MultiProcess::send_item ( Channel & channel,
const T & item,
bool more )

Definition at line 120 of file Channel.h.

◆ wait_for_child()

int RooFit::MultiProcess::wait_for_child ( pid_t child_pid,
bool may_throw,
int retries_before_killing )

Definition at line 26 of file util.cxx.

◆ worker_loop()

void RooFit::MultiProcess::worker_loop ( )

The worker processes' event loop.

Asks the queue process for tasks, polls for incoming messages from other processes and handles them.

Definition at line 44 of file worker.cxx.

Variable Documentation

◆ worker_loop_running

bool RooFit::MultiProcess::worker_loop_running = false
static

Definition at line 33 of file worker.cxx.