CMS 3D CMS Logo

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 53 of file SourceFactory.h.

Member Typedef Documentation

◆ base_type

Definition at line 54 of file SourceFactory.h.

Member Function Documentation

◆ addTo()

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 57 of file SourceFactory.h.

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

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

◆ getComponentAndRegisterProcess()

std::shared_ptr< SourceMakerTraits::base_type > edm::eventsetup::SourceMakerTraits::getComponentAndRegisterProcess ( EventSetupsController esController,
ParameterSet const &  iConfiguration 
)
static

Definition at line 36 of file SourceFactory.cc.

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

37  {
38  return esController.getESSourceAndRegisterProcess(iConfiguration, esController.indexOfNextProcess());
39  }

◆ logInfoWhenSharing()

void edm::eventsetup::SourceMakerTraits::logInfoWhenSharing ( ParameterSet const &  iConfiguration)
static

Definition at line 47 of file SourceFactory.cc.

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

Referenced by addTo().

47  {
48  std::string edmtype = iConfiguration.getParameter<std::string>("@module_edm_type");
49  std::string modtype = iConfiguration.getParameter<std::string>("@module_type");
50  std::string label = iConfiguration.getParameter<std::string>("@module_label");
51  edm::LogVerbatim("EventSetupSharing")
52  << "Sharing " << edmtype << ": class=" << modtype << " label='" << label << "'";
53  }
Log< level::Info, true > LogVerbatim
char const * label

◆ name()

std::string edm::eventsetup::SourceMakerTraits::name ( void  )
static

Definition at line 28 of file SourceFactory.cc.

Referenced by config.CFG::__str__(), validation.Sample::digest(), and VIDSelectorBase.VIDSelectorBase::initialize().

28 { return "CMS EDM Framework ESSource"; }

◆ putComponent()

void edm::eventsetup::SourceMakerTraits::putComponent ( EventSetupsController esController,
ParameterSet const &  iConfiguration,
std::shared_ptr< base_type > const &  component 
)
static

Definition at line 41 of file SourceFactory.cc.

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

43  {
44  esController.putESSource(iConfiguration, component, esController.indexOfNextProcess());
45  }

◆ replaceExisting()

void edm::eventsetup::SourceMakerTraits::replaceExisting ( EventSetupProvider iProvider,
std::shared_ptr< EventSetupRecordIntervalFinder iComponent 
)
static

Definition at line 30 of file SourceFactory.cc.

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

30  {
31  throw edm::Exception(edm::errors::LogicError) << "SourceMakerTraits::replaceExisting\n"
32  << "This function is not implemented and should never be called.\n"
33  << "Please report this to a Framework Developer\n";
34  }