13 #ifndef DD4HEP_CONDITIONS_IOV_H
14 #define DD4HEP_CONDITIONS_IOV_H
49 std::string
str()
const;
62 explicit IOV() =
delete;
67 typedef std::pair<Key_first_type,Key_second_type>
Key;
88 std::string
str()
const;
97 void set(
const Key& value);
128 {
return key.first >= test.first && key.second <= test.second; }
131 {
return key.first <= test.first && key.second >= test.second; }
134 {
return key.first <= test.second && key.first >= test.first; }
137 {
return key.second >= test.first && key.second <= test.second; }
142 (test.first <= key.first && key.second >= test.second) ||
143 (test.first <= key.first && key.first <= test.second) ||
144 (test.first <= key.second && key.second <= test.second);
std::string str() const
Conversion to string.
static bool full_match(const IOV &iov, const IOV &test)
Check if IOV 'test' is of same type and is fully contained in iov.
IOVType()=default
Standard Constructor.
void set(const Key &value)
Set discrete IOV value.
bool has_range() const
Check if the IOV corresponds to a range.
bool contains(const IOV &iov) const
Check for validity containment.
IOVType(const IOVType ©)
Copy constructor.
Key key() const
Get the local key of the IOV.
void iov_intersection(const IOV &comparator)
Set the intersection of this IOV with the argument IOV.
std::string name
String name.
static bool key_partially_contained(const Key &key, const Key &test)
Check if IOV 'test' has an overlap on the upper interval edge with IOV 'key'.
Class describing the interval of validty.
IOV & invert()
Invert the key values (first=second and second=first)
Class describing the interval of validty type.
IOV & operator=(const IOV &c)=default
Assignment operator.
static bool key_contains_range(const Key &key, const Key &test)
Same as above, but reverse logic. Gives sometimes more understandable logic.
IOV & reset()
Set keys to unphysical values (LONG_MAX, LONG_MIN)
unsigned int type
integer identifier ised internally
IOV()=delete
Initializing constructor: Does not set reference to IOVType !
static bool key_is_contained(const Key &key, const Key &test)
Check if IOV 'test' is fully contained in IOV 'key'.
~IOVType()=default
Standard Destructor.
IOVType & operator=(const IOVType ©)
Assignment operator.
unsigned int type
IOV buffer type: Must be a bitmap!
static bool key_overlaps_lower_end(const Key &key, const Key &test)
Check if IOV 'test' has an overlap on the lower interval edge with IOV 'key'.
static bool same_type(const IOV &iov, const IOV &test)
Check if 2 IOV objects are of the same type.
void move(IOV &from)
Move the data content: 'from' will be reset to NULL.
long Key_first_type
Key definition.
static bool key_overlaps_higher_end(const Key &key, const Key &test)
Check if IOV 'test' has an overlap on the upper interval edge with IOV 'key'.
~IOV()=default
Standard Destructor.
enum DD4hep::IOVType::@3 _IOVTypes
void iov_union(const IOV &comparator)
Set the union of this IOV with the argument IOV.
bool is_discrete() const
Check if the IOV corresponds to a range.
std::pair< Key_first_type, Key_second_type > Key
std::string str() const
Create string representation of the IOV.
static bool partial_match(const IOV &iov, const IOV &test)
Check if IOV 'test' is of same type and is at least partially contained in iov.