Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:53

0001 #include "PackerFactory.h"
0002 
0003 #include "FWCore/Utilities/interface/EDMException.h"
0004 
0005 EDM_REGISTER_PLUGINFACTORY(l1t::PackerFactoryT, "PackerFactory");
0006 
0007 namespace l1t {
0008   const PackerFactory PackerFactory::instance_;
0009 
0010   std::shared_ptr<Packer> PackerFactory::make(const std::string& name) const {
0011     auto unpacker = std::shared_ptr<Packer>(PackerFactoryT::get()->create("l1t::" + name));
0012 
0013     if (unpacker.get() == nullptr) {
0014       throw edm::Exception(edm::errors::Configuration, "NoSourceModule") << "Cannot find a packer named " << name;
0015     }
0016 
0017     return unpacker;
0018   }
0019 }  // namespace l1t