DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members

Class describing the interval of validty. More...

#include <IOV.h>

Public Types

using Key_value_type = std::int64_t
 Key definition. Use fixed width type, though not portable! More...
 
using Key = std::pair< Key_value_type, Key_value_type >
 

Public Member Functions

 IOV (const IOVType *typ)
 Initializing constructor. More...
 
 IOV (const IOVType *typ, const Key &key)
 Specialized copy constructor for range IOVs. More...
 
 IOV (const IOVType *typ, Key_value_type iov_value)
 Specialized copy constructor for discrete IOVs. More...
 
 IOV (const IOV &copy)=default
 Copy constructor. More...
 
 IOV (IOV &&copy)=default
 Move constructor. More...
 
 ~IOV ()=default
 Standard Destructor. More...
 
IOVoperator= (const IOV &c)=default
 Assignment operator. More...
 
IOVoperator= (IOV &&c)=default
 Move assignment operator. More...
 
bool operator< (const IOV &test) const
 Allow for IOV sorting in maps. More...
 
void move (IOV &from)
 Move the data content: 'from' will be reset to NULL. More...
 
std::string str () const
 Create string representation of the IOV. More...
 
bool has_range () const
 Check if the IOV corresponds to a range. More...
 
bool is_discrete () const
 Check if the IOV corresponds to a range. More...
 
Key key () const
 Get the local key of the IOV. More...
 
void set (const Key &value)
 Set discrete IOV value. More...
 
void set (Key_value_type value)
 Set discrete IOV value. More...
 
void set (Key_value_type val_1, Key_value_type val_2)
 Set range IOV value. More...
 
IOVreset ()
 Set keys to unphysical values (LONG_MAX, LONG_MIN) More...
 
IOVinvert ()
 Invert the key values (first=second and second=first) More...
 
void iov_intersection (const IOV &comparator)
 Set the intersection of this IOV with the argument IOV. More...
 
void iov_intersection (const IOV::Key &comparator)
 Set the intersection of this IOV with the argument IOV. More...
 
void iov_union (const IOV &comparator)
 Set the union of this IOV with the argument IOV. More...
 
void iov_union (const IOV::Key &comparator)
 Set the union of this IOV with the argument IOV. More...
 
bool contains (const IOV &iov) const
 Check for validity containment. More...
 

Static Public Member Functions

static IOV forever (const IOVType *typ)
 Conditions key representing eternity. More...
 
static Key key_forever ()
 Conditions key representing eternity. More...
 
static bool same_type (const IOV &iov, const IOV &test)
 Check if 2 IOV objects are of the same type. More...
 
static bool key_is_contained (const Key &key, const Key &test)
 Check if IOV 'test' is fully contained in IOV 'key'. More...
 
static bool key_contains_range (const Key &key, const Key &test)
 Same as above, but reverse logic. Gives sometimes more understandable logic. More...
 
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'. More...
 
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'. More...
 
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'. More...
 
static bool full_match (const IOV &iov, const IOV &test)
 Check if IOV 'test' is of same type and is fully contained in iov. More...
 
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. More...
 

Public Attributes

const IOVTypeiovType = 0
 Reference to IOV type. More...
 
Key keyData {MIN_KEY,MIN_KEY}
 IOV key (if second==first, discrete, otherwise range) More...
 
int optData = 0
 Optional user data. More...
 
unsigned int type = IOVType::UNKNOWN_IOV
 IOV buffer type: Must be a bitmap! More...
 

Static Public Attributes

static constexpr Key_value_type MIN_KEY = std::numeric_limits<Key_value_type>::min()
 
static constexpr Key_value_type MAX_KEY = std::numeric_limits<Key_value_type>::max()
 

Private Member Functions

 IOV ()=delete
 Initializing constructor: Does not set reference to IOVType ! More...
 

Detailed Description

Class describing the interval of validty.

Author
M.Frank
Version
1.0

Definition at line 67 of file IOV.h.

