Belle II Software development
|
A class to encode/decode an EvtMessage. More...
#include <MsgHandler.h>
Public Member Functions | |
MsgHandler (int complevel=0) | |
Constructor. | |
virtual | ~MsgHandler () |
Destructor. | |
virtual void | clear () |
Clear object list. | |
virtual void | add (const TObject *, const std::string &name) |
Add an object to be streamed. | |
virtual EvtMessage * | encode_msg (ERecordType rectype) |
Stream object list into an EvtMessage. | |
virtual void | decode_msg (EvtMessage *msg, std::vector< TObject * > &objlist, std::vector< std::string > &namelist) |
Decode an EvtMessage into a vector list of objects with names. | |
Private Attributes | |
CharBuffer | m_buf |
EvtMessage character buffer for encode_msg(). | |
CharBuffer | m_compBuf |
EvtMessage character buffer for compressing/decompressing. | |
std::unique_ptr< TMessage > | m_msg |
Used for serialising objects into m_buf. | |
InMessage | m_inMsg |
Used for deserializing in decode_msg() | |
int | m_complevel |
compression algorithm * 100 + compression level. | |
A class to encode/decode an EvtMessage.
Definition at line 103 of file MsgHandler.h.
|
explicit |
Constructor.
complevel | Compression level and algorithm: algorithm*100 + level where algorithm can be one of 0: default root system algorithm (usually zlib) 1: zlib 2: lzma 3: old root compression code and level can be between 1 and 9 (0 disables compression). So for example 101 corresponds to zlib with minimal compression while 209 means lzma with maximal compression. |
Definition at line 25 of file MsgHandler.cc.
|
virtual |
Add an object to be streamed.
Definition at line 46 of file MsgHandler.cc.
|
virtual |
|
virtual |
Decode an EvtMessage into a vector list of objects with names.
Definition at line 106 of file MsgHandler.cc.
|
virtual |
Stream object list into an EvtMessage.
Caller is responsible for deletion.
Definition at line 67 of file MsgHandler.cc.
|
private |
EvtMessage character buffer for encode_msg().
Definition at line 130 of file MsgHandler.h.
|
private |
EvtMessage character buffer for compressing/decompressing.
Definition at line 131 of file MsgHandler.h.
|
private |
compression algorithm * 100 + compression level.
level can be 0 for no compression to 9 for highes compression, algorithm can be one of default (0), zlib (1) or lzma (2)
Definition at line 134 of file MsgHandler.h.
|
private |
Used for deserializing in decode_msg()
Definition at line 133 of file MsgHandler.h.
|
private |
Used for serialising objects into m_buf.
Definition at line 132 of file MsgHandler.h.