fire v0.19.0
Framework for sImulation and Reconstruction of Events
fire::ConditionsIntervalOfValidity Class Reference

Defines the run/event/type range for which a given condition is valid, including for all time. More...

#include <ConditionsIntervalOfValidity.h>

Public Member Functions

 ConditionsIntervalOfValidity () noexcept
 Null IOV.
 
 ConditionsIntervalOfValidity (bool validForData, bool validForMC) noexcept
 Unlimited IOV for data, MC, or both. More...
 
 ConditionsIntervalOfValidity (int firstRun, int lastRun, bool validForData=true, bool validForMC=true) noexcept
 Run-limited IOV. More...
 
bool validForEvent (const EventHeader &eh) const
 Checks to see if this condition is valid for the given event using information from the header. More...
 
bool overlaps (const ConditionsIntervalOfValidity &iov) const
 Checks to see if this IOV overlaps with the given IOV.
 

Private Attributes

int firstRun_
 First run for which this condition is valid.
 
int lastRun_
 Last run for which this condition is valid or -1 for infinite validity.
 
bool validForData_
 Is this Condition valid for real data?
 
bool validForMC_
 Is this Condition valid for simulation?
 

Friends

std::ostreamoperator<< (std::ostream &s, const ConditionsIntervalOfValidity &iov)
 Stream the IOV to an ostream in a pretty way. More...
 

Detailed Description

Defines the run/event/type range for which a given condition is valid, including for all time.

Constructor & Destructor Documentation

◆ ConditionsIntervalOfValidity() [1/2]

fire::ConditionsIntervalOfValidity::ConditionsIntervalOfValidity ( bool  validForData,
bool  validForMC 
)
noexcept

Unlimited IOV for data, MC, or both.

Parameters
[in]validForDatatrue if condition is valid for real data
[in]validForMCtrue if condition is valid for MC data

◆ ConditionsIntervalOfValidity() [2/2]

fire::ConditionsIntervalOfValidity::ConditionsIntervalOfValidity ( int  firstRun,
int  lastRun,
bool  validForData = true,
bool  validForMC = true 
)
noexcept

Run-limited IOV.

Parameters
[in]firstRunshould be -1 if valid from beginning of time
[in]lastRunshould be -1 if valid to end of time
[in]validForDatatrue if condition is valid for real data
[in]validForMCtrue if condition is valid for MC data

Member Function Documentation

◆ validForEvent()

bool fire::ConditionsIntervalOfValidity::validForEvent ( const EventHeader eh) const

Checks to see if this condition is valid for the given event using information from the header.

Parameters
[in]ehEventHeader to check
Returns
true if our IOV includes the event described by the input header

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream s,
const ConditionsIntervalOfValidity iov 
)
friend

Stream the IOV to an ostream in a pretty way.

The output looks like

"IOV(firstRun->lastRun, type)"

where lastRun is replaced by infty if it is negative and type is DATA or MC or both.

Parameters
[in]sostream to stream to
[in]iovIOV to stream out
Returns
modified ostream

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