![]() |
![]() |
#include <IntersectingIOVRecordIntervalFinder.h>
Public Member Functions | |
IntersectingIOVRecordIntervalFinder (const EventSetupRecordKey &) | |
void | swapFinders (std::vector< boost::shared_ptr< EventSetupRecordIntervalFinder > > &) |
virtual | ~IntersectingIOVRecordIntervalFinder () |
Protected Member Functions | |
virtual void | setIntervalFor (const EventSetupRecordKey &, const IOVSyncValue &, ValidityInterval &) |
Private Member Functions | |
IntersectingIOVRecordIntervalFinder (const IntersectingIOVRecordIntervalFinder &) | |
const IntersectingIOVRecordIntervalFinder & | operator= (const IntersectingIOVRecordIntervalFinder &) |
Private Attributes | |
std::vector< boost::shared_ptr < EventSetupRecordIntervalFinder > > | finders_ |
Definition at line 33 of file IntersectingIOVRecordIntervalFinder.h.
IntersectingIOVRecordIntervalFinder::IntersectingIOVRecordIntervalFinder | ( | const EventSetupRecordKey & | iKey | ) | [explicit] |
Definition at line 32 of file IntersectingIOVRecordIntervalFinder.cc.
References edm::EventSetupRecordIntervalFinder::findingRecordWithKey().
{ findingRecordWithKey(iKey); }
IntersectingIOVRecordIntervalFinder::~IntersectingIOVRecordIntervalFinder | ( | ) | [virtual] |
Definition at line 42 of file IntersectingIOVRecordIntervalFinder.cc.
{ }
edm::eventsetup::IntersectingIOVRecordIntervalFinder::IntersectingIOVRecordIntervalFinder | ( | const IntersectingIOVRecordIntervalFinder & | ) | [private] |
const IntersectingIOVRecordIntervalFinder& edm::eventsetup::IntersectingIOVRecordIntervalFinder::operator= | ( | const IntersectingIOVRecordIntervalFinder & | ) | [private] |
void IntersectingIOVRecordIntervalFinder::setIntervalFor | ( | const EventSetupRecordKey & | iKey, |
const IOVSyncValue & | iTime, | ||
ValidityInterval & | oInterval | ||
) | [protected, virtual] |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 68 of file IntersectingIOVRecordIntervalFinder.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), finders_, edm::ValidityInterval::first(), edm::ValidityInterval::invalidInterval(), edm::IOVSyncValue::invalidIOVSyncValue(), edm::ValidityInterval::last(), edm::ValidityInterval::setFirst(), and edm::ValidityInterval::setLast().
{ if(finders_.empty()) { oInterval = ValidityInterval::invalidInterval(); return; } bool haveAValidRecord = false; bool haveUnknownEnding = false; ValidityInterval newInterval(IOVSyncValue::beginOfTime(), IOVSyncValue::endOfTime()); for(std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> >::iterator it = finders_.begin(), itEnd = finders_.end(); it != itEnd; ++it) { ValidityInterval test = (*it)->findIntervalFor(iKey, iTime); if ( test != ValidityInterval::invalidInterval() ) { haveAValidRecord =true; if(newInterval.first() < test.first()) { newInterval.setFirst(test.first()); } if(newInterval.last() > test.last()) { newInterval.setLast(test.last()); } if(test.last() == IOVSyncValue::invalidIOVSyncValue()) { haveUnknownEnding=true; } } else { //if it is invalid then we must check on each new IOVSyncValue so that // we can find the time when it is valid haveUnknownEnding=true; } } if(!haveAValidRecord) { //If no Finder has a valid time, then this record is also invalid for this time newInterval = ValidityInterval::invalidInterval(); } else if(haveUnknownEnding) { newInterval.setLast(IOVSyncValue::invalidIOVSyncValue()); } oInterval = newInterval; }
void IntersectingIOVRecordIntervalFinder::swapFinders | ( | std::vector< boost::shared_ptr< EventSetupRecordIntervalFinder > > & | iFinders | ) |
Definition at line 62 of file IntersectingIOVRecordIntervalFinder.cc.
References finders_.
{ finders_.swap(iFinders); }
std::vector<boost::shared_ptr<EventSetupRecordIntervalFinder> > edm::eventsetup::IntersectingIOVRecordIntervalFinder::finders_ [private] |
Definition at line 56 of file IntersectingIOVRecordIntervalFinder.h.
Referenced by setIntervalFor(), and swapFinders().