Commit 5e83a4a8 authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

Merge branch 'master-athenapooltest' into 'master'

Switched RDOReaderDoubleSelector to getting CaloDetDescrManager from the Condition Store

See merge request atlas/athena!46791
parents 3e2fa000 6fabcc2d
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/**
......@@ -30,7 +30,6 @@
// DetDescr includes
#include "CaloIdentifier/CaloCell_ID.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
// Id includes
#include "InDetIdentifier/PixelID.h"
......@@ -49,15 +48,13 @@
#include <map>
// Constructor with parameters:
RDOReaderDoubleSelector::RDOReaderDoubleSelector(const std::string &name,
ISvcLocator *pSvcLocator) :
AthAlgorithm(name, pSvcLocator),
m_pixelId(nullptr),
m_sctId(nullptr),
m_trtId(nullptr),
m_caloMgr(nullptr),
m_calocellId(nullptr)
RDOReaderDoubleSelector::RDOReaderDoubleSelector(const std::string &name
, ISvcLocator *pSvcLocator)
: AthAlgorithm(name, pSvcLocator)
, m_pixelId(nullptr)
, m_sctId(nullptr)
, m_trtId(nullptr)
, m_calocellId(nullptr)
{}
// Initialize method:
......@@ -70,7 +67,7 @@ StatusCode RDOReaderDoubleSelector::initialize()
ATH_CHECK( detStore()->retrieve(m_trtId, "TRT_ID") );
ATH_CHECK( detStore()->retrieve(m_calocellId, "CaloCell_ID") );
ATH_CHECK( detStore()->retrieve(m_caloMgr) );
ATH_CHECK(m_caloMgrKey.initialize());
return StatusCode::SUCCESS;
}
......@@ -375,12 +372,15 @@ StatusCode RDOReaderDoubleSelector::checkCells() const
ATH_MSG_DEBUG( "Container '" << "CaloCellCont"
<< "' retrieved from StoreGate" );
SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey};
ATH_CHECK(caloMgrHandle.isValid());
LArCellContFakeCreator creator;
// Create container
MsgStream log(msgSvc(), name());
const CaloCellContainer* caloCont1 = creator.createCaloCellContainer(m_calocellId,
m_caloMgr,
*caloMgrHandle,
msg());
CaloCellContainer::const_iterator first = caloCont->begin();
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
#ifndef RDOREADERDOUBLESELECTOR_H
#define RDOREADERDOUBLESELECTOR_H
#ifndef ATHENAPOOLTEST_RDOREADERDOUBLESELECTOR_H
#define ATHENAPOOLTEST_RDOREADERDOUBLESELECTOR_H
/**
* @file RDOReaderDoubleSelector.h
......@@ -15,13 +15,13 @@
*
*/
// Base class
#include "AthenaBaseComps/AthAlgorithm.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
#include "StoreGate/ReadCondHandleKey.h"
class PixelID;
class SCT_ID;
class TRT_ID;
class CaloDetDescrManager;
class CaloCell_ID;
class CaloCellContainer;
......@@ -36,13 +36,13 @@ public:
RDOReaderDoubleSelector(const std::string &name,ISvcLocator *pSvcLocator);
/// Algorithm initialize at begin of job
virtual StatusCode initialize();
virtual StatusCode initialize() override;
/// Algorithm execute once per event
virtual StatusCode execute();
virtual StatusCode execute() override;
/// Algorithm finalize at end of job
virtual StatusCode finalize();
virtual StatusCode finalize() override;
///////////////////////////////////////////////////////////////////
// Private methods:
......@@ -88,7 +88,10 @@ private:
const TRT_ID* m_trtId;
/// Need DD mgr to create cells
const CaloDetDescrManager* m_caloMgr;
SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey { this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" };
/// Need id helper to create cells
const CaloCell_ID* m_calocellId;
......
Markdown is supported
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