ATLAS Offline Software
LUCID_DigitRawDataCnv.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 
7 #include "GaudiKernel/ThreadLocalContext.h"
8 #include "StoreGate/ReadHandle.h"
11  ISvcLocator* pSvcLocator)
12  : AthReentrantAlgorithm(name, pSvcLocator)
13 {
14 }
15 
17 
20 {
23  return StatusCode::SUCCESS;
24 }
25 
27 LUCID_DigitRawDataCnv::execute(const EventContext& ctx) const
28 {
29 
31 
32  if (!digitContainer.isValid()) {
33  ATH_MSG_WARNING("BAD DATA!!! Input data does not include "
35  return StatusCode::SUCCESS;
36  }
38  for (const LUCID_Digit* digit : *digitContainer) {
40  }
41 
42  std::vector<uint32_t> data_block;
43  m_rodEncoder.encode(data_block, cache,msg());
44  data_block.push_back(0); // add status word
45 
46  auto container = std::make_unique<LUCID_RawDataContainer>();
47  container->push_back(new LUCID_RawData(data_block));
49  .record(std::move(container)));
50 
51  return StatusCode::SUCCESS;
52 }
LUCID_DigitRawDataCnv::m_rodEncoder
LUCID_RodEncoder m_rodEncoder
Definition: LUCID_DigitRawDataCnv.h:43
LUCID_DigitRawDataCnv.LUCID_DigitRawDataCnv
LUCID_DigitRawDataCnv
Definition: LUCID_DigitRawDataCnv.py:8
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
LUCID_DigitRawDataCnv::initialize
StatusCode initialize() override
Definition: LUCID_DigitRawDataCnv.cxx:19
checkRpcDigits.digit
digit
Definition: checkRpcDigits.py:186
LUCID_DigitRawDataCnv::m_lucid_RawDataContainerKey
SG::WriteHandleKey< LUCID_RawDataContainer > m_lucid_RawDataContainerKey
Definition: LUCID_DigitRawDataCnv.h:34
LUCID_RawData
Definition: LUCID_RawData.h:40
LUCID_DigitRawDataCnv.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
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.
LUCID_RodEncoder::encode
void encode(std::vector< uint32_t > &data_block, Cache &cache, MsgStream &log) const
Definition: LUCID_RodEncoder.cxx:12
LUCID_Digit
Definition: LUCID_Digit.h:8
LUCID_RodEncoder::Cache
Definition: LUCID_RodEncoder.h:24
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
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
LUCID_DigitRawDataCnv::m_digitContainerKey
SG::ReadHandleKey< LUCID_DigitContainer > m_digitContainerKey
Definition: LUCID_DigitRawDataCnv.h:41
LUCID_DigitRawDataCnv::execute
StatusCode execute(const EventContext &ctx) const override
Definition: LUCID_DigitRawDataCnv.cxx:27
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< Gaudi::Algorithm >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
ReadHandle.h
Handle class for reading from StoreGate.
LUCID_DigitRawDataCnv::~LUCID_DigitRawDataCnv
~LUCID_DigitRawDataCnv()
Definition: LUCID_DigitRawDataCnv.cxx:16
LUCID_RodEncoder::addDigit
void addDigit(const LUCID_Digit *digit, Cache &cache) const
Definition: LUCID_RodEncoder.h:35