DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Main condition object handle. More...
#include <ConditionAny.h>
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::ConditionObject > | Base |
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 > | |
ConditionAny & | operator= (Handle< Q > &&c) |
Assignment move operator. More... | |
template<typename Q > | |
ConditionAny & | operator= (const Handle< Q > &c) |
Assignment copy operator. More... | |
ConditionAny & | operator= (Condition &&c) |
Assignment move operator. More... | |
ConditionAny & | operator= (const Condition &c) |
Assignment copy operator. More... | |
ConditionAny & | operator= (ConditionAny &&c)=default |
Assignment move operator. More... | |
ConditionAny & | operator= (const ConditionAny &c)=default |
Assignment copy operator. More... | |
const IOVType & | iovType () const |
Access the IOV type. More... | |
const IOV & | iov () 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 > | |
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::ConditionObject * | operator-> () const |
Access the held object using the -> operator. More... | |
operator detail::ConditionObject & () const | |
Automatic type conversion to an object references. More... | |
detail::ConditionObject & | operator* () const |
Access the held object using the * operator. More... | |
detail::ConditionObject * | ptr () 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::ConditionObject * | access () 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::ConditionObject * | m_element |
Single and only data member: Reference to the actual element. More... | |
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.
Definition at line 42 of file ConditionAny.h.
High part of the key identifies the detector element.
Definition at line 47 of file ConditionAny.h.
Low part of the key identifies the item identifier.
Definition at line 49 of file ConditionAny.h.
Forward definition of the key type.
Definition at line 45 of file ConditionAny.h.
Forward definition of the object properties.
Definition at line 51 of file ConditionAny.h.
|
default |
Default constructor.
|
default |
Move constructor.
|
inline |
Move constructor from Condition.
Definition at line 142 of file ConditionAny.h.
|
default |
Copy constructor.
|
inline |
Copy constructor from Condition.
Definition at line 147 of file ConditionAny.h.
dd4hep::ConditionAny::ConditionAny | ( | Object * | p | ) |
Initializing constructor.
dd4hep::ConditionAny::ConditionAny | ( | const Handle< Q > & | e | ) |
Constructor from another handle.
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.
|
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::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.
|
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.
const std::type_info & ConditionAny::any_type | ( | ) | const |
Access to the type information.
Definition at line 138 of file ConditionAny.cpp.
const std::string ConditionAny::any_type_name | ( | ) | const |
Access to the type information as string.
Definition at line 148 of file ConditionAny.cpp.
|
inline |
Access the contained object inside std::any.
Definition at line 197 of file ConditionAny.h.
|
inline |
Access the contained object inside std::any.
Definition at line 204 of file ConditionAny.h.
ConditionAny::detkey_type ConditionAny::detector_key | ( | ) | const |
DetElement part of the identifier.
Definition at line 85 of file ConditionAny.cpp.
ConditionAny::mask_type ConditionAny::flags | ( | ) | const |
Flag operations: Get condition flags.
Flag operations: Get flags.
Definition at line 95 of file ConditionAny.cpp.
std::any & ConditionAny::get | ( | ) |
Generic getter. Specify the exact type, not a polymorph type.
Definition at line 115 of file ConditionAny.cpp.
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.
bool ConditionAny::has_value | ( | ) | const |
Checks whether the object contains a value.
Definition at line 133 of file ConditionAny.cpp.
const dd4hep::IOV & ConditionAny::iov | ( | ) | const |
Access the IOV block.
Definition at line 75 of file ConditionAny.cpp.
const dd4hep::IOVType & ConditionAny::iovType | ( | ) | const |
ConditionAny::itemkey_type ConditionAny::item_key | ( | ) | const |
Item part of the identifier.
Definition at line 90 of file ConditionAny.cpp.
ConditionAny::key_type ConditionAny::key | ( | ) | const |
Hash identifier.
Conditions identification using integer keys.
Definition at line 80 of file ConditionAny.cpp.
|
inline |
Assignment move operator.
Definition at line 180 of file ConditionAny.h.
|
default |
Assignment move operator.
|
inline |
Assignment copy operator.
Definition at line 186 of file ConditionAny.h.
|
default |
Assignment copy operator.
|
inline |
Assignment copy operator.
Definition at line 174 of file ConditionAny.h.
|
inline |
Assignment move operator.
Definition at line 168 of file ConditionAny.h.
|
inline |
Access the contained object inside std::any.
Definition at line 211 of file ConditionAny.h.
|
inline |
Access the contained object inside std::any.
Definition at line 216 of file ConditionAny.h.
void ConditionAny::setFlag | ( | mask_type | option | ) |
Flag operations: Set a conditons flag.
Definition at line 100 of file ConditionAny.cpp.
bool ConditionAny::testFlag | ( | mask_type | option | ) | const |
Flag operations: Test for a given a conditons flag.
Definition at line 110 of file ConditionAny.cpp.
void ConditionAny::unFlag | ( | mask_type | option | ) |
Flag operations: UN-Set a conditons flag.
Definition at line 105 of file ConditionAny.cpp.
|
private |
Verify that underlying data are either invalid of contain an instance of std::any.
Definition at line 53 of file ConditionAny.cpp.
|
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.