1 #ifndef FWCore_PluginManager_PluginFactory_h 2 #define FWCore_PluginManager_PluginFactory_h 35 template<
typename R,
typename... Args>
38 friend class DummyFriend;
43 virtual R*
create(Args...)
const = 0;
47 struct PMaker :
public PMakerBase {
52 return new TPlug(std::forward<Args>(
args)...);
81 finishedConstruction();
89 #define CONCATENATE_HIDDEN(a,b) a ## b 90 #define CONCATENATE(a,b) CONCATENATE_HIDDEN(a,b) 91 #define EDM_REGISTER_PLUGINFACTORY(_factory_,_category_) \ 92 namespace edmplugin {\ 93 template<> edmplugin::PluginFactory<_factory_::TemplateArgType>* edmplugin::PluginFactory<_factory_::TemplateArgType>::get() { CMS_THREAD_SAFE static edmplugin::PluginFactory<_factory_::TemplateArgType> s_instance; return &s_instance;}\ 94 template<> const std::string& edmplugin::PluginFactory<_factory_::TemplateArgType>::category() const { static const std::string s_cat(_category_); return s_cat;}\ 95 } enum {CONCATENATE(dummy_edm_register_pluginfactory_, __LINE__)} 99 #define EDM_PLUGIN_SYM(x,y) EDM_PLUGIN_SYM2(x,y) 100 #define EDM_PLUGIN_SYM2(x,y) x ## y 102 #define DEFINE_EDM_PLUGIN(factory,type,name) \ 103 static const factory::PMaker<type> EDM_PLUGIN_SYM(s_maker , __LINE__ ) (name)
def create(alignables, pedeDump, additionalData, outputFile, config)
void registerPMaker(void *iPMaker, const std::string &iName)
R * create(const std::string &iName, Args...args) const
R * create(Args...args) const override
R * TemplateArgType(Args...)
void registerPMaker(PMakerBase *iPMaker, const std::string &iName)
PMaker(const std::string &iName)
void * findPMaker(const std::string &iName) const
R * tryToCreate(const std::string &iName, Args...args) const
like above but returns 0 if iName is unknown
T get(const Candidate &c)
void * tryToFindPMaker(const std::string &iName) const