Commit 20a72bf0 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'athstore' into 'master'

AthCommonDataStore: remove deprecated sgSvc accessor

See merge request atlas/athena!54698
parents 9627d36e 28faf5d7
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
/** @class AthCommonDataStore
......@@ -78,13 +78,6 @@ public:
}
}
// using PBASE::PBASE;
/** @brief The standard @c StoreGateSvc
* Returns (kind of) a pointer to the @c StoreGateSvc
* @warning: deprecated. please use @c evtStore() instead
*/
const ServiceHandle<StoreGateSvc>& sgSvc() const { return m_evtStore; }
/** @brief The standard @c StoreGateSvc (event store)
* Returns (kind of) a pointer to the @c StoreGateSvc
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
/////////////////////////////////////////////////
......@@ -67,7 +67,7 @@ StatusCode EventBoost::execute() {
// Read Data from Transient Store
const McEventCollection* mcCollptr;
if ( sgSvc()->retrieve(mcCollptr, m_genEvtInKey).isFailure() ) {
if ( evtStore()->retrieve(mcCollptr, m_genEvtInKey).isFailure() ) {
msg(MSG::ERROR) << "Could not retrieve McEventCollection" << m_genEvtInKey<< endmsg;
return StatusCode::FAILURE;
}
......@@ -89,7 +89,7 @@ StatusCode EventBoost::execute() {
const McEventCollection* mcCollptrCOPY;
if ( sgSvc()->retrieve(mcCollptrCOPY, m_genEvtOutKey).isFailure() ) {
if ( evtStore()->retrieve(mcCollptrCOPY, m_genEvtOutKey).isFailure() ) {
msg(MSG::ERROR) << "Could not retrieve boosted McEventCollection" << m_genEvtOutKey<< endmsg;
return StatusCode::FAILURE;
}
......@@ -319,7 +319,7 @@ StatusCode EventBoost::EventCopy(const HepMC::GenEvent* evt) const
mcEvtColl = new McEventCollection;
mcEvtColl->push_back(newEvt);
if ( sgSvc()->record( mcEvtColl, m_genEvtOutKey ).isFailure() ) {
if ( evtStore()->record( mcEvtColl, m_genEvtOutKey ).isFailure() ) {
msg(MSG::ERROR) << "Could not record boosted McEventCollection" << m_genEvtOutKey<< endmsg;
return StatusCode::FAILURE;
}
......
......@@ -117,7 +117,7 @@ StatusCode AddTRTMomConstr::finalize() {
StatusCode AddTRTMomConstr::execute() {
if( !m_trackListOutput.empty() && !m_trackListInput.empty() ) {
const TrackCollection* inputtracks ;
ATH_CHECK(sgSvc()->retrieve( inputtracks, m_trackListInput) );
ATH_CHECK(evtStore()->retrieve( inputtracks, m_trackListInput) );
auto outputtracks = std::make_unique<ConstDataVector<TrackCollection> >( SG::VIEW_ELEMENTS ) ;
for (const auto it : *inputtracks){
auto track=it;
......@@ -139,7 +139,7 @@ StatusCode AddTRTMomConstr::execute() {
m_nTracksProcessed += inputtracks->size() ;
m_nTracksAccepted += outputtracks->size() ;
if( sgSvc()->record( std::move(outputtracks), m_trackListOutput ).isFailure() ) {
if( evtStore()->record( std::move(outputtracks), m_trackListOutput ).isFailure() ) {
ATH_MSG_ERROR( "Failed to record trackcollection with name " << m_trackListOutput );
}
}
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
// PixelCalibAlgs
......@@ -368,7 +368,7 @@ StatusCode HitMapBuilder::execute() {
// retrieve EventInfo
const EventInfo* eventInfo;
StatusCode sc = sgSvc()->retrieve(eventInfo);
StatusCode sc = evtStore()->retrieve(eventInfo);
if (!sc.isSuccess()) {
ATH_MSG_FATAL("Unable to retrieve event info");
return StatusCode::FAILURE;
......@@ -386,7 +386,7 @@ StatusCode HitMapBuilder::execute() {
// retrieve PixelRDO container
const DataHandle<PixelRDO_Container> pixelRDOs;
sc = sgSvc()->retrieve(pixelRDOs, m_pixelRDOKey);
sc = evtStore()->retrieve(pixelRDOs, m_pixelRDOKey);
if (!sc.isSuccess()) {
ATH_MSG_FATAL( "Unable to retrieve pixel RDO container at " << m_pixelRDOKey );
return StatusCode::FAILURE;
......
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
// PixelCalibAlgs
......@@ -303,7 +303,7 @@ StatusCode OccupancyMapMaker::execute(){
// retrieve EventInfo
const EventInfo* eventInfo;
StatusCode sc = sgSvc()->retrieve(eventInfo);
StatusCode sc = evtStore()->retrieve(eventInfo);
if( !sc.isSuccess() ){
ATH_MSG_FATAL("Unable to retrieve event info");
return StatusCode::FAILURE;
......@@ -319,7 +319,7 @@ StatusCode OccupancyMapMaker::execute(){
// retrieve PixelRDO container
const PixelRDO_Container* pixelRDOs = nullptr;
sc = sgSvc()->retrieve(pixelRDOs, m_pixelRDOKey);
sc = evtStore()->retrieve(pixelRDOs, m_pixelRDOKey);
if( !sc.isSuccess() ){
ATH_MSG_FATAL( "Unable to retrieve pixel RDO container at " << m_pixelRDOKey );
return StatusCode::FAILURE;
......
/*
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonAlignErrorExampleAlg.h"
......@@ -29,7 +29,7 @@ StatusCode MuonAlignErrorExampleAlg::initialize() {
StatusCode MuonAlignErrorExampleAlg::execute() {
StatusCode sc;
const ::TrackCollection* tracks = nullptr;
sc = sgSvc()->retrieve(tracks, "MuonSpectrometerTracks"); // for example, should be a job option
sc = evtStore()->retrieve(tracks, "MuonSpectrometerTracks"); // for example, should be a job option
if (sc.isFailure()) return sc;
// LOOP ON MUON TRACKS //
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment