A class that describes the interval of experiments/runs for which an object in the database is valid.
More...
#include <IntervalOfValidity.h>
|
int | checkLowerBound (int experiment, int run) const |
| Helper function to check whether a given experiment/run number is above or below the lower bound of the interval of validity. More...
|
|
int | checkUpperBound (int experiment, int run) const |
| Helper function to check whether a given experiment/run number is above or below the upper bound of the interval of validity. More...
|
|
void | makeValid () |
| Helper function to set the interval to empty if the upper bound is below the lower one.
|
|
| ClassDefNV (IntervalOfValidity, 2) |
| describes the interval of experiments/runs for which an object in the database is valid.
|
|
A class that describes the interval of experiments/runs for which an object in the database is valid.
Definition at line 25 of file IntervalOfValidity.h.
◆ IntervalOfValidity()
Construct a new iov.
- Parameters
-
experimentLow | lowest experiment number of the validity range, -1 means no bound |
runLow | lowest run number in the experiment with number experimentLow of the validity range, -1 means no bound |
experimentHigh | highest experiment number of the validity range, -1 means no bound |
runHigh | highest run number in the experiment with number experimentHigh of the validity range, -1 means no bound |
Definition at line 17 of file IntervalOfValidity.cc.
◆ always()
Function that returns an interval of validity that is always valid, c.f.
the default constructor which is never valid (a zero interval)
- Returns
- an interval of validity that is always valid
Definition at line 62 of file IntervalOfValidity.h.
IntervalOfValidity()
Default constructor which will create an empty iov.
◆ checkLowerBound()
int checkLowerBound |
( |
int |
experiment, |
|
|
int |
run |
|
) |
| const |
|
private |
Helper function to check whether a given experiment/run number is above or below the lower bound of the interval of validity.
- Parameters
-
experiment | the experiment number |
run | the run number |
- Returns
- 0 if the given experiment/run number is equal to the lower bound, -1 if it is below the lower bound, 1 if it is above the lower bound.
Definition at line 40 of file IntervalOfValidity.cc.
◆ checkUpperBound()
int checkUpperBound |
( |
int |
experiment, |
|
|
int |
run |
|
) |
| const |
|
private |
Helper function to check whether a given experiment/run number is above or below the upper bound of the interval of validity.
- Parameters
-
experiment | the experiment number |
run | the run number |
- Returns
- 0 if the given experiment/run number is equal to the upper bound, -1 if it is below the upper bound, 1 if it is above the upper bound.
Definition at line 54 of file IntervalOfValidity.cc.
◆ contains() [1/2]
Function that checks whether the event is inside the validity interval.
- Parameters
-
event | event meta data to be checked, if the run number 0 it's checked whether the whole experiment is inside the validity interval |
- Returns
- true if the given event is inside the validity interval.
Definition at line 80 of file IntervalOfValidity.cc.
◆ contains() [2/2]
Function that checks the validity interval contains another interval of validity.
- Parameters
-
iov | the other validity interval |
- Returns
- true if the given other interval of validity is inside the validity interval.
Definition at line 86 of file IntervalOfValidity.h.
◆ empty()
Function that checks whether the validity interval is empty.
- Returns
- true if the validity interval is empty.
Definition at line 55 of file IntervalOfValidity.h.
◆ getExperimentHigh()
int getExperimentHigh |
( |
| ) |
const |
|
inline |
Getter for highest experiment number.
-1 means no bound (unless it is a special case described below).
If both m_experimentHigh and m_experimentLow are equal to -1, interval is empty (doesn't match any experiments/runs).
Definition at line 137 of file IntervalOfValidity.h.
◆ getExperimentLow()
int getExperimentLow |
( |
| ) |
const |
|
inline |
Getter for lowest experiment number.
-1 means no bound (unless it is a special case described below).
If both m_experimentHigh and m_experimentLow are equal to -1, interval is empty (doesn't match any experiments/runs).
Definition at line 117 of file IntervalOfValidity.h.
◆ getRunHigh()
◆ getRunLow()
◆ overlap()
Function that determines the overlap of the validity interval with another interval of validity.
- Parameters
-
iov | the other validity interval |
- Returns
- the interval that is common to both intervals of validity.
Definition at line 94 of file IntervalOfValidity.cc.
◆ overlaps()
Function that checks the validity interval overlaps with another interval of validity.
- Parameters
-
iov | the other validity interval |
- Returns
- true if both intervals of validity have a common range.
Definition at line 93 of file IntervalOfValidity.h.
◆ trimOverlap()
Remove the overlap between two intervals of validity by shortening one of them.
This does not work if an interval would be cut into two.
- Parameters
-
iov | the other validity interval |
trimOlder | flag to determine which validity interval should be trimmed based on the comparison of the lower range bound |
- Returns
- true if the overlap could be removed.
Definition at line 112 of file IntervalOfValidity.cc.
◆ operator<<
Output stream operator for writing IoV data to a text file.
- Parameters
-
Definition at line 194 of file IntervalOfValidity.cc.
◆ operator>>
Input stream operator for reading IoV data from a text file.
- Parameters
-
input | The input stream. |
iov | The InervalOfValidity object. |
Definition at line 150 of file IntervalOfValidity.cc.
◆ m_experimentHigh
◆ m_experimentLow
◆ m_runHigh
◆ m_runLow
The documentation for this class was generated from the following files: