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);
52 template <
class Factory>
55 typedef typename Factory::Base::base_type
base_type;
58 static Factory
const obj;
64 Factory& rd =
const_cast<Factory&
>(
instance());
72 #endif // JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h
virtual ~AbsFFTJetObjectFactory()
DefaultFFTJetObjectFactory()
virtual Base * create(const edm::ParameterSet &ps) const =0
~ConcreteFFTJetObjectFactory() override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
static const Factory & instance()
DefaultFFTJetObjectFactory & operator=(const DefaultFFTJetObjectFactory &)=delete
static void registerType(const std::string &className)
Base * create(const std::string &derivedType, const edm::ParameterSet &ps) const
virtual ~DefaultFFTJetObjectFactory()
Derived * create(const edm::ParameterSet &ps) const override
Factory::Base::base_type base_type
StaticFFTJetObjectFactory()=delete
std::string className(const T &t)