Member Typedef Documentation

◆ Key

Definition at line 74 of file IOV.h.

◆ Key_value_type

using dd4hep::IOV::Key_value_type = std::int64_t

Key definition. Use fixed width type, though not portable!

Definition at line 73 of file IOV.h.

Constructor & Destructor Documentation

◆ IOV() [1/6]

dd4hep::IOV::IOV ( )
explicitprivatedelete

Initializing constructor: Does not set reference to IOVType !

◆ IOV() [2/6]

IOV::IOV ( const IOVType typ)
explicit

Initializing constructor.

Definition at line 50 of file IOV.cpp.

◆ IOV() [3/6]

IOV::IOV ( const IOVType typ,
const Key key 
)
explicit

Specialized copy constructor for range IOVs.

Copy constructor.

Definition at line 62 of file IOV.cpp.

◆ IOV() [4/6]

IOV::IOV ( const IOVType typ,
Key_value_type  iov_value 
)
explicit

Specialized copy constructor for discrete IOVs.

Definition at line 55 of file IOV.cpp.

◆ IOV() [5/6]

dd4hep::IOV::IOV ( const IOV copy)
default

Copy constructor.

◆ IOV() [6/6]

dd4hep::IOV::IOV ( IOV &&  copy)
default

Move constructor.

◆ ~IOV()

dd4hep::IOV::~IOV ( )
default

Standard Destructor.

Member Function Documentation

◆ contains()

bool IOV::contains ( const IOV iov) const

Check for validity containment.

Check if the caller 'iov' is of the same type and the range is fully conained by the caller.

Definition at line 180 of file IOV.cpp.

◆ forever()

static IOV dd4hep::IOV::forever ( const IOVType typ)
inlinestatic

Conditions key representing eternity.

Definition at line 141 of file IOV.h.

◆ full_match()

static bool dd4hep::IOV::full_match ( const IOV iov,
const IOV test 
)
inlinestatic

Check if IOV 'test' is of same type and is fully contained in iov.

Definition at line 173 of file IOV.h.

◆ has_range()

bool dd4hep::IOV::has_range ( ) const
inline

Check if the IOV corresponds to a range.

Definition at line 111 of file IOV.h.

◆ invert()

IOV & IOV::invert ( )

Invert the key values (first=second and second=first)

Set keys to unphysical values (LONG_MAX, LONG_MIN)

Definition at line 92 of file IOV.cpp.

◆ iov_intersection() [1/2]

void IOV::iov_intersection ( const IOV comparator)

Set the intersection of this IOV with the argument IOV.

Definition at line 99 of file IOV.cpp.

◆ iov_intersection() [2/2]

void IOV::iov_intersection ( const IOV::Key comparator)

Set the intersection of this IOV with the argument IOV.

Definition at line 108 of file IOV.cpp.

◆ iov_union() [1/2]

void IOV::iov_union ( const IOV comparator)

Set the union of this IOV with the argument IOV.

Definition at line 115 of file IOV.cpp.

◆ iov_union() [2/2]

void IOV::iov_union ( const IOV::Key comparator)

Set the union of this IOV with the argument IOV.

Definition at line 124 of file IOV.cpp.

◆ is_discrete()

bool dd4hep::IOV::is_discrete ( ) const
inline

Check if the IOV corresponds to a range.

Definition at line 113 of file IOV.h.

◆ key()

Key dd4hep::IOV::key ( ) const
inline

Get the local key of the IOV.

Definition at line 115 of file IOV.h.

◆ key_contains_range()

static bool dd4hep::IOV::key_contains_range ( const Key key,
const Key test 
)
inlinestatic

Same as above, but reverse logic. Gives sometimes more understandable logic.

Definition at line 156 of file IOV.h.

◆ key_forever()

static Key dd4hep::IOV::key_forever ( )
inlinestatic

Conditions key representing eternity.

Definition at line 144 of file IOV.h.

◆ key_is_contained()

