test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Static Public Member Functions
edm::eventsetup::SourceMakerTraits Struct Reference

#include <SourceFactory.h>

Public Types

typedef
EventSetupRecordIntervalFinder 
base_type
 

Static Public Member Functions

template<class T >
static void addTo (EventSetupProvider &iProvider, std::shared_ptr< T > iComponent, ParameterSet const &iConfiguration, bool matchesPreceding)
 
static std::shared_ptr< base_typegetComponentAndRegisterProcess (EventSetupsController &esController, ParameterSet const &iConfiguration)
 
static void logInfoWhenSharing (ParameterSet const &iConfiguration)
 
static std::string name ()
 
static void putComponent (EventSetupsController &esController, ParameterSet const &iConfiguration, std::shared_ptr< base_type > const &component)
 
static void replaceExisting (EventSetupProvider &iProvider, std::shared_ptr< EventSetupRecordIntervalFinder > iComponent)
 

Detailed Description

Definition at line 55 of file SourceFactory.h.

Member Typedef Documentation

Definition at line 56 of file SourceFactory.h.

Member Function Documentation

template<class T >
static void edm::eventsetup::SourceMakerTraits::addTo ( EventSetupProvider iProvider,
std::shared_ptr< T iComponent,
ParameterSet const &  iConfiguration,
bool  matchesPreceding 
)
inlinestatic

Definition at line 59 of file SourceFactory.h.

References edm::eventsetup::EventSetupProvider::add(), edm::eventsetup::addProviderTo(), and logInfoWhenSharing().

63  {
64  if (matchesPreceding) {
65  logInfoWhenSharing(iConfiguration);
66  }
67  //a source does not always have to be a provider
68  addProviderTo(iProvider, iComponent, static_cast<const T*>(nullptr));
69  std::shared_ptr<EventSetupRecordIntervalFinder> pFinder(iComponent);
70  iProvider.add(pFinder);
71  }
static void logInfoWhenSharing(ParameterSet const &iConfiguration)
void addProviderTo(EventSetupProvider &iProvider, std::shared_ptr< T > iComponent, const DataProxyProvider *)
Definition: SourceFactory.h:41
std::shared_ptr< SourceMakerTraits::base_type > edm::eventsetup::SourceMakerTraits::getComponentAndRegisterProcess ( EventSetupsController esController,
ParameterSet const &  iConfiguration 
)
static

Definition at line 39 of file SourceFactory.cc.

References edm::eventsetup::EventSetupsController::getESSourceAndRegisterProcess(), and edm::eventsetup::EventSetupsController::indexOfNextProcess().

40  {
41  return esController.getESSourceAndRegisterProcess(iConfiguration, esController.indexOfNextProcess());
42  }
void edm::eventsetup::SourceMakerTraits::logInfoWhenSharing ( ParameterSet const &  iConfiguration)
static

Definition at line 50 of file SourceFactory.cc.

References edm::ParameterSet::getParameter(), diffTwoXMLs::label, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by addTo().

50  {
51 
52  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
53  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
54  std::string label = iConfiguration.getParameter<std::string>("@module_label");
55  edm::LogVerbatim("EventSetupSharing") << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
56  }
std::string edm::eventsetup::SourceMakerTraits::name ( void  )
static
void edm::eventsetup::SourceMakerTraits::putComponent ( EventSetupsController esController,
ParameterSet const &  iConfiguration,
std::shared_ptr< base_type > const &  component 
)
static

Definition at line 44 of file SourceFactory.cc.

References edm::eventsetup::EventSetupsController::indexOfNextProcess(), and edm::eventsetup::EventSetupsController::putESSource().

46  {
47  esController.putESSource(iConfiguration, component, esController.indexOfNextProcess());
48  }
void edm::eventsetup::SourceMakerTraits::replaceExisting ( EventSetupProvider iProvider,
std::shared_ptr< EventSetupRecordIntervalFinder iComponent 
)
static

Definition at line 31 of file SourceFactory.cc.

References Exception, and edm::errors::LogicError.

31  {
33  << "SourceMakerTraits::replaceExisting\n"
34  << "This function is not implemented and should never be called.\n"
35  << "Please report this to a Framework Developer\n";
36  }