24 using namespace DD4hep::Conditions;
27 Condition::Processor::Processor() {
34 invalidHandleError<Condition>();
39 ConditionKey::ConditionKey(
const string& value)
40 : name(value),
hash(hashCode(value))
70 output << setw(16) << left << o->
name;
72 output <<
" " << (ptr_iov ? ptr_iov->
str().c_str() :
"IOV:[UNKNOWN]");
74 output <<
" (" << o->
type <<
")";
80 output <<
" Data:" << o->
data.
str();
82 output <<
" \"" << o->
comment <<
"\"";
140 invalidHandleError<Condition>();
143 throw runtime_error(
"Null pointer in Grammar object");
156 except(
"Condition",
"Rebinding condition with different IOV types [%d <> %d] is not allowed!",
161 printout(
INFO,
"Condition",
"+++ condition:%s rebinding value:%s",
174 invalidHandleError<Container>();
176 return o->
keys.size();
183 invalidHandleError<Container>();
196 invalidHandleError<Condition>();
198 invalidHandleError<Container>();
210 invalidHandleError<Condition>();
212 invalidHandleError<Container>();
224 invalidHandleError<Condition>();
226 invalidHandleError<Container>();
238 invalidHandleError<Condition>();
240 invalidHandleError<Container>();
std::string validity
Condition validity (in string form)
ConditionKey & operator=(const std::string &value)
Assignment operator from the string representation.
bool operator<(const ConditionKey &compare) const
Operator less (for map insertions) using key object.
OpaqueData & data() const
Access the IOV block.
virtual const std::type_info & type() const =0
Access to the type information.
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.
bool isValid() const
Check the validity of the object held by the handle.
Processor()
Default constructor.
The data class behind a conditions container handle.
std::string address
Condition address.
const IOVType * iovType() const
Access safely the IOV-type.
const std::string & value() const
Access the value field of the condition as a string.
The data class behind a conditions handle.
Base class describing string evaluation to C++ objects using boost::spirit.
Class describing an opaque data block.
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.
Condition::key_type key_type
Forward definition of the key type.
unsigned int key_type
Forward definition of the key type.
Condition get(const std::string &condition_key, const iov_type &iov)
Access to condition objects by key and IOV.
int except(const std::string &src, const std::string &fmt,...)
Calls the display action with ERROR and throws an std::runtime_error exception.
Condition get(const std::string &condition_key, const iov_type &iov)
Access to condition objects by key and IOV.
T * ptr() const
Access to the held object.
std::string str(int with_data=WITH_IOV|WITH_ADDRESS|WITH_DATATYPE) const
Output method.
int dataType() const
Access the data type.
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.
std::string str() const
Create string representation of the data block.
std::string name
The object name.
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.
unsigned int type
integer identifier ised internally
void assign(Implementation *n, const std::string &nam, const std::string &title)
Assign a new named object. Note: object references must be managed by the user.
Interna::ConditionObject * access() const
Checked object access. Throws invalid handle runtime exception.
unsigned int hash(unsigned int initialSeed, unsigned int eventNumber, unsigned int runNumber)
calculate hash from initialSeed, eventID and runID
const iov_type * iovData() const
Access safely the IOV.
key_type key() const
Hash identifier.
const iov_type & iov() const
Access the IOV block.
bool fromString(const std::string &rep)
Create data block from string representation.
const std::string & comment() const
Access the comment field of the condition.
std::string name
String representation of the key object.
const std::string & dataType() const
Access type name of the condition data block.
Keys keys
Known keys of conditions in this container.
std::string type
The object type.
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 iov_type * iov
Interval of validity.
std::string value
Condition value (in string form)
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.
const BasicGrammar * grammar
Data type.
int printout(PrintLevel severity, const char *src, const char *fmt,...)
Calls the display action with a given severity level.
std::string comment
Comment string.
size_t numKeys() const
Access the number of conditons keys available for this detector element.
key_type hash
Hash value of the name.
OpaqueDataBlock data
Data block.
unsigned int type
Data buffer type: Must be a bitmap!
std::string str() const
Create string representation of the IOV.