1 #ifndef ROOT_MPSendRecv 2 #define ROOT_MPSendRecv 10 #include <type_traits> 20 using MPCodeBufPair = std::pair<unsigned, std::unique_ptr<TBufferFile>>;
84 std::cerr <<
"[E] Could not find cling definition for class " <<
typeid(
T).
name() <<
"\n";
104 wBuf << code << size << obj;
virtual void WriteString(const char *s)
Write string to I/O buffer.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
T ReadBuffer(TBufferFile *buf)
One of the template functions used to read objects from messages.
int MPSend(TSocket *s, unsigned code)
Send a message with the specified code on the specified socket.
virtual void * ReadObjectAny(const TClass *cast)
Read object from I/O buffer.
virtual void WriteULong(ULong_t l)
virtual Int_t SendRaw(const void *buffer, Int_t length, ESendRecvOptions opt=kDefault)
Send a raw buffer of specified length.
virtual char * ReadString(char *s, Int_t max)
Read string from I/O buffer.
virtual void WriteUInt(UInt_t i)
The ROOT global object gROOT contains a list of all defined classes.
virtual void WriteBuf(const void *buf, Int_t max)
Write max bytes from buf into the I/O buffer.
std::pair< unsigned, std::unique_ptr< TBufferFile >> MPCodeBufPair
An std::pair that wraps the code and optional object contained in a message.
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.
virtual Int_t WriteObjectAny(const void *obj, const TClass *ptrClass)
Write object to I/O buffer.
MPCodeBufPair MPRecv(TSocket *s)
Receive message from a socket.