CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
edm::eventsetup::IntersectingIOVRecordIntervalFinder Class Reference

#include <IntersectingIOVRecordIntervalFinder.h>

Inheritance diagram for edm::eventsetup::IntersectingIOVRecordIntervalFinder:
edm::EventSetupRecordIntervalFinder

Public Member Functions

 IntersectingIOVRecordIntervalFinder (const EventSetupRecordKey &)
 
void swapFinders (std::vector< edm::propagate_const< std::shared_ptr< EventSetupRecordIntervalFinder >>> &)
 
 ~IntersectingIOVRecordIntervalFinder () override
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const eventsetup::ComponentDescriptiondescriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set< eventsetup::EventSetupRecordKeyfindingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder () noexcept(false)
 

Protected Member Functions

void setIntervalFor (const EventSetupRecordKey &, const IOVSyncValue &, ValidityInterval &) override
 
- Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder
template<class T >
void findingRecord ()
 
void findingRecordWithKey (const eventsetup::EventSetupRecordKey &)
 

Private Member Functions

 IntersectingIOVRecordIntervalFinder (const IntersectingIOVRecordIntervalFinder &)=delete
 
const IntersectingIOVRecordIntervalFinderoperator= (const IntersectingIOVRecordIntervalFinder &)=delete
 

Private Attributes

std::vector< edm::propagate_const< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_
 

Detailed Description

Definition at line 33 of file IntersectingIOVRecordIntervalFinder.h.

Constructor & Destructor Documentation

IntersectingIOVRecordIntervalFinder::IntersectingIOVRecordIntervalFinder ( const EventSetupRecordKey iKey)
explicit

Definition at line 31 of file IntersectingIOVRecordIntervalFinder.cc.

References edm::EventSetupRecordIntervalFinder::findingRecordWithKey().

31  {
33  }
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
IntersectingIOVRecordIntervalFinder::~IntersectingIOVRecordIntervalFinder ( )
override

Definition at line 40 of file IntersectingIOVRecordIntervalFinder.cc.

40 {}
edm::eventsetup::IntersectingIOVRecordIntervalFinder::IntersectingIOVRecordIntervalFinder ( const IntersectingIOVRecordIntervalFinder )
privatedelete

Member Function Documentation

const IntersectingIOVRecordIntervalFinder& edm::eventsetup::IntersectingIOVRecordIntervalFinder::operator= ( const IntersectingIOVRecordIntervalFinder )
privatedelete
void IntersectingIOVRecordIntervalFinder::setIntervalFor ( const EventSetupRecordKey iKey,
const IOVSyncValue iTime,
ValidityInterval oInterval 
)
overrideprotectedvirtual

Implements edm::EventSetupRecordIntervalFinder.

Definition at line 62 of file IntersectingIOVRecordIntervalFinder.cc.

References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), ghostTrackVertexReco_cff::finder, finders_, edm::ValidityInterval::first(), edm::ValidityInterval::invalidInterval(), edm::IOVSyncValue::invalidIOVSyncValue(), edm::ValidityInterval::last(), edm::ValidityInterval::setFirst(), and edm::ValidityInterval::setLast().

64  {
65  if (finders_.empty()) {
67  return;
68  }
69 
70  bool haveAValidRecord = false;
71  bool haveUnknownEnding = false;
73 
74  for (auto& finder : finders_) {
75  ValidityInterval test = finder->findIntervalFor(iKey, iTime);
76  if (test != ValidityInterval::invalidInterval()) {
77  haveAValidRecord = true;
78  if (newInterval.first() < test.first()) {
79  newInterval.setFirst(test.first());
80  }
81  if (newInterval.last() > test.last()) {
82  newInterval.setLast(test.last());
83  }
84  if (test.last() == IOVSyncValue::invalidIOVSyncValue()) {
85  haveUnknownEnding = true;
86  }
87  } else {
88  //if it is invalid then we must check on each new IOVSyncValue so that
89  // we can find the time when it is valid
90  haveUnknownEnding = true;
91  }
92  }
93 
94  if (!haveAValidRecord) {
95  //If no Finder has a valid time, then this record is also invalid for this time
96  newInterval = ValidityInterval::invalidInterval();
97  } else if (haveUnknownEnding) {
98  newInterval.setLast(IOVSyncValue::invalidIOVSyncValue());
99  }
100  oInterval = newInterval;
101  }
static const IOVSyncValue & endOfTime()
Definition: IOVSyncValue.cc:82
static const IOVSyncValue & beginOfTime()
Definition: IOVSyncValue.cc:88
std::vector< edm::propagate_const< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_
static const ValidityInterval & invalidInterval()
static const IOVSyncValue & invalidIOVSyncValue()
Definition: IOVSyncValue.cc:78
void IntersectingIOVRecordIntervalFinder::swapFinders ( std::vector< edm::propagate_const< std::shared_ptr< EventSetupRecordIntervalFinder >>> &  iFinders)

Definition at line 57 of file IntersectingIOVRecordIntervalFinder.cc.

References finders_.

58  {
59  finders_.swap(iFinders);
60  }
std::vector< edm::propagate_const< std::shared_ptr< EventSetupRecordIntervalFinder > > > finders_

Member Data Documentation

std::vector<edm::propagate_const<std::shared_ptr<EventSetupRecordIntervalFinder> > > edm::eventsetup::IntersectingIOVRecordIntervalFinder::finders_
private

Definition at line 55 of file IntersectingIOVRecordIntervalFinder.h.

Referenced by setIntervalFor(), and swapFinders().