CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
cond::RootInputArchive Class Reference

#include <Serialization.h>

Public Member Functions

template<typename T >
RootInputArchiveoperator>> (T &instance)
 
 RootInputArchive (std::istream &binaryData, std::istream &binaryStreamerInfo)
 
virtual ~RootInputArchive ()
 

Private Member Functions

void read (const std::type_info &destinationType, void *destinationInstance)
 

Private Attributes

std::string m_dataBuffer
 
RootStreamBufferm_streamer = 0
 
std::string m_streamerInfoBuffer
 

Detailed Description

Definition at line 64 of file Serialization.h.

Constructor & Destructor Documentation

cond::RootInputArchive::RootInputArchive ( std::istream &  binaryData,
std::istream &  binaryStreamerInfo 
)

Definition at line 119 of file Serialization.cc.

References m_streamer.

119  :
120  m_dataBuffer( std::istreambuf_iterator<char>( binaryData ), std::istreambuf_iterator<char>()),
121  m_streamerInfoBuffer( std::istreambuf_iterator<char>( binaryStreamerInfo ), std::istreambuf_iterator<char>()),
123  m_streamer->InitMap();
124 }
std::string m_dataBuffer
Definition: Serialization.h:77
std::string m_streamerInfoBuffer
Definition: Serialization.h:78
RootStreamBuffer * m_streamer
Definition: Serialization.h:79
cond::RootInputArchive::~RootInputArchive ( )
virtual

Definition at line 126 of file Serialization.cc.

126  {
127  delete m_streamer;
128 }
RootStreamBuffer * m_streamer
Definition: Serialization.h:79

Member Function Documentation

template<typename T >
RootInputArchive & cond::RootInputArchive::operator>> ( T instance)
inline

Definition at line 82 of file Serialization.h.

References read().

82  {
83  read( typeid(T), &instance );
84  return *this;
85  }
static PFTauRenderPlugin instance
void read(const std::type_info &destinationType, void *destinationInstance)
long double T
void cond::RootInputArchive::read ( const std::type_info &  destinationType,
void *  destinationInstance 
)
private

Definition at line 130 of file Serialization.cc.

References ora::ClassUtils::demangledName(), cond::lookUpDictionary(), and cond::throwException().

Referenced by Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::goto(), operator>>(), and Vispa.Plugins.EdmBrowser.EdmDataAccessor.EdmDataAccessor::setFilterBranches().

130  {
131  TClass* r_class = lookUpDictionary( destinationType );
132  if (!r_class) throwException( "No ROOT class registered for \"" + demangledName(destinationType) +"\"","RootInputArchive::read");
133  m_streamer->read( destinationInstance, r_class );
134 }
void read(void *destinationInstance, const TClass *ptrClass)
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:156
TClass * lookUpDictionary(const std::type_info &sourceType)
void throwException(std::string const &message, std::string const &methodName)
Definition: Exception.cc:17
RootStreamBuffer * m_streamer
Definition: Serialization.h:79

Member Data Documentation

std::string cond::RootInputArchive::m_dataBuffer
private

Definition at line 77 of file Serialization.h.

RootStreamBuffer* cond::RootInputArchive::m_streamer = 0
private

Definition at line 79 of file Serialization.h.

Referenced by RootInputArchive().

std::string cond::RootInputArchive::m_streamerInfoBuffer
private

Definition at line 78 of file Serialization.h.