static bool dd4hep::IOV::key_is_contained ( const Key key,
const Key test 
)
inlinestatic

Check if IOV 'test' is fully contained in IOV 'key'.

Definition at line 153 of file IOV.h.

◆ key_overlaps_higher_end()

static bool dd4hep::IOV::key_overlaps_higher_end ( const Key key,
const Key test 
)
inlinestatic

Check if IOV 'test' has an overlap on the upper interval edge with IOV 'key'.

Definition at line 162 of file IOV.h.

◆ key_overlaps_lower_end()

static bool dd4hep::IOV::key_overlaps_lower_end ( const Key key,
const Key test 
)
inlinestatic

Check if IOV 'test' has an overlap on the lower interval edge with IOV 'key'.

Definition at line 159 of file IOV.h.

◆ key_partially_contained()

static bool dd4hep::IOV::key_partially_contained ( const Key key,
const Key test 
)
inlinestatic

Check if IOV 'test' has an overlap on the upper interval edge with IOV 'key'.

Definition at line 165 of file IOV.h.

◆ move()

void IOV::move ( IOV from)

Move the data content: 'from' will be reset to NULL.

Definition at line 132 of file IOV.cpp.

◆ operator<()

bool dd4hep::IOV::operator< ( const IOV test) const
inline

Allow for IOV sorting in maps.

Definition at line 181 of file IOV.h.

◆ operator=() [1/2]

IOV& dd4hep::IOV::operator= ( const IOV c)
default

Assignment operator.

◆ operator=() [2/2]

IOV& dd4hep::IOV::operator= ( IOV &&  c)
default

Move assignment operator.

◆ partial_match()

static bool dd4hep::IOV::partial_match ( const IOV iov,
const IOV test 
)
inlinestatic

Check if IOV 'test' is of same type and is at least partially contained in iov.

Definition at line 176 of file IOV.h.

◆ reset()

IOV & IOV::reset ( )

Set keys to unphysical values (LONG_MAX, LONG_MIN)

Definition at line 85 of file IOV.cpp.

◆ same_type()

static bool dd4hep::IOV::same_type ( const IOV iov,
const IOV test 
)
inlinestatic

Check if 2 IOV objects are of the same type.

Definition at line 147 of file IOV.h.

◆ set() [1/3]

void IOV::set ( const Key value)

Set discrete IOV value.

Definition at line 69 of file IOV.cpp.

◆ set() [2/3]

void dd4hep::IOV::set ( Key_value_type  val_1,
Key_value_type  val_2 
)

Set range IOV value.

◆ set() [3/3]

void dd4hep::IOV::set ( Key_value_type  value)

Set discrete IOV value.

◆ str()

std::string IOV::str ( ) const

Create string representation of the IOV.

Need the long(x) casts for compatibility with Apple MAC

Definition at line 141 of file IOV.cpp.

Member Data Documentation

◆ iovType

const IOVType* dd4hep::IOV::iovType = 0

Reference to IOV type.

Definition at line 80 of file IOV.h.

◆ keyData

Key dd4hep::IOV::keyData {MIN_KEY,MIN_KEY}

IOV key (if second==first, discrete, otherwise range)

Definition at line 82 of file IOV.h.

◆ MAX_KEY

constexpr Key_value_type dd4hep::IOV::MAX_KEY = std::numeric_limits<Key_value_type>::max()
staticconstexpr

Definition at line 77 of file IOV.h.

◆ MIN_KEY

constexpr Key_value_type dd4hep::IOV::MIN_KEY = std::numeric_limits<Key_value_type>::min()
staticconstexpr

Definition at line 76 of file IOV.h.

◆ optData

int dd4hep::IOV::optData = 0

Optional user data.

Definition at line 84 of file IOV.h.

◆ type

unsigned int dd4hep::IOV::type = IOVType::UNKNOWN_IOV

IOV buffer type: Must be a bitmap!

Definition at line 86 of file IOV.h.


The documentation for this class was generated from the following files: