13 #ifndef DD4HEP_CONDITIONS_CONDITIONS_H
14 #define DD4HEP_CONDITIONS_CONDITIONS_H
38 namespace Conditions {
45 class ConditionsManagerObject;
46 class ConditionsManager;
47 class ConditionsLoader;
52 class ConditionContainer;
53 class ConditionObject;
151 const std::string&
type()
const;
154 const std::string&
comment()
const;
156 const std::string&
value()
const;
158 const std::string&
address()
const;
161 const std::type_info&
typeInfo()
const;
177 template <
typename T>
T&
bind();
183 template <
typename T>
T&
bind(
const std::string& val);
185 template <
typename T>
T&
get();
187 template <
typename T>
const T&
get()
const;
234 typedef std::map<key_type, key_value>
Keys;
307 bool operator==(
const std::string& compare)
const;
314 bool operator<(
const std::string& compare)
const;
317 operator const std::string& ()
const {
return name; }
332 if (
this != &key ) {
345 {
return hash == compare; }
353 {
return hash < compare; }
ConditionKey & operator=(const std::string &value)
Assignment operator from the string representation.
std::pair< key_type, std::string > key_value
Forward definition of the mapping type.
Condition(const Handle< Q > &e)
Constructor to be used when reading the already parsed object.
bool operator<(const ConditionKey &compare) const
Operator less (for map insertions) using key object.
OpaqueData & data() const
Access the IOV block.
Condition & operator=(const Condition &c)=default
Assignment operator.
const char * name() const
Access the object name (or "" if not supported by the object)
Condition & rebind()
Re-evaluate the conditions data according to the previous bound type definition.
Interface for conditions pool optimized to host conditions updates.
Processor()
Default constructor.
T & bind()
Bind the data of the conditions object to a given format.
bool isValid() const
Check the validity of the object held by the handle.
bool operator==(const ConditionKey &compare) const
Equality operator using key object.
ConditionKey(const ConditionKey &c)
Copy constructor.
Processor()
Default constructor.
Condition::iov_type iov_type
Forward definition of the iov type.
The data class behind a conditions container handle.
unsigned int mask_type
Forward definition of the object properties.
const std::string & value() const
Access the value field of the condition as a string.
The data class behind a conditions handle.
bool is_bound() const
Check if object is already bound....
Base class describing string evaluation to C++ objects using boost::spirit.
Class describing an opaque data block.
Interna::ConditionContainer Object
Standard object type.
const std::string & address() const
Access the address string [e.g. database identifier].
std::map< key_type, key_value > Keys
Definition of the keys.
Main condition object handle.
Container class for condition handles aggregated by a detector element.
Condition::key_type key_type
Forward definition of the key type.
virtual int operator()(Container container)=0
Container callback for object processing.
Abstract base for processing callbacks to container objects.
unsigned int key_type
Forward definition of the key type.
DD4hep::Geometry::DetElement DetElement
std::string str(int with_data=WITH_IOV|WITH_ADDRESS|WITH_DATATYPE) const
Output method.
ConditionKey()
Default constructor.
int dataType() const
Access the data type.
ConditionKey(const std::string &s, key_type h)
Constructor from string.
Key definition to optimize ans simplyfy the access to conditions entities.
const Keys & keys() const
Known keys of conditions in this container.
Class describing the interval of validty.
Container()=default
Default constructor.
virtual int operator()(Condition c)=0
Conditions callback for object processing.
const std::type_info & typeInfo() const
Access to the type information.
Class describing the interval of validty type.
Condition()=default
Default constructor.
const IOVType & iovType() const
Access the IOV type.
Interna::ConditionObject Object
Standard object type.
std::pair< RangeConditions, bool > RangeStatus
bool is_bound() const
Check if object is already bound....
key_type key() const
Hash identifier.
const iov_type & iov() const
Access the IOV block.
const std::string & comment() const
Access the comment field of the condition.
std::string name
String representation of the key object.
unsigned int hash32(const char *key)
We need it so often: one-at-time 32 bit hash function.
virtual ~Processor()=default
Default destructor.
Container & operator=(const Container &c)=default
Assignment operator.
const std::string & type() const
Access the type field of the condition.
static key_type hashCode(const char *value)
Hash code generation from input string.
const BasicGrammar & descriptor() const
Access to the grammar type.
Handle: a templated class like a shared pointer, which allows specialized access to tgeometry objects...
key_type hash
Hashed key representation.
ConditionKey make_key(Condition c)
Access the key of the condition.
IOV iov_type
Forward definition of the iov type.
std::vector< Condition > RangeConditions
Abstract base for processing callbacks to conditions objects.
Container(const Handle< Q > &e)
Constructor to be used when reading the already parsed object.
Condition::key_type key_type
Forward definition of the key type.
size_t numKeys() const
Access the number of conditons keys available for this detector element.
virtual ~Processor()=default
Default destructor.