DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members

Class describing an opaque data block. More...

#include <OpaqueData.h>

Inheritance diagram for dd4hep::OpaqueData:
dd4hep::OpaqueDataBlock

Public Member Functions

bool fromString (const std::string &rep)
 No ROOT persistency. More...
 
std::string str () const
 Create string representation of the data block. More...
 
const std::type_info & typeInfo () const
 Access type id of the condition. More...
 
const std::string & dataType () const
 Access type name of the condition data block. More...
 
const void * ptr () const
 Access to the data buffer (read only!). Is only valid after call to bind<T>() More...
 
bool is_bound () const
 Check if object is already bound.... More...
 
template<typename T >
T & get ()
 Generic getter. Specify the exact type, not a polymorph type. More...
 
template<typename T >
const T & get () const
 Generic getter (const version). Specify the exact type, not a polymorph type. More...
 
template<typename T >
T & as ()
 Generic getter. Resolves polymorph types. It is mandatory that the datatype is polymorph! More...
 
template<typename T >
const T & as () const
 Generic getter (const version). Resolves polymorph types. It is mandatory that the datatype is polymorph! More...
 

Public Attributes

const BasicGrammargrammar = 0
 Data type. More...
 

Protected Member Functions

 OpaqueData ()=default
 Standard initializing constructor. More...
 
virtual ~OpaqueData ()=default
 Standard Destructor. More...
 
 OpaqueData (const OpaqueData &copy)=default
 Copy constructor. More...
 
OpaqueDataoperator= (const OpaqueData &copy)=default
 Assignment operator. More...
 

Protected Attributes

void * pointer = 0
 No ROOT persistency. More...
 

Detailed Description

Class describing an opaque data block.

Access methods are templated. Once the access is fixed on the first call, the data type may not be changed anymore.

Author
M.Frank
Version
1.0

Definition at line 39 of file OpaqueData.h.

Constructor & Destructor Documentation

◆ OpaqueData() [1/2]

dd4hep::OpaqueData::OpaqueData ( )
protecteddefault

Standard initializing constructor.

◆ ~OpaqueData()

virtual dd4hep::OpaqueData::~OpaqueData ( )
protectedvirtualdefault

Standard Destructor.

◆ OpaqueData() [2/2]

dd4hep::OpaqueData::OpaqueData ( const OpaqueData copy)
protecteddefault

Copy constructor.

Member Function Documentation

◆ as() [1/2]

template<typename T >
T & dd4hep::OpaqueData::as
inline

Generic getter. Resolves polymorph types. It is mandatory that the datatype is polymorph!

Generic getter. Specify the exact type, not a polymorph type.

Definition at line 169 of file OpaqueData.h.

◆ as() [2/2]

template<typename T >
const T & dd4hep::OpaqueData::as
inline

Generic getter (const version). Resolves polymorph types. It is mandatory that the datatype is polymorph!

Generic getter (const version). Specify the exact type, not a polymorph type.

Definition at line 178 of file OpaqueData.h.

◆ dataType()

const std::string & OpaqueData::dataType ( ) const

Access type name of the condition data block.

Definition at line 50 of file OpaqueData.cpp.

◆ fromString()

bool OpaqueData::fromString ( const std::string &  rep)

No ROOT persistency.

Create data block from string representation.

Create data block from string representation

Definition at line 26 of file OpaqueData.cpp.

◆ get() [1/2]

template<typename T >
T & dd4hep::OpaqueData::get
inline

Generic getter. Specify the exact type, not a polymorph type.

Definition at line 157 of file OpaqueData.h.

◆ get() [2/2]

template<typename T >
const T & dd4hep::OpaqueData::get
inline

Generic getter (const version). Specify the exact type, not a polymorph type.

Definition at line 163 of file OpaqueData.h.

◆ is_bound()

bool dd4hep::OpaqueData::is_bound ( ) const
inline

Check if object is already bound....

Definition at line 71 of file OpaqueData.h.

◆ operator=()

OpaqueData& dd4hep::OpaqueData::operator= ( const OpaqueData copy)
protecteddefault

Assignment operator.

◆ ptr()

const void* dd4hep::OpaqueData::ptr ( ) const
inline

Access to the data buffer (read only!). Is only valid after call to bind<T>()

Definition at line 69 of file OpaqueData.h.

◆ str()

std::string OpaqueData::str ( ) const

Create string representation of the data block.

Definition at line 34 of file OpaqueData.cpp.

◆ typeInfo()

const std::type_info & OpaqueData::typeInfo ( ) const

Access type id of the condition.

Definition at line 42 of file OpaqueData.cpp.

Member Data Documentation

◆ grammar

const BasicGrammar* dd4hep::OpaqueData::grammar = 0

Data type.

Definition at line 53 of file OpaqueData.h.

◆ pointer

void* dd4hep::OpaqueData::pointer = 0
protected

No ROOT persistency.

Pointer to object data

Definition at line 57 of file OpaqueData.h.


The documentation for this class was generated from the following files: