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

Main condition object handle. More...

#include <ConditionAny.h>

Inheritance diagram for dd4hep::ConditionAny:
dd4hep::Handle< detail::ConditionObject >

Public Types

using key_type = Condition::key_type
 Forward definition of the key type. More...
 
using detkey_type = Condition::detkey_type
 High part of the key identifies the detector element. More...
 
using itemkey_type = Condition::itemkey_type
 Low part of the key identifies the item identifier. More...
 
using mask_type = Condition::mask_type
 Forward definition of the object properties. More...
 
- Public Types inherited from dd4hep::Handle< detail::ConditionObject >
typedef detail::ConditionObject Object
 Extern accessible definition of the contained element type. More...
 
typedef Handle< detail::ConditionObjectBase
 Self type: used by sub-classes. More...
 

Public Member Functions

 ConditionAny ()=default
 Default constructor. More...
 
 ConditionAny (ConditionAny &&c)=default
 Move constructor. More...
 
 ConditionAny (Condition &&c)
 Move constructor from Condition. More...
 
 ConditionAny (const ConditionAny &c)=default
 Copy constructor. More...
 
 ConditionAny (const Condition &c)
 Copy constructor from Condition. More...
 
 ConditionAny (Object *p)
 Initializing constructor. More...
 
template<typename Q >
 ConditionAny (const Handle< Q > &e)
 Constructor from another handle. More...
 
 ConditionAny (key_type hash_key)
 Initializing constructor for a initialized std::any payload. More...
 
template<typename PAYLOAD >
 ConditionAny (key_type hash_key, PAYLOAD &&data)
 Initializing constructor for a initialized and filled std::any payload. More...
 
 ConditionAny (const std::string &name, const std::string &type)
 Initializing constructor for a initialized std::any payload. More...
 
template<typename PAYLOAD >
 ConditionAny (const std::string &name, const std::string &type, PAYLOAD &&data)
 Initializing constructor for a initialized and filled std::any payload. More...
 
template<typename Q >
ConditionAnyoperator= (Handle< Q > &&c)
 Assignment move operator. More...
 
template<typename Q >
ConditionAnyoperator= (const Handle< Q > &c)
 Assignment copy operator. More...
 
ConditionAnyoperator= (Condition &&c)
 Assignment move operator. More...
 
ConditionAnyoperator= (const Condition &c)
 Assignment copy operator. More...
 
ConditionAnyoperator= (ConditionAny &&c)=default
 Assignment move operator. More...
 
ConditionAnyoperator= (const ConditionAny &c)=default
 Assignment copy operator. More...
 
const IOVTypeiovType () const
 Access the IOV type. More...
 
const IOViov () const
 Access the IOV block. More...
 
key_type key () const
 Hash identifier. More...
 
detkey_type detector_key () const
 DetElement part of the identifier. More...
 
itemkey_type item_key () const
 Item part of the identifier. More...
 
mask_type flags () const
 Flag operations: Get condition flags. More...
 
void setFlag (mask_type option)
 Flag operations: Set a conditons flag. More...
 
void unFlag (mask_type option)
 Flag operations: UN-Set a conditons flag. More...
 
bool testFlag (mask_type option) const
 Flag operations: Test for a given a conditons flag. More...
 
std::any & get ()
 Generic getter. Specify the exact type, not a polymorph type. More...
 
const std::any & get () const
 Generic getter (const version). Specify the exact type, not a polymorph type. More...
 
bool has_value () const
 Checks whether the object contains a value. More...
 
const std::type_info & any_type () const
 Access to the type information. More...
 
const std::string any_type_name () const
 Access to the type information as string. More...
 
template<typename T >
T & as ()
 Access the contained object inside std::any. More...
 
template<typename T >
const T & as () const
 Access the contained object inside std::any. More...
 
template<typename T >
value ()
 Access a copy of the contained object inside std::any. More...
 
template<typename T >
T * pointer ()
 Access the contained object inside std::any. More...
 
template<typename T >
const T * pointer () const
 Access the contained object inside std::any. More...
 
- Public Member Functions inherited from dd4hep::Handle< detail::ConditionObject >
 Handle ()=default
 Default constructor. More...
 
 Handle (Handle< detail::ConditionObject > &&element)=default
 Copy constructor. More...
 
 Handle (const Handle< detail::ConditionObject > &element)=default
 Copy constructor. More...
 
 Handle (detail::ConditionObject *element)
 Initializing constructor from pointer. More...
 
 Handle (Q *element)
 Initializing constructor from unrelated pointer with type checking. More...
 
 Handle (const Handle< Q > &element)
 Initializing constructor from unrelated handle with type checking. More...
 
Handle< detail::ConditionObject > & operator= (Handle< detail::ConditionObject > &&element)=default
 Assignment move operator. More...
 
Handle< detail::ConditionObject > & operator= (const Handle< detail::ConditionObject > &element)=default
 Assignment copy operator. More...
 
