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>
69 bool replaceExisting)
const;
100 template<
class T,
class TComponent>
101 std::shared_ptr<typename ComponentMaker<T,TComponent>::base_type>
105 bool replaceExisting)
const
111 if (!replaceExisting) {
112 std::shared_ptr<typename T::base_type> alreadyMadeComponent = T::getComponentAndRegisterProcess(esController, iConfiguration);
114 if (alreadyMadeComponent) {
119 std::shared_ptr<TComponent> component(std::static_pointer_cast<TComponent, typename T::base_type>(alreadyMadeComponent));
120 T::addTo(iProvider, component, iConfiguration,
true);
125 std::shared_ptr<TComponent> component = std::make_shared<TComponent>(iConfiguration);
127 this->createComponentDescription(iConfiguration);
130 this->setDescriptionForFinder(component.get(),
description);
131 this->setPostConstruction(component.get(),iConfiguration);
133 if (replaceExisting) {
142 T::replaceExisting(iProvider, component);
148 T::addTo(iProvider, component, iConfiguration,
false);
149 T::putComponent(esController, iConfiguration, component);
void setDescription(const ComponentDescription &iDescription)
const ComponentMaker & operator=(const ComponentMaker &)
virtual ~ComponentMakerBaseHelper()
virtual std::shared_ptr< base_type > addTo(EventSetupsController &esController, EventSetupProvider &iProvider, ParameterSet const &iConfiguration, bool replaceExisting) const =0
virtual std::shared_ptr< base_type > addTo(EventSetupsController &esController, EventSetupProvider &iProvider, ParameterSet const &iConfiguration, bool replaceExisting) const
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
ComponentDescription createComponentDescription(ParameterSet const &iConfiguration) const