CMS 3D CMS Logo

cond::TBufferBlobReader Class Reference

#include <IOPool/CMSSealPlugins/plugins/TBufferBlobStreamer.h>

List of all members.

Public Member Functions

void read (const coral::Blob &blobData, void *containerAddress) const
 Reads an object from a Blob and returns the starting address of the object.
 TBufferBlobReader (const ROOT::Reflex::Type &type)
 Constructor.
virtual ~TBufferBlobReader ()
 Empty destructor.

Private Attributes

TBufferBlobTypeInfo m_type
 The type information as seen by the blob streamer.


Detailed Description

Definition at line 47 of file TBufferBlobStreamer.h.


Constructor & Destructor Documentation

cond::TBufferBlobReader::TBufferBlobReader ( const ROOT::Reflex::Type &  type  ) 

Constructor.

Definition at line 140 of file TBufferBlobStreamer.cc.

00141                                                                   :
00142   m_type(type)
00143 {
}

cond::TBufferBlobReader::~TBufferBlobReader (  )  [virtual]

Empty destructor.

Definition at line 145 of file TBufferBlobStreamer.cc.

00147 {


Member Function Documentation

void cond::TBufferBlobReader::read ( const coral::Blob &  blobData,
void containerAddress 
) const

Reads an object from a Blob and returns the starting address of the object.

Definition at line 149 of file TBufferBlobStreamer.cc.

References cond::TBufferBlobTypeInfo::m_arraySize, cond::TBufferBlobTypeInfo::m_class, cond::TBufferBlobTypeInfo::m_primitive, m_type, primitives, Primitive::readArrayFn, and size.

00152 {
00153   const void *startingAddress = blobData.startingAddress();
00154   size_t size = blobData.size();
00155   if (!size)
00156     return;
00157 
00158   CONDRootBuffer buffer(CONDRootBuffer::kRead, size,
00159                  const_cast<void*>(startingAddress), kFALSE);
00160 
00161   buffer.InitMap();
00162 
00163   if (m_type.m_arraySize && !m_type.m_class)
00164     (buffer.*primitives[m_type.m_primitive].readArrayFn)(addr, m_type.m_arraySize);
00165   else if (m_type.m_arraySize)
00166     buffer.ReadFastArray(addr, m_type.m_class, m_type.m_arraySize);
00167   else
00168     buffer.StreamObject(addr, m_type.m_class);


Member Data Documentation

TBufferBlobTypeInfo cond::TBufferBlobReader::m_type [private]

The type information as seen by the blob streamer.

Definition at line 62 of file TBufferBlobStreamer.h.

Referenced by read().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:36:49 2009 for CMSSW by  doxygen 1.5.4