CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Public Attributes | Static Public Attributes
SerializeDataBuffer Struct Reference

#include <StreamSerializer.h>

Public Types

typedef std::vector< char > SBuffer
 

Public Member Functions

uint32_t adler32_chksum () const
 
unsigned char const * bufferPointer () const
 
unsigned char *& bufferPointer ()
 
void clearHeaderBuffer ()
 
unsigned int currentEventSize () const
 
unsigned int currentSpaceUsed () const
 
 SerializeDataBuffer ()
 

Public Attributes

uint32_t adler32_chksum_
 
std::vector< unsigned char > comp_buf_
 
unsigned int curr_event_size_
 
unsigned int curr_space_used_
 
SBuffer header_buf_
 
edm::propagate_const< unsigned char * > ptr_
 
TBufferFile rootbuf_
 

Static Public Attributes

static constexpr int init_size = 0
 
static constexpr unsigned int reserve_size = 50000
 

Detailed Description

StreamSerializer.h

Utility class for translating framework objects (e.g. ProductRegistry and EventForOutput) into streamer message objects.

Definition at line 22 of file StreamSerializer.h.

Member Typedef Documentation

typedef std::vector<char> SerializeDataBuffer::SBuffer

Definition at line 23 of file StreamSerializer.h.

Constructor & Destructor Documentation

SerializeDataBuffer::SerializeDataBuffer ( )
inline

Definition at line 27 of file StreamSerializer.h.

31  rootbuf_(TBuffer::kWrite, init_size),
32  ptr_((unsigned char *)rootbuf_.Buffer()),
33  header_buf_(),
34  adler32_chksum_(0) {}
static constexpr int init_size
std::vector< unsigned char > comp_buf_
unsigned int curr_event_size_
unsigned int curr_space_used_
static constexpr unsigned int reserve_size
edm::propagate_const< unsigned char * > ptr_

Member Function Documentation

uint32_t SerializeDataBuffer::adler32_chksum ( ) const
inline
unsigned char const* SerializeDataBuffer::bufferPointer ( ) const
inline

Definition at line 40 of file StreamSerializer.h.

References edm::get_underlying_safe(), and ptr_.

Referenced by edm::StreamerOutputModuleCommon::serializeEvent(), edm::StreamSerializer::serializeEvent(), edm::StreamerOutputModuleCommon::serializeRegistry(), and edm::StreamSerializer::serializeRegistry().

40 { return get_underlying_safe(ptr_); }
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< unsigned char * > ptr_
unsigned char*& SerializeDataBuffer::bufferPointer ( )
inline

Definition at line 41 of file StreamSerializer.h.

References edm::get_underlying_safe(), and ptr_.

41 { return get_underlying_safe(ptr_); }
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< unsigned char * > ptr_
void SerializeDataBuffer::clearHeaderBuffer ( )
inline

Definition at line 46 of file StreamSerializer.h.

References header_buf_, and rootbuf_.

46  {
47  header_buf_.clear();
48  header_buf_.shrink_to_fit();
49  rootbuf_.Reset();
50  rootbuf_.Expand(init_size); //shrink TBuffer to size 0 after resetting TBuffer length
51  }
static constexpr int init_size
unsigned int SerializeDataBuffer::currentEventSize ( ) const
inline

Definition at line 43 of file StreamSerializer.h.

References curr_event_size_.

Referenced by edm::StreamerOutputModuleCommon::serializeEvent().

43 { return curr_event_size_; }
unsigned int curr_event_size_
unsigned int SerializeDataBuffer::currentSpaceUsed ( ) const
inline

Member Data Documentation

uint32_t SerializeDataBuffer::adler32_chksum_
std::vector<unsigned char> SerializeDataBuffer::comp_buf_
unsigned int SerializeDataBuffer::curr_event_size_
unsigned int SerializeDataBuffer::curr_space_used_
SBuffer SerializeDataBuffer::header_buf_
constexpr int SerializeDataBuffer::init_size = 0
static

Definition at line 24 of file StreamSerializer.h.

edm::propagate_const<unsigned char *> SerializeDataBuffer::ptr_
constexpr unsigned int SerializeDataBuffer::reserve_size = 50000
static
TBufferFile SerializeDataBuffer::rootbuf_