ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawChannelCorrectionAlg.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5// Tile includes
8
9// Athena includes
13
14#include <memory>
15
17
18 ATH_MSG_DEBUG( "Input raw channel container: '" << m_inputRawChannelContainerKey.key()
19 << "' output container: '" << m_outputRawChannelContainerKey.key() << "'" );
20
23
24 ATH_CHECK( m_noiseFilterTools.retrieve() );
25 ATH_MSG_DEBUG( "Successfully retrieved corection tools: " << m_noiseFilterTools );
26
27 ATH_MSG_DEBUG( "initialization completed" );
28
29 return StatusCode::SUCCESS;
30}
31
32
33StatusCode TileRawChannelCorrectionAlg::execute(const EventContext& ctx) const {
34
35
36 const TileRawChannelContainer* inputRawChannels = SG::makeHandle(m_inputRawChannelContainerKey, ctx).get();
37 auto outputRawChannels = std::make_unique<TileMutableRawChannelContainer>(*inputRawChannels);
38 ATH_CHECK( outputRawChannels->status() );
39
40 for (const ToolHandle<ITileRawChannelTool>& noiseFilterTool : m_noiseFilterTools) {
41 if (noiseFilterTool->process(*outputRawChannels.get(), ctx).isFailure()) {
42 ATH_MSG_ERROR( " Error status returned from " << noiseFilterTool.name() );
43 } else {
44 ATH_MSG_DEBUG( noiseFilterTool.name() << " applied to the container" );
45 }
46 }
47
49 ATH_CHECK( outputRawChannelContainer.record(std::move(outputRawChannels)) );
50
51 ATH_MSG_DEBUG( "TileRawChannelContainer registered successfully ("
52 << m_outputRawChannelContainerKey.key() << ")");
53
54 return StatusCode::SUCCESS;
55}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
Helpers for checking error return status codes and reporting errors.
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
Helper for holding non-const raw data prior to recording in SG.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
SG::ReadHandleKey< TileRawChannelContainer > m_inputRawChannelContainerKey
virtual StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< TileRawChannelContainer > m_outputRawChannelContainerKey
virtual StatusCode initialize() override
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())