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 &source)
 
virtual ~RootInputArchive ()
 

Private Member Functions

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

Private Attributes

std::string m_buffer
 
TBufferFile * m_streamer = nullptr
 

Detailed Description

Definition at line 60 of file Serialization.h.

Constructor & Destructor Documentation

cond::RootInputArchive::RootInputArchive ( std::istream &  source)
explicit

Definition at line 48 of file Serialization.cc.

References m_streamer.

48  :
49  m_buffer( std::istreambuf_iterator<char>(source), std::istreambuf_iterator<char>()),
50  m_streamer( new TBufferFile( TBufferFile::kRead, m_buffer.size(), const_cast<char*>(m_buffer.c_str()), kFALSE ) ){
51  m_streamer->InitMap();
52 }
TBufferFile * m_streamer
Definition: Serialization.h:74
static std::string const source
Definition: EdmProvDump.cc:43
cond::RootInputArchive::~RootInputArchive ( )
virtual

Definition at line 54 of file Serialization.cc.

54  {
55  delete m_streamer;
56 }
TBufferFile * m_streamer
Definition: Serialization.h:74

Member Function Documentation

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

Definition at line 77 of file Serialization.h.

References read().

77  {
78  read( typeid(T), &instance );
79  return *this;
80  }
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 58 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().

58  {
59  TClass* r_class = lookUpDictionary( destinationType );
60  if (!r_class) throwException( "No ROOT class registered for \"" + demangledName(destinationType) +"\"","RootInputArchive::read");
61  m_streamer->StreamObject(destinationInstance, r_class);
62 }
TBufferFile * m_streamer
Definition: Serialization.h:74
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

Member Data Documentation

std::string cond::RootInputArchive::m_buffer
private

Definition at line 73 of file Serialization.h.

TBufferFile* cond::RootInputArchive::m_streamer = nullptr
private

Definition at line 74 of file Serialization.h.

Referenced by RootInputArchive().