fire v0.19.0
Framework for sImulation and Reconstruction of Events
ConditionsIntervalOfValidity.h
1#ifndef FIRE_CONDITIONSINTERVALOFVALIDITY_H
2#define FIRE_CONDITIONSINTERVALOFVALIDITY_H
3
4#include <iostream>
5#include "fire/EventHeader.h"
6
7namespace fire {
8
14 public:
19
25 ConditionsIntervalOfValidity(bool validForData, bool validForMC) noexcept;
26
34 ConditionsIntervalOfValidity(int firstRun, int lastRun, bool validForData = true,
35 bool validForMC = true) noexcept;
36
44 bool validForEvent(const EventHeader& eh) const;
45
47 bool overlaps(const ConditionsIntervalOfValidity& iov) const;
48
64 s << "IOV(" << iov.firstRun_ << "->";
65 if (iov.lastRun_ < 0)
66 s << "infty";
67 else
68 s << iov.lastRun_;
69 if (iov.validForData_) s << ", DATA";
70 if (iov.validForMC_) s << ", MC";
71 s << ")";
72 return s;
73 }
74
75 private:
78
81
84
87};
88} // namespace fire
89
90#endif
Defines the run/event/type range for which a given condition is valid, including for all time.
Definition: ConditionsIntervalOfValidity.h:13
int firstRun_
First run for which this condition is valid.
Definition: ConditionsIntervalOfValidity.h:77
bool overlaps(const ConditionsIntervalOfValidity &iov) const
Checks to see if this IOV overlaps with the given IOV.
Definition: ConditionsIntervalOfValidity.cxx:29
bool validForData_
Is this Condition valid for real data?
Definition: ConditionsIntervalOfValidity.h:83
bool validForEvent(const EventHeader &eh) const
Checks to see if this condition is valid for the given event using information from the header.
Definition: ConditionsIntervalOfValidity.cxx:23
bool validForMC_
Is this Condition valid for simulation?
Definition: ConditionsIntervalOfValidity.h:86
ConditionsIntervalOfValidity() noexcept
Null IOV.
Definition: ConditionsIntervalOfValidity.cxx:5
friend std::ostream & operator<<(std::ostream &s, const ConditionsIntervalOfValidity &iov)
Stream the IOV to an ostream in a pretty way.
Definition: ConditionsIntervalOfValidity.h:63
int lastRun_
Last run for which this condition is valid or -1 for infinite validity.
Definition: ConditionsIntervalOfValidity.h:80
Header information of an event such as event number and timestamp.
Definition: EventHeader.h:27