22 return StatusCode::SUCCESS;
30 std::unique_ptr<STGC_RawDataContainer> rdos = std::make_unique<STGC_RawDataContainer>(
m_idHelperSvc->stgcIdHelper().module_hash_max());
37 return StatusCode::FAILURE;
39 sTgcCablingMap = readCondHandle.
cptr();
49 if (rdos->addCollection(coll, hash).isFailure()) {
57 for (
const sTgcDigit* digit : *digitColl) {
62 float digitTime = digit->time();
63 if (digitTime < lowerTimeBound || digitTime >= lowerTimeBound + BCWindow * 25)
continue;
66 std::optional<Identifier> correctedChannelId = sTgcCablingMap->
correctChannel(
id, msgStream());
67 if (!correctedChannelId) {
68 ATH_MSG_DEBUG(
"Channel was shifted outside its connector and is therefore not decoded into and RDO");
71 id = (*correctedChannelId);
73 bool isDead = digit->isDead();
74 int tdo{0}, pdo{0}, relBCID{0};
75 m_calibTool->timeToTdo(ctx, digitTime,
id, tdo, relBCID);
76 m_calibTool->chargeToPdo(ctx, digit->charge(),
id, pdo);
78 static_cast<unsigned int>(tdo),
static_cast<unsigned int>(pdo), isDead,
true);
87 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
An algorithm that can be simultaneously executed in multiple threads.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
This is a "hash" representation of an Identifier.
static constexpr int s_BCWindow
static constexpr double s_lowerTimeBound
std::optional< Identifier > correctChannel(const Identifier &id, MsgStream &msg) const
const_pointer_type cptr()
bool isPresent() const
Is the referenced object present in SG?
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
ToolHandle< Muon::INSWCalibTool > m_calibTool
virtual StatusCode initialize() override final
STGC_DigitToRDO(const std::string &name, ISvcLocator *pSvcLocator)
SG::ReadCondHandleKey< Nsw_CablingMap > m_cablingKey
SG::WriteHandleKey< Muon::STGC_RawDataContainer > m_rdoContainer
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual StatusCode execute(const EventContext &ctx) const override final
SG::ReadHandleKey< sTgcDigitContainer > m_digitContainer
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.