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
15namespace framework {
16class ConditionsIOV;
17}
18
19std::ostream& operator<<(std::ostream&, const framework::ConditionsIOV& iov);
20
21namespace ldmx {
22class EventHeader;
23}
24namespace framework {
25
33 public:
38 : first_run_{0},
39 last_run_{0},
40 valid_for_data_{false},
41 valid_for_mc_{false} {}
42
46 ConditionsIOV(bool validForData, bool validForMC)
47 : first_run_(-1),
48 last_run_(-1),
49 valid_for_data_{validForData},
50 valid_for_mc_{validForMC} {}
51
57 ConditionsIOV(int firstRun, int lastRun, bool validForData = true,
58 bool validForMC = true)
59 : first_run_(firstRun),
60 last_run_(lastRun),
61 valid_for_data_{validForData},
62 valid_for_mc_{validForMC} {}
63
66 bool validForEvent(const ldmx::EventHeader& eh) const;
67
69 bool overlaps(const ConditionsIOV& iov) const;
70
74 void print() const;
75
79 std::string toString() const;
80
84 void stream(std::ostream&) const;
85
86 private:
89
92
95
98};
99} // namespace framework
100
101#endif // FRAMEWORK_CONDITIONSIOV_H_
Class which defines the run/event/type range for which a given condition is valid,...
int last_run_
Last run for which this condition is valid or -1 for infinite validity.
std::string toString() const
Print the object to a string.
ConditionsIOV()
Constructor for null validity.
bool valid_for_data_
Is this Condition valid for real data?
int first_run_
First run for which this condition is valid.
void stream(std::ostream &) const
Stream the object contents to an output stream.
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 validForEvent(const ldmx::EventHeader &eh) const
Checks to see if this condition is valid for the given event using information from the header.
bool valid_for_mc_
Is this Condition valid for simulation?
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.