12#ifndef ROOT_ROOFIT_MultiProcess_Channel
13#define ROOT_ROOFIT_MultiProcess_Channel
25namespace MultiProcess {
118 !std::is_pointer<typename std::decay<T>::type>
::value,
140template <
typename value_t>
144 if constexpr (std::is_same<value_t, Message>::value) {
146 }
else if constexpr (std::is_same<value_t, std::string>::value) {
147 return std::string(
msg.data<
char>(),
msg.size());
149 static_assert(std::is_trivially_copyable<value_t>::value,
150 "only trivially copyable types, std::string and Message can be received");
151 if (
msg.size() !=
sizeof(value_t)) {
152 throw std::runtime_error(
"MultiProcess::receive_item: message size does not match receive type");
155 std::memcpy(&
value,
msg.data(),
sizeof(value_t));
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
One endpoint of a full-duplex interprocess message pipe.
bool has_pending_output() const
std::size_t in_header_bytes_
Channel(const Channel &)=delete
void send_frame(const void *data, std::size_t size, bool more)
Queue one frame for sending and write out as much as the socket accepts.
static void throw_connection_closed()
Handle end-of-stream / closed-connection conditions; never returns.
bool try_recv_frame(Message &msg, bool *more)
Non-blocking receive attempt.
std::size_t in_msg_bytes_
static std::vector< std::size_t > wait(const std::vector< const Channel * > &read_channels, int timeout_ms)
Wait until at least one of read_channels has input available, flushing the pending output of all live...
Channel & operator=(const Channel &)=delete
bool try_flush()
Write out pending output; returns true when all of it has been written.
Message recv_frame(bool *more=nullptr)
Blocking receive of one complete frame, interruptible by SIGTERM (throws ppoll_error_t,...
std::vector< char > out_buf_
A contiguous byte buffer used as the unit of interprocess communication.
Thrown when a blocking wait on a Channel is interrupted, e.g.
ppoll_error_t(int errnum, const std::string &what)
value_t receive_item(Channel &channel, bool *more=nullptr)
void send_item(Channel &channel, const T &item, bool more)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...