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;
65 Factory& rd =
const_cast<Factory&
>(
instance());
74 #endif // JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h
virtual ~AbsFFTJetObjectFactory()
DefaultFFTJetObjectFactory()
static PFTauRenderPlugin instance
virtual Base * create(const edm::ParameterSet &ps) const =0
~ConcreteFFTJetObjectFactory() override
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)
static const Factory & instance()
static void registerType(const std::string &className)
Base * create(const std::string &derivedType, const edm::ParameterSet &ps) const
virtual ~DefaultFFTJetObjectFactory()
Factory::Base::base_type base_type
std::string className(const T &t)