Skip to content
Snippets Groups Projects

Don't call PathResolverFindCalibFile in constructor (ATLASRECTS-6047)

Merged Nicolas Koehler requested to merge nkoehler/athena:rec6047 into master
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#include "CaloTrkMuIdTools/CaloMuonLikelihoodTool.h"
@@ -25,19 +25,8 @@
// CaloMuonLikelihoodTool constructor
///////////////////////////////////////////////////////////////////////////////
CaloMuonLikelihoodTool::CaloMuonLikelihoodTool(const std::string& type, const std::string& name, const IInterface* parent) :
AthAlgTool(type,name,parent),
m_fileNames{
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.A0.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.A1.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.A2.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.B0.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.B1.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.B2.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.C0.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.C1.root"),
PathResolverFindCalibFile( "CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.C2.root")
}
{
AthAlgTool(type,name,parent),
m_fileNames() {
declareInterface<ICaloMuonLikelihoodTool>(this);
declareProperty("RootFileNames", m_fileNames);
}
@@ -47,21 +36,20 @@ CaloMuonLikelihoodTool::CaloMuonLikelihoodTool(const std::string& type, const st
///////////////////////////////////////////////////////////////////////////////
StatusCode CaloMuonLikelihoodTool::initialize() {
ATH_MSG_INFO("Initializing " << name());
ATH_CHECK(m_caloExtensionTool.retrieve());
if (m_fileNames.size()!=9) {
ATH_MSG_FATAL("Number of input ROOT files should be 9!");
return StatusCode::FAILURE;
}
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.A0.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.A1.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.A2.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.B0.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.B1.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.B2.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.C0.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.C1.root"));
m_fileNames.push_back(PathResolverFindCalibFile("CaloTrkMuIdTools/cutBased_release21/CaloMuonLikelihood.PDF.C2.root"));
ATH_CHECK(retrieveHistograms());
return StatusCode::SUCCESS;
}
///////////////////////////////////////////////////////////////////////////////
// CaloMuonLikelihoodTool::retrieveHistograms
///////////////////////////////////////////////////////////////////////////////
Loading