24 using namespace DD4hep;
28 if ( © !=
this ) {
36 std::string IOVType::str()
const {
38 ::snprintf(text,
sizeof(text),
"%s(%d)",name.c_str(),int(type));
43 IOV::IOV(
const IOVType* t) : iovType(t), keyData(0,0), optData(0) {
49 : iovType(t), keyData(k), optData(0)
60 void IOV::set(Key::first_type value) {
65 void IOV::set(Key::first_type val_1, Key::second_type val_2) {
79 Key::first_type tmp =
keyData.first;
95 if ( validity.first >
keyData.first )
97 if ( validity.second <
keyData.second )
98 keyData.second = validity.second;
111 if ( validity.first <
keyData.first )
112 keyData.first = validity.first;
113 if ( validity.second >
keyData.second )
114 keyData.second = validity.second;
119 ::memcpy(
this,&from,
sizeof(
IOV));
130 ::snprintf(text,
sizeof(text),
"%s(%d):[%ld-%ld]",
136 char c_since[64], c_until[64];
138 ::strftime(c_since,
sizeof(c_since),
"%d-%m-%Y %H:%M:%S",::gmtime_r(&since,&time_buff));
139 ::strftime(c_until,
sizeof(c_until),
"%d-%m-%Y %H:%M:%S",::gmtime_r(&until,&time_buff));
140 ::snprintf(text,
sizeof(text),
"%s(%d):[%s - %s]",
145 ::snprintf(text,
sizeof(text),
"%s(%d):[%ld-%ld]",
void set(const Key &value)
Set discrete IOV value.
bool contains(const IOV &iov) const
Check for validity containment.
void iov_intersection(const IOV &comparator)
Set the intersection of this IOV with the argument IOV.
std::string name
String name.
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 & 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'.
unsigned int type
IOV buffer type: Must be a bitmap!
void move(IOV &from)
Move the data content: 'from' will be reset to NULL.
void iov_union(const IOV &comparator)
Set the union of this IOV with the argument IOV.
std::pair< Key_first_type, Key_second_type > Key
std::string str() const
Create string representation of the IOV.