CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Packer.h
Go to the documentation of this file.
1 #ifndef Packer_h
2 #define Packer_h
3 
5 
8 
9 namespace edm {
10  class Event;
11 }
12 
13 namespace l1t {
14  class L1TDigiToRaw;
15 
16  class Packer {
17  public:
18  virtual Blocks pack(const edm::Event&, const PackerTokens*) = 0;
19  };
20 
21  typedef std::vector<std::shared_ptr<Packer>> Packers;
22 
23  typedef Packer*(pack_fct)();
25 
26  class PackerFactory {
27  public:
28  inline static const PackerFactory* get() { return &instance_; };
29  std::shared_ptr<Packer> make(const std::string&) const;
30  private:
32  static const PackerFactory instance_;
33  };
34 }
35 
36 #define DEFINE_L1T_PACKER(type) \
37  DEFINE_EDM_PLUGIN(l1t::PackerFactoryT,type,#type)
38 
39 #endif
std::shared_ptr< Packer > make(const std::string &) const
Definition: Packer.cc:12
edmplugin::PluginFactory< pack_fct > PackerFactoryT
Definition: Packer.h:24
std::vector< std::shared_ptr< Packer > > Packers
Definition: Packer.h:21
static const PackerFactory instance_
Definition: Packer.h:31
Packer *( pack_fct)()
Definition: Packer.h:23
virtual Blocks pack(const edm::Event &, const PackerTokens *)=0
std::vector< Block > Blocks
Definition: Block.h:68