LDMX Software
ConditionsIOV.h
Go to the documentation of this file.
1
7#ifndef FRAMEWORK_CONDITIONSIOV_H_
8#define FRAMEWORK_CONDITIONSIOV_H_
9
10/*~~~~~~~~~~~*/
11/* Event */
12/*~~~~~~~~~~~*/
13#include <iostream>
14
15#include "Framework/Exception/Exception.h"
16
17namespace framework {
18class ConditionsIOV;
19}
20
21std::ostream& operator<<(std::ostream&, const framework::ConditionsIOV& iov);
22
23namespace ldmx {
24class EventHeader;
25}
26namespace framework {
27
35 public:
40 : firstRun_{0}, lastRun_{0}, validForData_{false}, validForMC_{false} {}
41
45 ConditionsIOV(bool validForData, bool validForMC)
46 : firstRun_(-1),
47 lastRun_(-1),
48 validForData_{validForData},
49 validForMC_{validForMC} {}
50
56 ConditionsIOV(int firstRun, int lastRun, bool validForData = true,
57 bool validForMC = true)
58 : firstRun_(firstRun),
59 lastRun_(lastRun),
60 validForData_{validForData},
61 validForMC_{validForMC} {}
62
65 bool validForEvent(const ldmx::EventHeader& eh) const;
66
68 bool overlaps(const ConditionsIOV& iov) const;
69
73 void Print() const;
74
78 std::string ToString() const;
79
83 void stream(std::ostream&) const;
84
85 private:
88
91
94
97};
98} // namespace framework
99
100#endif // FRAMEWORK_CONDITIONSIOV_H_
Class which defines the run/event/type range for which a given condition is valid,...
int lastRun_
Last run for which this condition is valid or -1 for infinite validity.
ConditionsIOV()
Constructor for null validity.
bool validForMC_
Is this Condition valid for simulation?
void stream(std::ostream &) const
Stream the object contents to an output stream.
std::string ToString() const
Print the object to a string.
ConditionsIOV(bool validForData, bool validForMC)
Constructor for a unlimited validity.
ConditionsIOV(int firstRun, int lastRun, bool validForData=true, bool validForMC=true)
Constructor for a run-limited validity.
bool overlaps(const ConditionsIOV &iov) const
Checks to see if this IOV overlaps with the given IOV.
bool validForData_
Is this Condition valid for real data?
int firstRun_
First run for which this condition is valid.
bool validForEvent(const ldmx::EventHeader &eh) const
Checks to see if this condition is valid for the given event using information from the header.
void Print() const
Print the object to std::cout.
Provides header information an event such as event number and timestamp.
Definition EventHeader.h:44
All classes in the ldmx-sw project use this namespace.
Definition PerfDict.cxx:45