CMS 3D CMS Logo

PackerFactory.h
Go to the documentation of this file.
1 #ifndef EventFilter_L1TRawToDigi_PackerFactory_h
2 #define EventFilter_L1TRawToDigi_PackerFactory_h
3 
5 
7 
8 namespace l1t {
9  typedef Packer*(pack_fct)();
11 
12  class PackerFactory {
13  public:
14  inline static const PackerFactory* get() { return &instance_; };
15  std::shared_ptr<Packer> make(const std::string&) const;
16  private:
18  static const PackerFactory instance_;
19  };
20 }
21 
22 #define DEFINE_L1T_PACKER(type) \
23  DEFINE_EDM_PLUGIN(l1t::PackerFactoryT,type,#type)
24 
25 #endif
std::shared_ptr< Packer > make(const std::string &) const
edmplugin::PluginFactory< pack_fct > PackerFactoryT
Definition: PackerFactory.h:10
delete x;
Definition: CaloConfig.h:22
static const PackerFactory instance_
Definition: PackerFactory.h:17
Packer *( pack_fct)()
Definition: PackerFactory.h:9