Go to the documentation of this file. 1 #ifndef JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h
2 #define JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h
19 template <
class Base,
class Derived>
38 typename std::map<std::string, AbsFFTJetObjectFactory<Base>*>::const_iterator it = this->
find(derivedType);
39 if (it == this->
end())
41 <<
"Derived type \"" << derivedType <<
"\" is not registered with the factory\n";
42 return it->second->create(ps);
53 template <
class Factory>
56 typedef typename Factory::Base::base_type
base_type;
59 static Factory
const obj;
65 Factory& rd = const_cast<Factory&>(
instance());
74 #endif // JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h
Factory::Base::base_type base_type
static const Factory & instance()
Derived * create(const edm::ParameterSet &ps) const override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
virtual Base * create(const edm::ParameterSet &ps) const =0
static void registerType(const std::string &className)
Base * create(const std::string &derivedType, const edm::ParameterSet &ps) const
virtual ~DefaultFFTJetObjectFactory()
DefaultFFTJetObjectFactory()
std::string className(const T &t)
StaticFFTJetObjectFactory()=delete
~ConcreteFFTJetObjectFactory() override
DefaultFFTJetObjectFactory & operator=(const DefaultFFTJetObjectFactory &)=delete
virtual ~AbsFFTJetObjectFactory()