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 = nullptr
 
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 128 of file Serialization.cc.

References m_streamer.

128  :
129  m_dataBuffer( std::istreambuf_iterator<char>( binaryData ), std::istreambuf_iterator<char>()),
130  m_streamerInfoBuffer( std::istreambuf_iterator<char>( binaryStreamerInfo ), std::istreambuf_iterator<char>()),
132  m_streamer->InitMap();
133 }
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 135 of file Serialization.cc.

135  {
136  delete m_streamer;
137 }
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 139 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().

139  {
140  TClass* r_class = lookUpDictionary( destinationType );
141  if (!r_class) throwException( "No ROOT class registered for \"" + demangledName(destinationType) +"\"","RootInputArchive::read");
142  m_streamer->read( destinationInstance, r_class );
143 }
void read(void *destinationInstance, const TClass *ptrClass)
std::string demangledName(const std::type_info &typeInfo)
Definition: ClassUtils.cc:82
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 = nullptr
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.