bool operator== (const Handle< detail::ConditionObject > &element) const
 Boolean operator == used for RB tree insertions. More...
 
bool operator< (const Handle< detail::ConditionObject > &element) const
 Boolean operator < used for RB tree insertions. More...
 
bool operator> (const Handle< detail::ConditionObject > &element) const
 Boolean operator > used for RB tree insertions. More...
 
bool isValid () const
 Check the validity of the object held by the handle. More...
 
bool operator! () const
 Check the validity of the object held by the handle. More...
 
Handle< detail::ConditionObject > & clear ()
 Release the object held by the handle. More...
 
detail::ConditionObjectoperator-> () const
 Access the held object using the -> operator. More...
 
 operator detail::ConditionObject & () const
 Automatic type conversion to an object references. More...
 
detail::ConditionObjectoperator* () const
 Access the held object using the * operator. More...
 
detail::ConditionObjectptr () const
 Access to the held object. More...
 
Q * _ptr () const
 Access to an unrelated object type. More...
 
Q * data () const
 Access to an unrelated object type. More...
 
Q & object () const
 Access to an unrelated object type. More...
 
detail::ConditionObjectaccess () const
 Checked object access. Throws invalid handle runtime exception if invalid handle. More...
 
const char * name () const
 Access the object name (or "" if not supported by the object) More...
 
const char * name () const
 
const char * name () const
 
void assign (Object *n, const std::string &nam, const std::string &title)
 Assign a new named object. Note: object references must be managed by the user. More...
 
void assign (_Segmentation *s, const std::string &n, const std::string &)
 
void assign (NamedObject *p, const std::string &n, const std::string &t)
 
void destroy ()
 Destroy the underlying object (be careful here: things are not reference counted)! More...
 

Private Member Functions

void use_data (detail::ConditionObject *obj)
 Verify that underlying data are either invalid of contain an instance of std::any. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from dd4hep::Handle< detail::ConditionObject >
static void bad_assignment (const std::type_info &from, const std::type_info &to)
 Helper routine called when unrelated types are assigned. More...
 
- Public Attributes inherited from dd4hep::Handle< detail::ConditionObject >
detail::ConditionObjectm_element
 Single and only data member: Reference to the actual element. More...
 

Detailed Description

Main condition object handle.

Convenience handle for specialized Condition objects with a concrete payload of std::any.

Note: Conditions may be shared between several DetElement objects.

Author
M.Frank
Version
1.0

Definition at line 42 of file ConditionAny.h.

Member Typedef Documentation

◆ detkey_type

High part of the key identifies the detector element.

Definition at line 47 of file ConditionAny.h.

◆ itemkey_type

Low part of the key identifies the item identifier.

Definition at line 49 of file ConditionAny.h.

◆ key_type

Forward definition of the key type.

Definition at line 45 of file ConditionAny.h.

◆ mask_type

Forward definition of the object properties.

Definition at line 51 of file ConditionAny.h.

Constructor & Destructor Documentation

◆ ConditionAny() [1/11]

dd4hep::ConditionAny::ConditionAny ( )
default

Default constructor.

◆ ConditionAny() [2/11]

dd4hep::ConditionAny::ConditionAny ( ConditionAny &&  c)
default

Move constructor.

◆ ConditionAny() [3/11]

dd4hep::ConditionAny::ConditionAny ( Condition &&  c)
inline

Move constructor from Condition.

Definition at line 142 of file ConditionAny.h.

◆ ConditionAny() [4/11]

dd4hep::ConditionAny::ConditionAny ( const ConditionAny c)
default

Copy constructor.

◆ ConditionAny() [5/11]

dd4hep::ConditionAny::ConditionAny ( const Condition c)
inline

Copy constructor from Condition.

Definition at line 147 of file ConditionAny.h.

◆ ConditionAny() [6/11]

dd4hep::ConditionAny::ConditionAny ( Object p)

Initializing constructor.

◆ ConditionAny() [7/11]

template<typename Q >
dd4hep::ConditionAny::ConditionAny ( const Handle< Q > &  e)

Constructor from another handle.

◆ ConditionAny() [8/11]

ConditionAny::ConditionAny ( key_type  hash_key)

Initializing constructor for a initialized std::any payload.

Initializing constructor for a pure, undecorated conditions object.

Definition at line 32 of file ConditionAny.cpp.

◆ ConditionAny() [9/11]

template<typename PAYLOAD >
dd4hep::ConditionAny::ConditionAny ( key_type  hash_key,
PAYLOAD &&  data 
)
inline

Initializing constructor for a initialized and filled std::any payload.

Construct conditions object and bind the data.

Definition at line 153 of file ConditionAny.h.

◆ ConditionAny() [10/11]

ConditionAny::ConditionAny ( const std::string &  name,
const std::string &  type 
)

Initializing constructor for a initialized std::any payload.

Initializing constructor for a pure, undecorated conditions object.

Definition at line 45 of file ConditionAny.cpp.

