12#ifndef ROOT_MPSendRecv
13#define ROOT_MPSendRecv
94 TClass *
c = TClass::GetClass<T>();
96 Error(
"MPSend",
"[E] Could not find cling definition for class %s\n",
typeid(
T).
name());
116 wBuf << code <<
size << obj;
117 return s->SendRaw(wBuf.Buffer(), wBuf.Length());
126 wBuf.WriteUInt(code);
127 wBuf.WriteULong(strlen(obj) + 1);
128 wBuf.WriteString(obj);
129 return s->SendRaw(wBuf.Buffer(), wBuf.Length());
139 objBuf.WriteObjectAny(obj, obj->IsA());
143 wBuf.WriteUInt(code);
144 wBuf.WriteULong(objBuf.Length());
146 wBuf.WriteBuf(objBuf.Buffer(), objBuf.Length());
147 return s->SendRaw(wBuf.Buffer(), wBuf.Length());
std::pair< unsigned, std::unique_ptr< TBufferFile > > MPCodeBufPair
An std::pair that wraps the code and optional object contained in a message.
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.
T ReadBuffer(TBufferFile *buf)
One of the template functions used to read objects from messages.
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
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
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
void WriteBuf(const void *buf, Int_t max) override
Write max bytes from buf into the I/O buffer.
void WriteUInt(UInt_t i) override
char * ReadString(char *s, Int_t max) override
Read string from I/O buffer.
void WriteULong(ULong_t l) override
void * ReadObjectAny(const TClass *cast) override
Read object from I/O buffer.
Int_t WriteObjectAny(const void *obj, const TClass *ptrClass, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
static constexpr double s