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 113 of file Serialization.cc.

113  :
114  m_dataBuffer( dataDest ),
115  m_streamerInfoBuffer( streamerInfoDest ){
116 }
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 118 of file Serialization.cc.

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

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

118  {
119  TClass* r_class = lookUpDictionary( sourceType );
120  if (!r_class) throwException( "No ROOT class registered for \"" + demangledName(sourceType)+"\"", "RootOutputArchive::write");
121  RootStreamBuffer buffer;
122  buffer.InitMap();
123  buffer.write(sourceInstance, r_class);
124  // copy the two streams into the target buffers
126 }
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:82
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.