◆ ConditionAny() [11/11]

template<typename PAYLOAD >
dd4hep::ConditionAny::ConditionAny ( const std::string &  name,
const std::string &  type,
PAYLOAD &&  data 
)
inline

Initializing constructor for a initialized and filled std::any payload.

Construct conditions object and bind the payload.

Definition at line 161 of file ConditionAny.h.

Member Function Documentation

◆ any_type()

const std::type_info & ConditionAny::any_type ( ) const

Access to the type information.

Definition at line 138 of file ConditionAny.cpp.

◆ any_type_name()

const std::string ConditionAny::any_type_name ( ) const

Access to the type information as string.

Definition at line 148 of file ConditionAny.cpp.

◆ as() [1/2]

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

Access the contained object inside std::any.

Definition at line 197 of file ConditionAny.h.

◆ as() [2/2]

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

Access the contained object inside std::any.

Definition at line 204 of file ConditionAny.h.

◆ detector_key()

ConditionAny::detkey_type ConditionAny::detector_key ( ) const

DetElement part of the identifier.

Definition at line 85 of file ConditionAny.cpp.

◆ flags()

ConditionAny::mask_type ConditionAny::flags ( ) const

Flag operations: Get condition flags.

Flag operations: Get flags.

Definition at line 95 of file ConditionAny.cpp.

◆ get() [1/2]

std::any & ConditionAny::get ( )

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

Definition at line 115 of file ConditionAny.cpp.

◆ get() [2/2]

const std::any & ConditionAny::get ( ) const

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

Definition at line 124 of file ConditionAny.cpp.

◆ has_value()

bool ConditionAny::has_value ( ) const

Checks whether the object contains a value.

Definition at line 133 of file ConditionAny.cpp.

◆ iov()

const dd4hep::IOV & ConditionAny::iov ( ) const

Access the IOV block.

Definition at line 75 of file ConditionAny.cpp.

◆ iovType()

const dd4hep::IOVType & ConditionAny::iovType ( ) const

Access the IOV type.

Interval of validity

Definition at line 70 of file ConditionAny.cpp.

◆ item_key()

ConditionAny::itemkey_type ConditionAny::item_key ( ) const

Item part of the identifier.

Definition at line 90 of file ConditionAny.cpp.

◆ key()

ConditionAny::key_type ConditionAny::key ( ) const

Hash identifier.

Conditions identification using integer keys.

Definition at line 80 of file ConditionAny.cpp.

◆ operator=() [1/6]

ConditionAny & dd4hep::ConditionAny::operator= ( Condition &&  c)
inline

Assignment move operator.

Definition at line 180 of file ConditionAny.h.

◆ operator=() [2/6]

ConditionAny& dd4hep::ConditionAny::operator= ( ConditionAny &&  c)
default

Assignment move operator.

◆ operator=() [3/6]

ConditionAny & dd4hep::ConditionAny::operator= ( const Condition c)
inline

Assignment copy operator.

Definition at line 186 of file ConditionAny.h.

◆ operator=() [4/6]

ConditionAny& dd4hep::ConditionAny::operator= ( const ConditionAny c)
default

Assignment copy operator.

◆ operator=() [5/6]

template<typename Q >
ConditionAny & dd4hep::ConditionAny::operator= ( const Handle< Q > &  c)
inline

Assignment copy operator.

Definition at line 174 of file ConditionAny.h.

◆ operator=() [6/6]

template<typename Q >
ConditionAny & dd4hep::ConditionAny::operator= ( Handle< Q > &&  c)
inline

Assignment move operator.

Definition at line 168 of file ConditionAny.h.

◆ pointer() [1/2]

template<typename T >
T * dd4hep::ConditionAny::pointer
inline

Access the contained object inside std::any.

Definition at line 211 of file ConditionAny.h.

◆ pointer() [2/2]

template<typename T >
const T * dd4hep::ConditionAny::pointer
inline

Access the contained object inside std::any.

Definition at line 216 of file ConditionAny.h.

◆ setFlag()

void ConditionAny::setFlag ( mask_type  option)

Flag operations: Set a conditons flag.

Definition at line 100 of file ConditionAny.cpp.

◆ testFlag()

bool ConditionAny::testFlag ( mask_type  option) const

Flag operations: Test for a given a conditons flag.

Definition at line 110 of file ConditionAny.cpp.

◆ unFlag()

void ConditionAny::unFlag ( mask_type  option)

Flag operations: UN-Set a conditons flag.

Definition at line 105 of file ConditionAny.cpp.

◆ use_data()

void ConditionAny::use_data ( detail::ConditionObject obj)
private

Verify that underlying data are either invalid of contain an instance of std::any.

Definition at line 53 of file ConditionAny.cpp.

◆ value()

template<typename T >
T dd4hep::ConditionAny::value
inline

Access a copy of the contained object inside std::any.

Access the contained object inside std::any.

Definition at line 192 of file ConditionAny.h.


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