Skip to content
Snippets Groups Projects
Commit f45a96d2 authored by Susumu Oda's avatar Susumu Oda
Browse files

Keep IdentifierHash before move and use it after move

parent cae68f8a
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
/** @file SCT_Clusterization.cxx
......@@ -170,10 +170,10 @@ namespace InDet{
std::unique_ptr<SCT_ClusterCollection> clusterCollection ( m_clusteringTool->clusterize(*rd,*m_manager,*m_idHelper));
if (clusterCollection) {
if (not clusterCollection->empty()) {
const IdentifierHash hash(clusterCollection->identifyHash());
//Using get because I'm unsure of move semantec status
ATH_CHECK(clusterContainer->addOrDelete(std::move(clusterCollection), clusterCollection->identifyHash()));
ATH_MSG_DEBUG("Clusters with key '" << clusterCollection->identifyHash() << "' added to Container\n");
ATH_CHECK(clusterContainer->addOrDelete(std::move(clusterCollection), hash));
ATH_MSG_DEBUG("Clusters with key '" << hash << "' added to Container\n");
} else {
ATH_MSG_DEBUG("Don't write empty collections\n");
}
......@@ -211,7 +211,8 @@ namespace InDet{
if (clusterCollection && !clusterCollection->empty()){
ATH_MSG_VERBOSE( "REGTEST: SCT : clusterCollection contains "
<< clusterCollection->size() << " clusters" );
ATH_CHECK(clusterContainer->addOrDelete( std::move(clusterCollection), clusterCollection->identifyHash() ));
const IdentifierHash hash(clusterCollection->identifyHash());
ATH_CHECK(clusterContainer->addOrDelete( std::move(clusterCollection), hash ));
}else{
ATH_MSG_DEBUG("No SCTClusterCollection to write");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment