1 #ifndef JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h 2 #define JetMETCorrections_FFTJetObjects_FFTJetObjectFactory_h 20 template<
class Base,
class Derived>
25 {
return new Derived(ps);}
30 public std::map<std::string, AbsFFTJetObjectFactory<Base>*>
40 iterator it = this->
begin(); it != this->
end(); ++it)
47 typename std::map<std::string, AbsFFTJetObjectFactory<Base>*>::
48 const_iterator it = this->
find(derivedType);
49 if (it == this->
end())
51 <<
"Derived type \"" << derivedType
52 <<
"\" is not registered with the factory\n";
53 return it->second->create(ps);
64 template <
class Factory>
68 typedef typename Factory::Base::base_type
base_type;
79 Factory& rd =
const_cast<Factory&
>(
instance());
88 #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)