19 return StatusCode::SUCCESS;
28 std::vector<std::unique_ptr<Muon::RpcPrepDataCollection>> prdCollections{};
30 prdCollections.resize(idHelper.module_hash_max());
35 std::unique_ptr<Muon::RpcPrepDataCollection>& coll = prdCollections[
m_idHelperSvc->moduleHash(measId)];
37 coll = std::make_unique<Muon::RpcPrepDataCollection>(
m_idHelperSvc->moduleHash(measId));
43 std::unique_ptr<Muon::RpcPrepData> prd{};
44 std::vector<Identifier> rdo{measId};
46 if (meas->numDimensions() == 1) {
47 prd = std::make_unique<Muon::RpcPrepData>(measId, coll->
identifyHash(),
48 meas->localPosition<1>().x() * Amg::Vector2D::UnitX(),
51 outEle, meas->time(), meas->timeOverThreshold(), 0, 0);
53 prd = std::make_unique<Muon::RpcPrepData>(measId, coll->
identifyHash(),
54 xAOD::toEigen(meas->localPosition<2>()),
56 xAOD::toEigen(meas->localCovariance<2>()),
57 outEle, meas->time(), meas->timeOverThreshold(), 0, 0);
63 auto outContainer = std::make_unique<Muon::RpcPrepDataContainer>(idHelper.module_hash_max());
64 for (std::unique_ptr<Muon::RpcPrepDataCollection>& coll : prdCollections){
70 ATH_CHECK(writeHandle.record(std::move(outContainer)));
72 return StatusCode::SUCCESS;