1 #ifndef Framework_ComponentMaker_h
2 #define Framework_ComponentMaker_h
23 #include "boost/shared_ptr.hpp"
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 boost::shared_ptr<typename ComponentMaker<T,TComponent>::base_type>
105 bool replaceExisting)
const
111 if (!replaceExisting) {
112 boost::shared_ptr<typename T::base_type> alreadyMadeComponent = T::getComponentAndRegisterProcess(esController, iConfiguration);
114 if (alreadyMadeComponent) {
119 boost::shared_ptr<TComponent> component(boost::static_pointer_cast<TComponent, typename T::base_type>(alreadyMadeComponent));
120 T::addTo(iProvider, component, iConfiguration,
true);
125 boost::shared_ptr<TComponent> component(
new 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)
virtual boost::shared_ptr< base_type > addTo(EventSetupsController &esController, EventSetupProvider &iProvider, ParameterSet const &iConfiguration, bool replaceExisting) const
const ComponentMaker & operator=(const ComponentMaker &)
virtual boost::shared_ptr< base_type > addTo(EventSetupsController &esController, EventSetupProvider &iProvider, ParameterSet const &iConfiguration, bool replaceExisting) const =0
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
ComponentDescription createComponentDescription(ParameterSet const &iConfiguration) const