1 #ifndef Framework_ComponentMaker_h 2 #define Framework_ComponentMaker_h 33 namespace eventsetup {
35 class EventSetupsController;
53 bool replaceExisting)
const = 0;
56 template <
class T,
class TComponent>
67 bool replaceExisting)
const override;
94 template <
class T,
class TComponent>
99 bool replaceExisting)
const {
104 if (!replaceExisting) {
105 std::shared_ptr<typename T::base_type> alreadyMadeComponent =
106 T::getComponentAndRegisterProcess(esController, iConfiguration);
108 if (alreadyMadeComponent) {
113 std::shared_ptr<TComponent> component(
114 std::static_pointer_cast<TComponent, typename T::base_type>(alreadyMadeComponent));
115 T::addTo(iProvider, component, iConfiguration,
true);
120 std::shared_ptr<TComponent> component = std::make_shared<TComponent>(iConfiguration);
123 this->setDescription(component.get(),
description);
124 this->setDescriptionForFinder(component.get(),
description);
125 this->setPostConstruction(component.get(), iConfiguration);
127 if (replaceExisting) {
136 T::replaceExisting(iProvider, component);
142 T::addTo(iProvider, component, iConfiguration,
false);
143 T::putComponent(esController, iConfiguration, component);
void setDescription(const ComponentDescription &iDescription)
virtual ~ComponentMakerBaseHelper()
void setPostConstruction(DataProxyProvider *iProv, const edm::ParameterSet &iPSet) const
void setDescriptionForFinder(const eventsetup::ComponentDescription &iDescription)
void setPostConstruction(void *, const edm::ParameterSet &) const
void setAppendToDataLabel(const edm::ParameterSet &)
void setDescription(DataProxyProvider *iProv, const ComponentDescription &iDesc) const
void setDescription(void *, const ComponentDescription &) const
void setDescriptionForFinder(void *, const ComponentDescription &) const
void setDescriptionForFinder(EventSetupRecordIntervalFinder *iFinder, const ComponentDescription &iDesc) const
std::shared_ptr< base_type > addTo(EventSetupsController &esController, EventSetupProvider &iProvider, ParameterSet const &iConfiguration, bool replaceExisting) const override
ComponentDescription createComponentDescription(ParameterSet const &iConfiguration) const