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

◆ PackerFactory()

l1t::PackerFactory::PackerFactory ( )
inlineprivate

Definition at line 18 of file PackerFactory.h.

18 {}

Member Function Documentation

◆ get()

static const PackerFactory* l1t::PackerFactory::get ( )
inlinestatic

◆ make()

std::shared_ptr< Packer > l1t::PackerFactory::make ( const std::string &  name) const

Definition at line 10 of file PackerFactory.cc.

References edm::errors::Configuration, Exception, get, and mergeVDriftHistosByStation::name.

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

10  {
11  auto unpacker = std::shared_ptr<Packer>(PackerFactoryT::get()->create("l1t::" + name));
12 
13  if (unpacker.get() == nullptr) {
14  throw edm::Exception(edm::errors::Configuration, "NoSourceModule") << "Cannot find a packer named " << name;
15  }
16 
17  return unpacker;
18  }
#define get

Member Data Documentation

◆ instance_

const PackerFactory l1t::PackerFactory::instance_
staticprivate

Definition at line 19 of file PackerFactory.h.

Referenced by get().