Skip to content

Commit

Permalink
Merge pull request #19 from dildick/from-CMSSW_6_2_X_SLHC_2014-01-24-…
Browse files Browse the repository at this point in the history
…0200

Use shared_ptr
  • Loading branch information
Sven Dildick committed Jan 26, 2014
2 parents cea35e1 + 3cfbdbb commit 93ebd6e
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ void CSCTriggerPrimitivesProducer::produce(edm::Event& ev,
<< " Skipping production of CSC TP digis +++\n";
}
// Fill output collections if valid input collections are available.
if (wireDigis.isValid() && compDigis.isValid()) {
const CSCBadChambers* temp = checkBadChambers_ ? pBadChambers.product() : new CSCBadChambers;
lctBuilder_->build(temp,
wireDigis.product(), compDigis.product(), gemPads,
*oc_alct, *oc_clct, *oc_pretrig, *oc_lct, *oc_sorted_lct);
if (!checkBadChambers_)
delete temp;
if (wireDigis.isValid() && compDigis.isValid()) {
std::shared_ptr<const CSCBadChambers> temp( checkBadChambers_ ?
std::shared_ptr<const CSCBadChambers>{pBadChambers.product(), [](const void*){}} :
std::make_shared<const CSCBadChambers>());
lctBuilder_->build(temp.get(),
wireDigis.product(), compDigis.product(), gemPads,
*oc_alct, *oc_clct, *oc_pretrig, *oc_lct, *oc_sorted_lct);
}

// Put collections in event.
Expand Down

0 comments on commit 93ebd6e

Please sign in to comment.