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::RootOutputArchive Class Reference

#include <Serialization.h>

Public Member Functions

template<typename T >
RootOutputArchiveoperator<< (const T &instance)
 
 RootOutputArchive (std::ostream &dataDest, std::ostream &streamerInfoDest)
 

Private Member Functions

void write (const std::type_info &sourceType, const void *sourceInstance)
 

Private Attributes

std::ostream & m_dataBuffer
 
std::ostream & m_streamerInfoBuffer
 

Detailed Description

Definition at line 43 of file Serialization.h.

Constructor & Destructor Documentation

cond::RootOutputArchive::RootOutputArchive ( std::ostream &  dataDest,
std::ostream &  streamerInfoDest 
)

Definition at line 104 of file Serialization.cc.

104  :
105  m_dataBuffer( dataDest ),
106  m_streamerInfoBuffer( streamerInfoDest ){
107 }
std::ostream & m_streamerInfoBuffer
Definition: Serialization.h:55
std::ostream & m_dataBuffer
Definition: Serialization.h:54

Member Function Documentation

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

Definition at line 58 of file Serialization.h.

References write().

58  {
59  write( typeid(T), &instance );
60  return *this;
61  }
static PFTauRenderPlugin instance
void write(const std::type_info &sourceType, const void *sourceInstance)
long double T
void cond::RootOutputArchive::write ( const std::type_info &  sourceType,
const void *  sourceInstance 
)
private

Definition at line 109 of file Serialization.cc.

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

Referenced by pkg.AbstractPkg::generate(), and operator<<().

109  {
110  TClass* r_class = lookUpDictionary( sourceType );
111  if (!r_class) throwException( "No ROOT class registered for \"" + demangledName(sourceType)+"\"", "RootOutputArchive::write");
112  RootStreamBuffer buffer;
113  buffer.InitMap();
114  buffer.write(sourceInstance, r_class);
115  // copy the two streams into the target buffers
117 }
std::ostream & m_streamerInfoBuffer
Definition: Serialization.h:55
void write(const void *obj, 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
std::ostream & m_dataBuffer
Definition: Serialization.h:54
void copy(std::ostream &destForData, std::ostream &destForStreamerInfo)

Member Data Documentation

std::ostream& cond::RootOutputArchive::m_dataBuffer
private

Definition at line 54 of file Serialization.h.

std::ostream& cond::RootOutputArchive::m_streamerInfoBuffer
private

Definition at line 55 of file Serialization.h.