CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes
l1t::PackerFactory Class Reference

#include <PackerFactory.h>

Public Member Functions

std::shared_ptr< Packermake (const std::string &) const
 

Static Public Member Functions

static const PackerFactoryget ()
 

Private Member Functions

 PackerFactory ()
 

Static Private Attributes

static const PackerFactory instance_
 

Detailed Description

Definition at line 12 of file PackerFactory.h.

Constructor & Destructor Documentation

l1t::PackerFactory::PackerFactory ( )
inlineprivate

Definition at line 17 of file PackerFactory.h.

References instance_.

17 {};

Member Function Documentation

static const PackerFactory* l1t::PackerFactory::get ( )
inlinestatic
std::shared_ptr< Packer > l1t::PackerFactory::make ( const std::string &  name) const

Definition at line 11 of file PackerFactory.cc.

References edm::errors::Configuration, Exception, reco::get(), and dataset::name.

Referenced by get(), l1t::stage2::BMTFSetup::getPackers(), l1t::stage2::CaloLayer1Setup::getPackers(), l1t::stage2::GMTSetup::getPackers(), l1t::stage2::EMTFSetup::getPackers(), l1t::stage2::CaloSetup::getPackers(), l1t::stage1::CaloSetup::getPackers(), and l1t::stage2::GTSetup::getPackers().

12  {
13  auto unpacker = std::shared_ptr<Packer>(PackerFactoryT::get()->create("l1t::" + name));
14 
15  if (unpacker.get() == nullptr) {
16  throw edm::Exception(edm::errors::Configuration, "NoSourceModule")
17  << "Cannot find a packer named " << name;
18  }
19 
20  return unpacker;
21  }
T get(const Candidate &c)
Definition: component.h:55

Member Data Documentation

const PackerFactory l1t::PackerFactory::instance_
staticprivate

Definition at line 17 of file PackerFactory.h.

Referenced by get(), and PackerFactory().