CMS 3D CMS Logo

PackerFactory.cc
Go to the documentation of this file.
1 #include "PackerFactory.h"
2 
4 
6 
7 namespace l1t {
8  const PackerFactory PackerFactory::instance_;
9 
10  std::shared_ptr<Packer> PackerFactory::make(const std::string& name) const {
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  }
19 } // namespace l1t
PackerFactory.h
l1t::PackerFactory::instance_
static const PackerFactory instance_
Definition: PackerFactory.h:18
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
EDMException.h
EDM_REGISTER_PLUGINFACTORY
#define EDM_REGISTER_PLUGINFACTORY(_factory_, _category_)
Definition: PluginFactory.h:89
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t
delete x;
Definition: CaloConfig.h:22
edmplugin::PluginFactory
Definition: PluginFactory.h:34
get
#define get
Exception
Definition: hltDiff.cc:245
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
l1t::PackerFactory::make
std::shared_ptr< Packer > make(const std::string &) const
Definition: PackerFactory.cc:10
edm::errors::Configuration
Definition: EDMException.h:36