Skip to content
Snippets Groups Projects
Commit ea25af6d authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'CaloFillRectangularCluster_caloDetDescrMgr_cond' into 'master'

CaloFillRectangularCluster migrate to using CaloDetDescrMgr from  cond store

See merge request atlas/athena!46982
parents 03b527ff e05f06cd
No related branches found
Tags v8r9-pre3
No related merge requests found
......@@ -43,7 +43,10 @@
#include "AthenaKernel/IOVSvcDefs.h"
#include "StoreGate/ReadHandleKey.h"
#include "GaudiKernel/ThreadLocalContext.h"
class CaloDetDescrManager;
#include "StoreGate/ReadCondHandleKey.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
// Helper object used for the per-sampling calculations.
namespace CaloClusterCorr {
......@@ -190,6 +193,15 @@ private:
/// The StoreGate key for the container of our input cells.
/// This is a property.
SG::ReadHandleKey<CaloCellContainer> m_cellsName;
SG::ReadCondHandleKey<CaloDetDescrManager> m_caloDetDescrMgrKey {
this,
"CaloDetDescrManager",
"CaloDetDescrManager",
"SG Key for CaloDetDescrManager in the Condition Store"
};
};
#endif // not CALOCLUSTERCORRECTION_CALOFILLRECTANGULARCLUSTER_H
......@@ -802,9 +802,11 @@ StatusCode CaloFillRectangularCluster::initialize()
{
// The method from the base class.
CHECK( CaloClusterCorrection::initialize() );
if (!m_cellsName.key().empty())
if (!m_cellsName.key().empty()){
CHECK( m_cellsName.initialize() );
}
ATH_CHECK(m_caloDetDescrMgrKey.initialize());
return StatusCode::SUCCESS;
}
......@@ -1074,12 +1076,14 @@ void CaloFillRectangularCluster::makeCorrection (const Context& myctx,
CaloCluster* cluster) const
{
ATH_MSG_DEBUG( "Executing CaloFillRectangularCluster" << endmsg) ;
const CaloDetDescrManager* calodetdescrmgr = nullptr;
if(detStore()->retrieve(calodetdescrmgr,"CaloMgr").isFailure()){
// retrieve CaloDetDescr
SG::ReadCondHandle<CaloDetDescrManager> caloDetDescrMgrHandle { m_caloDetDescrMgrKey, myctx.ctx()};
if(!caloDetDescrMgrHandle.isValid()){
ATH_MSG_ERROR ("Failed to retrieve CaloDetDescrManager : CaloMgr");
}
const CaloDetDescrManager* calodetdescrmgr = *caloDetDescrMgrHandle;
CaloClusterCorr::Segmentation seg (calodetdescrmgr);
if (seg.m_detas2 == 0) {
......
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