Skip to content

Commit

Permalink
Merge pull request #24731 from gartung/RecoBTau-JetTagComputer-strict…
Browse files Browse the repository at this point in the history
…cxx17

RecoBTau/JetTagComputer: replace auto_ptr removed in strict std=c++17
  • Loading branch information
cmsbuild committed Sep 28, 2018
2 parents a02e95f + e2cf866 commit d656880
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Expand Up @@ -28,7 +28,7 @@ class GenericMVAComputerCache {
~IndividualComputer();

std::string label;
std::auto_ptr<GenericMVAComputer> computer;
std::unique_ptr<GenericMVAComputer> computer;
PhysicsTools::Calibration::MVAComputer::CacheId cacheId;
};

Expand Down
Expand Up @@ -28,7 +28,7 @@ class GenericMVAJetTagComputer : public JetTagComputer {
taggingVariables(const TagInfoHelper &info) const;

private:
std::auto_ptr<TagInfoMVACategorySelector> categorySelector_;
std::unique_ptr<TagInfoMVACategorySelector> categorySelector_;
GenericMVAComputerCache computerCache_;
std::string recordLabel_;
};
Expand Down
2 changes: 1 addition & 1 deletion RecoBTau/JetTagComputer/src/GenericMVAComputerCache.cc
Expand Up @@ -107,7 +107,7 @@ bool GenericMVAComputerCache::update(const MVAComputerContainer *calib)
continue;

// instantiate new MVAComputer with uptodate calibration
iter->computer = std::auto_ptr<GenericMVAComputer>(
iter->computer = std::unique_ptr<GenericMVAComputer>(
new GenericMVAComputer(computerCalib));

iter->cacheId = computerCalib->getCacheId();
Expand Down
4 changes: 2 additions & 2 deletions RecoBTau/JetTagComputer/src/GenericMVAJetTagComputer.cc
Expand Up @@ -20,10 +20,10 @@ using namespace PhysicsTools;

static std::vector<std::string>
getCalibrationLabels(const edm::ParameterSet &params,
std::auto_ptr<TagInfoMVACategorySelector> &selector)
std::unique_ptr<TagInfoMVACategorySelector> &selector)
{
if (params.getParameter<bool>("useCategories")) {
selector = std::auto_ptr<TagInfoMVACategorySelector>(
selector = std::unique_ptr<TagInfoMVACategorySelector>(
new TagInfoMVACategorySelector(params));

return selector->getCategoryLabels();
Expand Down

0 comments on commit d656880

Please sign in to comment.