Skip to content
Snippets Groups Projects
Commit 44fa7f37 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

NoiseStudy: switched to reading CaloSuperCellDetDescrManager from Cond Store

Part of the ongoing migration of all clients of Calo DD managers
parent b1c25f71
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
*/
......@@ -15,7 +15,6 @@
#include "NoiseStudy.h"
#include "CaloIdentifier/CaloCell_SuperCell_ID.h"
#include "CaloIdentifier/CaloIdManager.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
#include "TFile.h"
#include "TH1F.h"
#include "TH2F.h"
......@@ -45,10 +44,8 @@ StatusCode NoiseStudy::initialize(){
if ( m_scidtool.retrieve().isFailure() ){
ATH_MSG_ERROR("cannot perform comparisons between cell and SuperCells");
}
const CaloIdManager* caloMgr;
const CaloSuperCellDetDescrManager* sem_mgr;
ATH_CHECK( detStore()->retrieve (sem_mgr, "CaloSuperCellMgr") );
const CaloIdManager* caloMgr;
CHECK( detStore()->retrieve(caloMgr) );
//
......@@ -70,6 +67,7 @@ StatusCode NoiseStudy::initialize(){
ATH_CHECK( m_cellContainerInKey.initialize() );
ATH_CHECK( m_evtInKey.initialize() );
ATH_CHECK( m_truthInKey.initialize() );
ATH_CHECK( m_caloSuperCellMgrKey.initialize() );
return StatusCode::SUCCESS;
}
......@@ -84,8 +82,8 @@ StatusCode NoiseStudy::finalize(){
StatusCode NoiseStudy::execute(const EventContext& context) const{
ATH_MSG_DEBUG ("execute NoiseStudy" );
const CaloSuperCellDetDescrManager* sem_mgr;
ATH_CHECK( detStore()->retrieve (sem_mgr, "CaloSuperCellMgr") );
SG::ReadCondHandle<CaloSuperCellDetDescrManager> caloSuperCellMgrHandle{m_caloSuperCellMgrKey,context};
const CaloSuperCellDetDescrManager* sem_mgr = *caloSuperCellMgrHandle;
std::default_random_engine generator;
// Not really a condition, but almost
const CaloBCIDAverage* caloLumiBCID = nullptr;
......
......@@ -27,6 +27,8 @@
#include "xAODTruth/TruthParticleContainer.h"
#include "xAODTracking/VertexContainer.h"
#include "xAODEventInfo/EventInfo.h"
#include "StoreGate/ReadCondHandleKey.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
class TFile;
class TH1I;
class TH1F;
......@@ -85,6 +87,8 @@ private :
{ this, "TruthInfoKey", "TruthParticles",
"SG key for the input TruthParticles container"};
SG::ReadCondHandleKey<CaloSuperCellDetDescrManager> m_caloSuperCellMgrKey{
this,"CaloSuperCellDetDescrManager","CaloSuperCellDetDescrManager","SG key of the resulting CaloSuperCellDetDescrManager"};
const CaloCell_SuperCell_ID* m_schelper;
......
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