CMS 3D CMS Logo

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

#include <UnpackerFactory.h>

Public Member Functions

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

Static Public Member Functions

static const UnpackerFactoryget ()
 

Private Member Functions

 UnpackerFactory ()
 

Static Private Attributes

static const UnpackerFactory instance_
 

Detailed Description

Definition at line 12 of file UnpackerFactory.h.

Constructor & Destructor Documentation

l1t::UnpackerFactory::UnpackerFactory ( )
inlineprivate

Definition at line 17 of file UnpackerFactory.h.

References instance_.

17 {};

Member Function Documentation

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

Definition at line 20 of file UnpackerFactory.cc.

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

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

21  {
22  auto unpacker = std::shared_ptr<Unpacker>(UnpackerFactoryT::get()->create("l1t::" + name));
23 
24  if (unpacker.get() == 0) {
25  throw edm::Exception(edm::errors::Configuration, "NoSourceModule")
26  << "Cannot find an unpacker named " << name;
27  }
28 
29  return unpacker;
30  }
T get(const Candidate &c)
Definition: component.h:55

Member Data Documentation

const UnpackerFactory l1t::UnpackerFactory::instance_
staticprivate

Definition at line 17 of file UnpackerFactory.h.

Referenced by get(), and UnpackerFactory().