ATLAS Offline Software
Loading...
Searching...
No Matches
SiDetectorElementStatusAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
6
10
11#include <map>
12
13namespace InDet {
14 SiDetectorElementStatusAlg::SiDetectorElementStatusAlg(const std::string& name, ISvcLocator* pSvcLocator)
15 : ::AthReentrantAlgorithm(name, pSvcLocator)
16 {
17 }
18
20 {
21 ATH_CHECK( m_condSummaryTool.empty() ? StatusCode::FAILURE : StatusCode::SUCCESS);
22 ATH_CHECK( m_condSummaryTool.retrieve());
23 ATH_CHECK( m_writeKey.initialize());
24 return StatusCode::SUCCESS;
25 }
26
27 StatusCode SiDetectorElementStatusAlg::execute(const EventContext& ctx) const
28 {
30 auto detector_element_status = m_condSummaryTool->getDetectorElementStatus(ctx, nullptr);
31 if (writeHandle.record( std::move(detector_element_status) ).isFailure()) {
32 ATH_MSG_FATAL("Could not record " << writeHandle.key() );
33 return StatusCode::FAILURE;
34 }
35 return StatusCode::SUCCESS;
36 }
37}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_FATAL(x)
Handle class for recording to StoreGate.
An algorithm that can be simultaneously executed in multiple threads.
SG::WriteHandleKey< InDet::SiDetectorElementStatus > m_writeKey
SiDetectorElementStatusAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode execute(const EventContext &ctx) const override
ToolHandle< IDetectorElementStatusTool > m_condSummaryTool
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
Primary Vertex Finder.