ATLAS Offline Software
Loading...
Searching...
No Matches
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
10 ISvcLocator* pSvcLocator)
11 : AthReentrantAlgorithm(name, pSvcLocator)
12{
13}
14
16
17StatusCode
19{
20 ATH_CHECK(m_digitContainerKey.initialize());
22 return StatusCode::SUCCESS;
23}
24
25StatusCode
26LUCID_DigitRawDataCnv::execute(const EventContext& ctx) const
27{
28
30
31 if (!digitContainer.isValid()) {
32 ATH_MSG_WARNING("BAD DATA!!! Input data does not include "
34 return StatusCode::SUCCESS;
35 }
37 for (const LUCID_Digit* digit : *digitContainer) {
38 m_rodEncoder.addDigit(digit,cache);
39 }
40
41 std::vector<uint32_t> data_block;
42 m_rodEncoder.encode(data_block, cache,msg());
43 data_block.push_back(0); // add status word
44
45 auto container = std::make_unique<LUCID_RawDataContainer>();
46 container->push_back(new LUCID_RawData(data_block));
48 .record(std::move(container)));
49
50 return StatusCode::SUCCESS;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Handle class for reading from StoreGate.
Handle class for recording to StoreGate.
An algorithm that can be simultaneously executed in multiple threads.
StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKey< LUCID_RawDataContainer > m_lucid_RawDataContainerKey
SG::ReadHandleKey< LUCID_DigitContainer > m_digitContainerKey
LUCID_DigitRawDataCnv(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize() override
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())