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.

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  }

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

◆ 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.

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

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

◆ logInfoWhenSharing()

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

Definition at line 47 of file SourceFactory.cc.

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  }

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

Referenced by addTo().

◆ name()

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

Definition at line 28 of file SourceFactory.cc.

28 { return "CMS EDM Framework ESSource"; }

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

◆ 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.

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

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

◆ replaceExisting()

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

Definition at line 30 of file SourceFactory.cc.

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  }

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

edm::errors::LogicError
Definition: EDMException.h:37
edm::eventsetup::addProviderTo
void addProviderTo(EventSetupProvider &iProvider, std::shared_ptr< T > iComponent, const DataProxyProvider *)
Definition: SourceFactory.h:41
edm::eventsetup::SourceMakerTraits::logInfoWhenSharing
static void logInfoWhenSharing(ParameterSet const &iConfiguration)
Definition: SourceFactory.cc:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
Exception
Definition: hltDiff.cc:245
label
const char * label
Definition: PFTauDecayModeTools.cc:11