78 bool haveAValidDependentRecord =
false;
79 bool allRecordsValid =
true;
85 haveAValidDependentRecord =
true;
89 bool intervalsWereComparible =
true;
91 itProvider != itProviderEnd;
93 if ((*itProvider)->setValidityIntervalFor(iTime)) {
94 haveAValidDependentRecord =
true;
96 if ((!newInterval.first().comparable(providerInterval.first())) ||
97 (!newInterval.last().comparable(providerInterval.last()))) {
98 intervalsWereComparible =
false;
101 if (newInterval.first() < providerInterval.first()) {
102 newInterval.setFirst(providerInterval.first());
104 if (newInterval.last() > providerInterval.last()) {
105 newInterval.setLast(providerInterval.last());
108 allRecordsValid =
false;
111 if (intervalsWereComparible) {
112 if (!haveAValidDependentRecord) {
116 if (!allRecordsValid) {
122 oInterval = newInterval;
140 bool hadChangedIOV =
false;
144 std::vector<ValidityInterval>::iterator itIOVs =
previousIOVs_.begin();
146 itProvider != itProviderEnd;
147 ++itProvider, ++itIOVs) {
148 if ((*itProvider)->setValidityIntervalFor(iTime)) {
150 if (*itIOVs != providerInterval) {
151 hadChangedIOV =
true;
152 if (providerInterval.first().time().value() == 0) {
154 if (closestID < providerInterval.first().eventID()) {
155 closestID = providerInterval.first().eventID();
158 if (closestTimeStamp < providerInterval.first().time()) {
159 closestTimeStamp = providerInterval.first().time();
162 *itIOVs = providerInterval;
167 if (closestID.run() != 0) {
168 if (closestTimeStamp.value() == 0) {
172 if (closestID.run() == iTime.eventID().run()) {
174 const unsigned long long kLumiTimeLength = 23;
176 if ((iTime.eventID().luminosityBlock() - closestID.luminosityBlock()) * kLumiTimeLength <
177 iTime.time().unixTime() - closestTimeStamp.unixTime()) {
std::vector< ValidityInterval > previousIOVs_
static const IOVSyncValue & endOfTime()
edm::propagate_const< std::shared_ptr< EventSetupRecordIntervalFinder > > alternate_
std::pair< Time_t, Time_t > ValidityInterval
static const IOVSyncValue & beginOfTime()
std::vector< std::vector< double > > tmp
static const ValidityInterval & invalidInterval()
static const IOVSyncValue & invalidIOVSyncValue()