DD4hep
1.30.0
Detector Description Toolkit for High Energy Physics
|
Main condition object handle. More...
#include <Conditions.h>
Classes | |
class | Processor |
Abstract base for processing callbacks to conditions objects. More... | |
Public Types | |
enum | StringFlags { WITH_IOV = 1<<0, WITH_ADDRESS = 1<<1, WITH_TYPE = 1<<2, WITH_COMMENT = 1<<4, WITH_DATATYPE = 1<<5, WITH_DATA = 1<<6, NO_NAME = 1<<20, NONE } |
Flags to steer the conditions conversion to string. More... | |
enum | ConditionState { INACTIVE = 0, ACTIVE = 1<<0, CHECKED = 1<<2, DERIVED = 1<<3, ONSTACK = 1<<4, TEMPERATURE = 1<<5, TEMPERATURE_DERIVED = 1<<6|DERIVED, PRESSURE = 1<<7, PRESSURE_DERIVED = 1<<8|DERIVED, ALIGNMENT_DELTA = 1<<9, ALIGNMENT_DERIVED = 1<<10|DERIVED, USER_FLAGS_FIRST = 1<<16, USER_FLAGS_LAST = 1<<31 } |
Flags to indicate the conditions type ans state. More... | |
enum | ConditionItemRangeKeys { FIRST_ITEM_KEY = 0x0U, LAST_ITEM_KEY = ~0x0U } |
Flags to indicate conditions item ranges (low word of the conditions key) More... | |
enum | ConditionDetectorRangeKeys { FIRST_DET_KEY = 0x0U, LAST_DET_KEY = ~0x0U } |
Flags to indicate conditions detector ranges (high word of the conditions key) More... | |
typedef unsigned long long int | key_type |
Forward definition of the key type. More... | |
typedef unsigned int | detkey_type |
High part of the key identifies the detector element. More... | |
typedef unsigned int | itemkey_type |
Low part of the key identifies the item identifier. More... | |
typedef unsigned int | 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 | |
Condition ()=default | |
Default constructor. More... | |
Condition (Condition &&c)=default | |
Move constructor. More... | |
Condition (const Condition &c)=default | |
Copy constructor. More... | |
Condition (Object *p) | |
Initializing constructor. More... | |
template<typename Q > | |
Condition (const Handle< Q > &e) | |
Constructor to be used when reading the already parsed object. More... | |
Condition (key_type hash_key) | |
Initializing constructor for a pure, undecorated conditions object. More... | |
Condition (const std::string &name, const std::string &type) | |
Initializing constructor for a pure, undecorated conditions object. More... | |
Condition (const std::string &name, const std::string &type, size_t memory) | |
Initializing constructor for a pure, undecorated conditions object with payload buffer. More... | |
Condition & | operator= (Condition &&c)=default |
Assignment move operator. More... | |
Condition & | operator= (const Condition &c)=default |
Assignment copy operator. More... | |
std::string | str (int with_data=WITH_IOV|WITH_ADDRESS|WITH_DATATYPE) const |
Output method. More... | |
int | dataType () const |
Access the data type. 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... | |
const std::string & | type () const |
Access the type field of the condition. More... | |
const std::string & | value () const |
Access the value field of the condition as a string. More... | |
const std::string & | comment () const |
Access the comment field of the condition. More... | |
const std::string & | address () const |
Access the address string [e.g. database 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... | |
OpaqueDataBlock & | data () const |
Access the opaque data block. More... | |
const std::type_info & | typeInfo () const |
Access to the type information. More... | |
const BasicGrammar & | descriptor () const |
Access to the grammar type. More... | |
bool | is_bound () const |
Check if object is already bound.... More... | |
template<typename T , typename... Args> | |
T & | construct (Args... args) |
Construct conditions object and bind the data. More... | |
template<typename T > | |
T & | bind () |
Bind the data of the conditions object to a given format. More... | |
template<typename T > | |
T & | bind (const std::string &val) |
Bind the data of the conditions object to a given format and fill data from string representation. 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 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... | |
Static Public Member Functions | |
static int | haveInventory (int value=-1) |
Allow to trace condition names from keys for debugging. More... | |
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... | |
Static Public Attributes | |
static constexpr unsigned long long int | FIRST_KEY = 0x0ULL |
Flags to indicate global conditions ranges. More... | |
static constexpr unsigned long long int | LAST_KEY = ~0x0ULL |
Additional Inherited Members | |
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.
This objects allows access to the data block and the interval of validity for a single condition.
Note: Conditions may be shared between several DetElement objects. Hence, the back-link to the DetElement structure cannot be set - it would be ambiguous.
Definition at line 51 of file Conditions.h.
typedef unsigned int dd4hep::Condition::detkey_type |
High part of the key identifies the detector element.
Definition at line 56 of file Conditions.h.
typedef unsigned int dd4hep::Condition::itemkey_type |
Low part of the key identifies the item identifier.
Definition at line 58 of file Conditions.h.
typedef unsigned long long int dd4hep::Condition::key_type |
Forward definition of the key type.
Definition at line 54 of file Conditions.h.
typedef unsigned int dd4hep::Condition::mask_type |
Forward definition of the object properties.
Definition at line 60 of file Conditions.h.
Flags to indicate conditions detector ranges (high word of the conditions key)
Enumerator | |
---|---|
FIRST_DET_KEY | |
LAST_DET_KEY |
Definition at line 99 of file Conditions.h.
Flags to indicate conditions item ranges (low word of the conditions key)
Enumerator | |
---|---|
FIRST_ITEM_KEY | |
LAST_ITEM_KEY |
Definition at line 94 of file Conditions.h.
Flags to indicate the conditions type ans state.
Enumerator | |
---|---|
INACTIVE | |
ACTIVE | |
CHECKED | |
DERIVED | |
ONSTACK | |
TEMPERATURE | |
TEMPERATURE_DERIVED | |
PRESSURE | |
PRESSURE_DERIVED | |
ALIGNMENT_DELTA | |
ALIGNMENT_DERIVED | |
USER_FLAGS_FIRST | |
USER_FLAGS_LAST |
Definition at line 75 of file Conditions.h.
Flags to steer the conditions conversion to string.
Enumerator | |
---|---|
WITH_IOV | |
WITH_ADDRESS | |
WITH_TYPE | |
WITH_COMMENT | |
WITH_DATATYPE | |
WITH_DATA | |
NO_NAME | |
NONE |
Definition at line 64 of file Conditions.h.
|
default |
Default constructor.
|
default |
Move constructor.
|
default |
Copy constructor.
dd4hep::Condition::Condition | ( | Object * | p | ) |
Initializing constructor.
|
inline |
Constructor to be used when reading the already parsed object.
Definition at line 242 of file Conditions.h.
Condition::Condition | ( | key_type | hash_key | ) |
Initializing constructor for a pure, undecorated conditions object.
Definition at line 65 of file Conditions.cpp.
Condition::Condition | ( | const std::string & | name, |
const std::string & | type | ||
) |
Initializing constructor for a pure, undecorated conditions object.
Definition at line 77 of file Conditions.cpp.
Condition::Condition | ( | const std::string & | name, |
const std::string & | type, | ||
size_t | memory | ||
) |
Initializing constructor for a pure, undecorated conditions object with payload buffer.
Definition at line 85 of file Conditions.cpp.
const std::string & Condition::address | ( | ) | const |
Access the address string [e.g. database identifier].
Definition at line 160 of file Conditions.cpp.
|
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 266 of file Conditions.h.
|
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 270 of file Conditions.h.
|
inline |
Bind the data of the conditions object to a given format.
Bind the data of the conditions object to a given format.
Note: The type definition is possible exactly once. Any further rebindings MUST match the identical type.
Definition at line 250 of file Conditions.h.
|
inline |
Bind the data of the conditions object to a given format and fill data from string representation.
Set and bind the data of the conditions object to a given format.
Note: The type definition is possible exactly once. Any further rebindings MUST match the identical type.
Definition at line 254 of file Conditions.h.
const std::string & Condition::comment | ( | ) | const |
Access the comment field of the condition.
Definition at line 155 of file Conditions.cpp.
T & dd4hep::Condition::construct | ( | Args... | args | ) |
Construct conditions object and bind the data.
Construct conditions object and bind the data
Note: The type definition is possible exactly once. Any further rebindings MUST match the identical type.
Definition at line 246 of file Conditions.h.
dd4hep::OpaqueDataBlock & Condition::data | ( | ) | const |
Access the opaque data block.
Access the IOV block.
Conditions meta-data and handling of the data binding
Definition at line 129 of file Conditions.cpp.
int Condition::dataType | ( | ) | const |
const dd4hep::BasicGrammar & Condition::descriptor | ( | ) | const |
Access to the grammar type.
Definition at line 206 of file Conditions.cpp.
Condition::detkey_type Condition::detector_key | ( | ) | const |
DetElement part of the identifier.
Definition at line 176 of file Conditions.cpp.
Condition::mask_type Condition::flags | ( | ) | const |
Flag operations: Get condition flags.
Flag operations: Get flags.
Definition at line 186 of file Conditions.cpp.
|
inline |
Generic getter. Specify the exact type, not a polymorph type.
Definition at line 258 of file Conditions.h.
|
inline |
Generic getter (const version). Specify the exact type, not a polymorph type.
Definition at line 262 of file Conditions.h.
|
static |
Allow to trace condition names from keys for debugging.
const dd4hep::IOV & Condition::iov | ( | ) | const |
Access the IOV block.
Definition at line 139 of file Conditions.cpp.
const dd4hep::IOVType & Condition::iovType | ( | ) | const |
|
inline |
Check if object is already bound....
Definition at line 205 of file Conditions.h.
Condition::itemkey_type Condition::item_key | ( | ) | const |
Item part of the identifier.
Definition at line 181 of file Conditions.cpp.
Condition::key_type Condition::key | ( | ) | const |
Hash identifier.
Conditions identification using integer keys.
Definition at line 171 of file Conditions.cpp.
void Condition::setFlag | ( | mask_type | option | ) |
Flag operations: Set a conditons flag.
Definition at line 191 of file Conditions.cpp.
std::string Condition::str | ( | int | with_data = WITH_IOV|WITH_ADDRESS|WITH_DATATYPE | ) | const |
Output method.
Definition at line 95 of file Conditions.cpp.
bool Condition::testFlag | ( | mask_type | option | ) | const |
Flag operations: Test for a given a conditons flag.
Definition at line 201 of file Conditions.cpp.
const std::string & Condition::type | ( | ) | const |
Access the type field of the condition.
Direct data items in string form
Definition at line 145 of file Conditions.cpp.
const std::type_info & Condition::typeInfo | ( | ) | const |
Access to the type information.
Definition at line 166 of file Conditions.cpp.
void Condition::unFlag | ( | mask_type | option | ) |
Flag operations: UN-Set a conditons flag.
Definition at line 196 of file Conditions.cpp.
const std::string & Condition::value | ( | ) | const |
Access the value field of the condition as a string.
Definition at line 150 of file Conditions.cpp.
|
staticconstexpr |
Flags to indicate global conditions ranges.
Definition at line 104 of file Conditions.h.
|
static |
Definition at line 104 of file Conditions.h.