ATLAS Offline Software
TileDQstatusAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 /*
5  */
15 #include "TileDQstatusAlg.h"
19 #include "StoreGate/WriteHandle.h"
20 #include "StoreGate/ReadHandle.h"
22 #include <CLHEP/Random/RandomEngine.h>
23 #include <CLHEP/Random/RandFlat.h>
24 
25 
31 TileDQstatusAlg::TileDQstatusAlg (const std::string& name, ISvcLocator* svcloc)
32  : AthReentrantAlgorithm (name, svcloc)
33 {
34 }
35 
36 
41 {
42  ATH_CHECK( m_tileDQstatusTool.retrieve() );
43 
45  if (!m_rawChannelContainerKey.key().empty())
47  if (!m_digitsContainerKey.key().empty())
49  if (!m_beamElemContainerKey.key().empty())
51 
52  return StatusCode::SUCCESS;
53 }
54 
55 
60 StatusCode TileDQstatusAlg::execute (const EventContext& ctx) const
61 {
62  auto dqstatus = std::make_unique<TileDQstatus>();
63 
65  if (!m_digitsContainerKey.key().empty()) {
67  }
68 
70  if (!m_rawChannelContainerKey.key().empty()) {
72  }
73 
74  const TileBeamElemContainer* tileBeamElemContainer = nullptr;
75  if (!m_beamElemContainerKey.key().empty()) {
76  tileBeamElemContainer = SG::makeHandle (m_beamElemContainerKey, ctx).get();
77  }
78 
79  ATH_CHECK( m_tileDQstatusTool->makeStatus (ctx,
82  tileBeamElemContainer,
83  *dqstatus) );
84 
85  ATH_CHECK( SG::makeHandle (m_DQstatusKey, ctx).record (std::move (dqstatus)) );
86  return StatusCode::SUCCESS;
87 }
88 
TileRawChannelContainer
Definition: TileRawChannelContainer.h:13
TileDQstatusAlg::m_tileDQstatusTool
ToolHandle< ITileDQstatusTool > m_tileDQstatusTool
Definition: TileDQstatusAlg.h:79
TileDQstatusAlg::m_DQstatusKey
SG::WriteHandleKey< TileDQstatus > m_DQstatusKey
** Properties
Definition: TileDQstatusAlg.h:67
TileDQstatusAlg::TileDQstatusAlg
TileDQstatusAlg(const std::string &name, ISvcLocator *svcloc)
Constructor.
Definition: TileDQstatusAlg.cxx:31
TileCalibUtils.h
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
TileDigitsContainer
Definition: TileDigitsContainer.h:13
TileDQstatusAlg::m_beamElemContainerKey
SG::ReadHandleKey< TileBeamElemContainer > m_beamElemContainerKey
Definition: TileDQstatusAlg.h:76
TileDQstatusAlg::m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Definition: TileDQstatusAlg.h:70
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
TileDQstatusAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Gaudi execute method.
Definition: TileDQstatusAlg.cxx:60
TileDQstatusAlg.h
Produce a TileDQstatus object. This replaces the old TileBeamInfoProvider.
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
WriteHandle.h
Handle class for recording to StoreGate.
TileHWID.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloJiveXML_DataTypes.tileDigitsContainer
string tileDigitsContainer
Definition: CaloJiveXML_DataTypes.py:11
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
TileDQstatusAlg::m_digitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
Definition: TileDQstatusAlg.h:73
TileBeamElemContainer
Definition: TileBeamElemContainer.h:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TileTBFrag.h
RNGWrapper.h
CaloJiveXML_DataTypes.tileRawChannelContainer
string tileRawChannelContainer
Definition: CaloJiveXML_DataTypes.py:12
ReadHandle.h
Handle class for reading from StoreGate.
TileDQstatusAlg::initialize
virtual StatusCode initialize() override
Gaudi initialize method.
Definition: TileDQstatusAlg.cxx:40