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 23 of file StreamSerializer.h.

Member Typedef Documentation

◆ SBuffer

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

Definition at line 24 of file StreamSerializer.h.

Constructor & Destructor Documentation

◆ SerializeDataBuffer()

SerializeDataBuffer::SerializeDataBuffer ( )
inline

Definition at line 28 of file StreamSerializer.h.

32  rootbuf_(TBuffer::kWrite, init_size),
33  ptr_((unsigned char *)rootbuf_.Buffer()),
34  header_buf_(),
35  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

◆ adler32_chksum()

uint32_t SerializeDataBuffer::adler32_chksum ( ) const
inline

◆ bufferPointer() [1/2]

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

Definition at line 41 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().

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

◆ bufferPointer() [2/2]

unsigned char*& SerializeDataBuffer::bufferPointer ( )
inline

Definition at line 42 of file StreamSerializer.h.

References edm::get_underlying_safe(), and ptr_.

42 { return get_underlying_safe(ptr_); }
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
edm::propagate_const< unsigned char * > ptr_

◆ clearHeaderBuffer()

void SerializeDataBuffer::clearHeaderBuffer ( )
inline

Definition at line 47 of file StreamSerializer.h.

References header_buf_, init_size, and rootbuf_.

Referenced by evf::GlobalEvFOutputModule::globalBeginRun().

47  {
48  header_buf_.clear();
49  header_buf_.shrink_to_fit();
50  rootbuf_.Reset();
51  rootbuf_.Expand(init_size); //shrink TBuffer to size 0 after resetting TBuffer length
52  }
static constexpr int init_size

◆ currentEventSize()

unsigned int SerializeDataBuffer::currentEventSize ( ) const
inline

Definition at line 44 of file StreamSerializer.h.

References curr_event_size_.

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

44 { return curr_event_size_; }
unsigned int curr_event_size_

◆ currentSpaceUsed()

unsigned int SerializeDataBuffer::currentSpaceUsed ( ) const
inline

Member Data Documentation

◆ adler32_chksum_

uint32_t SerializeDataBuffer::adler32_chksum_

◆ comp_buf_

std::vector<unsigned char> SerializeDataBuffer::comp_buf_

◆ curr_event_size_

unsigned int SerializeDataBuffer::curr_event_size_

◆ curr_space_used_

unsigned int SerializeDataBuffer::curr_space_used_

◆ header_buf_

SBuffer SerializeDataBuffer::header_buf_

◆ init_size

constexpr int SerializeDataBuffer::init_size = 0
static

Definition at line 25 of file StreamSerializer.h.

Referenced by clearHeaderBuffer().

◆ ptr_

edm::propagate_const<unsigned char *> SerializeDataBuffer::ptr_

◆ reserve_size

constexpr unsigned int SerializeDataBuffer::reserve_size = 50000
static

◆ rootbuf_

TBufferFile SerializeDataBuffer::rootbuf_