Skip to content

Commit

Permalink
Use unique_ptr constructor for PluginFactory plugin in RPCRecHitProducer
Browse files Browse the repository at this point in the history
  • Loading branch information
makortel committed Feb 8, 2019
1 parent 06febc2 commit 2a951b3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions RecoLocalMuon/RPCRecHit/src/RPCRecHitProducer.cc
Expand Up @@ -28,16 +28,14 @@ using namespace std;

RPCRecHitProducer::RPCRecHitProducer(const ParameterSet& config):
theRPCDigiLabel(consumes<RPCDigiCollection>(config.getParameter<InputTag>("rpcDigiLabel"))),
// Get the concrete reconstruction algo from the factory
theAlgo{RPCRecHitAlgoFactory::get()->create(config.getParameter<string>("recAlgo"),
config.getParameter<ParameterSet>("recAlgoConfig"))},
maskSource_(MaskSource::EventSetup), deadSource_(MaskSource::EventSetup)
{
// Set verbose output
produces<RPCRecHitCollection>();

// Get the concrete reconstruction algo from the factory
const string theAlgoName = config.getParameter<string>("recAlgo");
theAlgo.reset(RPCRecHitAlgoFactory::get()->create(theAlgoName,
config.getParameter<ParameterSet>("recAlgoConfig")));

// Get masked- and dead-strip information
theRPCMaskedStripsObj = std::make_unique<RPCMaskedStrips>();
theRPCDeadStripsObj = std::make_unique<RPCDeadStrips>();
Expand Down

0 comments on commit 2a951b3

Please sign in to comment.