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 *& bufferPointer ()
 
unsigned const char * bufferPointer () const
 
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) {}

Member Function Documentation

◆ adler32_chksum()

uint32_t SerializeDataBuffer::adler32_chksum ( ) const
inline

◆ bufferPointer() [1/2]

unsigned char*& SerializeDataBuffer::bufferPointer ( )
inline

Definition at line 42 of file StreamSerializer.h.

42 { return get_underlying_safe(ptr_); }

References edm::get_underlying_safe(), and ptr_.

◆ bufferPointer() [2/2]

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

◆ clearHeaderBuffer()

void SerializeDataBuffer::clearHeaderBuffer ( )
inline

Definition at line 47 of file StreamSerializer.h.

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  }

References header_buf_, init_size, and rootbuf_.

◆ currentEventSize()

unsigned int SerializeDataBuffer::currentEventSize ( ) const
inline

Definition at line 44 of file StreamSerializer.h.

44 { return curr_event_size_; }

References curr_event_size_.

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

◆ 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
staticconstexpr

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
staticconstexpr

◆ rootbuf_

TBufferFile SerializeDataBuffer::rootbuf_
SerializeDataBuffer::init_size
static constexpr int init_size
Definition: StreamSerializer.h:25
SerializeDataBuffer::curr_event_size_
unsigned int curr_event_size_
Definition: StreamSerializer.h:55
SerializeDataBuffer::header_buf_
SBuffer header_buf_
Definition: StreamSerializer.h:59
SerializeDataBuffer::comp_buf_
std::vector< unsigned char > comp_buf_
Definition: StreamSerializer.h:54
edm::get_underlying_safe
std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:40
SerializeDataBuffer::rootbuf_
TBufferFile rootbuf_
Definition: StreamSerializer.h:57
SerializeDataBuffer::ptr_
edm::propagate_const< unsigned char * > ptr_
Definition: StreamSerializer.h:58
SerializeDataBuffer::adler32_chksum_
uint32_t adler32_chksum_
Definition: StreamSerializer.h:60
SerializeDataBuffer::reserve_size
static constexpr unsigned int reserve_size
Definition: StreamSerializer.h:26
SerializeDataBuffer::curr_space_used_
unsigned int curr_space_used_
Definition: StreamSerializer.h:56