CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::eventsetup::EventSetupsController Class Reference

#include <EventSetupsController.h>

Public Member Functions

void clearComponents ()
 
void eventSetupForInstance (IOVSyncValue const &syncValue) const
 
 EventSetupsController ()
 
void forceCacheClear () const
 
boost::shared_ptr
< EventSetupRecordIntervalFinder >
const * 
getAlreadyMadeESSource (ParameterSet const &pset) const
 
boost::shared_ptr
< EventSetupProvider
makeProvider (ParameterSet &)
 
void putESSource (ParameterSet const &pset, boost::shared_ptr< EventSetupRecordIntervalFinder > const &component)
 

Private Member Functions

 EventSetupsController (EventSetupsController const &)
 
EventSetupsController const & operator= (EventSetupsController const &)
 

Private Attributes

std::multimap< ParameterSetID,
std::pair< ParameterSet const
*, boost::shared_ptr
< EventSetupRecordIntervalFinder > > > 
essources_
 
std::vector< boost::shared_ptr
< EventSetupProvider > > 
providers_
 

Detailed Description

Definition at line 39 of file EventSetupsController.h.

Constructor & Destructor Documentation

EventSetupsController::EventSetupsController ( )

Definition at line 38 of file EventSetupsController.cc.

39 {
40 }
edm::eventsetup::EventSetupsController::EventSetupsController ( EventSetupsController const &  )
private

Member Function Documentation

void EventSetupsController::clearComponents ( )

Definition at line 110 of file EventSetupsController.cc.

References essources_.

110  {
111  essources_.clear();
112 }
std::multimap< ParameterSetID, std::pair< ParameterSet const *, boost::shared_ptr< EventSetupRecordIntervalFinder > > > essources_
void EventSetupsController::eventSetupForInstance ( IOVSyncValue const &  syncValue) const

Definition at line 79 of file EventSetupsController.cc.

References evf::utils::esp, and providers_.

79  {
80  std::for_each(providers_.begin(), providers_.end(), [&syncValue](boost::shared_ptr<EventSetupProvider> const& esp) {
81  esp->eventSetupForInstance(syncValue);
82  });
83 }
std::vector< boost::shared_ptr< EventSetupProvider > > providers_
void EventSetupsController::forceCacheClear ( ) const

Definition at line 86 of file EventSetupsController.cc.

References evf::utils::esp, and providers_.

86  {
87  std::for_each(providers_.begin(), providers_.end(), [](boost::shared_ptr<EventSetupProvider> const& esp) {
88  esp->forceCacheClear();
89  });
90 }
std::vector< boost::shared_ptr< EventSetupProvider > > providers_
boost::shared_ptr< EventSetupRecordIntervalFinder > const * EventSetupsController::getAlreadyMadeESSource ( ParameterSet const &  pset) const

Definition at line 93 of file EventSetupsController.cc.

References asciidump::elements, essources_, edm::ParameterSet::id(), and edm::isTransientEqual().

Referenced by edm::eventsetup::SourceMakerTraits::getAlreadyMadeComponent().

93  {
94  auto elements = essources_.equal_range(pset.id());
95  for (auto it = elements.first; it != elements.second; ++it) {
96  if (isTransientEqual(pset, *it->second.first)) {
97  return &it->second.second;
98  }
99  }
100  return 0;
101 }
list elements
Definition: asciidump.py:414
bool isTransientEqual(ParameterSet const &a, ParameterSet const &b)
std::multimap< ParameterSetID, std::pair< ParameterSet const *, boost::shared_ptr< EventSetupRecordIntervalFinder > > > essources_
boost::shared_ptr< EventSetupProvider > EventSetupsController::makeProvider ( ParameterSet iPSet)

Definition at line 67 of file EventSetupsController.cc.

References edm::eventsetup::fillEventSetupProvider(), edm::eventsetup::makeEventSetupProvider(), and providers_.

Referenced by edm::SubProcess::SubProcess().

68 {
69  boost::shared_ptr<EventSetupProvider> returnValue(makeEventSetupProvider(iPSet) );
70 
71  fillEventSetupProvider(*this, *returnValue, iPSet);
72 
73  providers_.push_back(returnValue);
74 
75  return returnValue;
76 }
void fillEventSetupProvider(EventSetupsController &esController, EventSetupProvider &cp, ParameterSet &params)
std::vector< boost::shared_ptr< EventSetupProvider > > providers_
std::auto_ptr< EventSetupProvider > makeEventSetupProvider(ParameterSet const &params)
EventSetupsController const& edm::eventsetup::EventSetupsController::operator= ( EventSetupsController const &  )
private
void EventSetupsController::putESSource ( ParameterSet const &  pset,
boost::shared_ptr< EventSetupRecordIntervalFinder > const &  component 
)

Definition at line 104 of file EventSetupsController.cc.

References essources_, and edm::ParameterSet::id().

Referenced by edm::eventsetup::SourceMakerTraits::putComponent().

104  {
105  essources_.insert(std::pair<ParameterSetID, std::pair<ParameterSet const*, boost::shared_ptr<EventSetupRecordIntervalFinder> > >(pset.id(),
106  std::pair<ParameterSet const*, boost::shared_ptr<EventSetupRecordIntervalFinder> >(&pset, component)));
107 }
Hash< ParameterSetType > ParameterSetID
std::multimap< ParameterSetID, std::pair< ParameterSet const *, boost::shared_ptr< EventSetupRecordIntervalFinder > > > essources_

Member Data Documentation

std::multimap<ParameterSetID, std::pair<ParameterSet const*, boost::shared_ptr<EventSetupRecordIntervalFinder> > > edm::eventsetup::EventSetupsController::essources_
private

Definition at line 68 of file EventSetupsController.h.

Referenced by clearComponents(), getAlreadyMadeESSource(), and putESSource().

std::vector<boost::shared_ptr<EventSetupProvider> > edm::eventsetup::EventSetupsController::providers_
private

Definition at line 66 of file EventSetupsController.h.

Referenced by eventSetupForInstance(), forceCacheClear(), and makeProvider().