8#include "GaudiKernel/ServiceHandle.h"
10#include "eformat/SourceIdentifier.h"
12using eformat::helper::SourceIdentifier;
35 "Cannot write out RpcSectorLogic while running with cached RpcPad containers"
36 " as the RpcSectorLogic is not cached at the same time and the written containers will desync."
37 " Please turn off RpcSectorLogic writing when running with cached bytestream container");
38 return StatusCode::FAILURE;
43 return StatusCode::SUCCESS;
47 const ROBFragmentList& vecRobs,
const std::vector<IdentifierHash>& collections,
49 for (
auto itFrag = vecRobs.begin(); itFrag != vecRobs.end(); itFrag++) {
51 if ((**itFrag).rod_ndata() != 0) {
52 std::vector<IdentifierHash> coll =
to_be_converted(**itFrag, collections);
54 if (
m_decoder->fillCollections(**itFrag, *pad, coll, logic, decodeSL).isFailure()) {
58 if (msgLvl(MSG::DEBUG)) {
59 uint32_t sourceId = (**itFrag).source_id();
60 msg(MSG::DEBUG) <<
" ROB " << MSG::hex << sourceId <<
" is delivered with an empty payload" << MSG::dec <<
endmsg;
69 return StatusCode::SUCCESS;
73 const std::vector<IdentifierHash>& coll)
const {
77 std::vector<IdentifierHash> to_return;
80 uint32_t source_id = robFrag.rod_source_id();
81 SourceIdentifier sid(source_id);
82 to_return = (readCdo->
rod2hash(sid.subdetector_id(), sid.module_id()));
84 uint32_t source_id = robFrag.rod_source_id();
85 std::vector<IdentifierHash>::const_iterator it = coll.begin();
86 to_return.reserve(coll.size());
87 for (; it != coll.end(); ++it) {
88 if (source_id == readCdo->
hash2source(*it)) to_return.emplace_back(*it);
102 const EventContext& ctx)
const {
103 std::vector<IdentifierHash> collections;
104 ROBFragmentList vecOfRobf;
110 const EventContext& ctx)
const {
113 ROBFragmentList vecOfRobf;
114 std::vector<uint32_t> robIds;
121 const std::vector<IdentifierHash>& collections,
122 const EventContext& ctx)
const {
130 if (!externalCacheRDO) {
136 ATH_CHECK(rdoContainerHandle.
record(std::make_unique<RpcPadContainer>(update.ptr())));
144 ATH_CHECK(logicHandle.
record(std::make_unique<RpcSectorLogicContainer>()));
145 logic = logicHandle.
ptr();
151 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual size_t numberOfCollections() const override final
return number of collections
StatusCode giveROB_fromRDO(const IdentifierHash rdoHashId, uint32_t &robId) const
const std::vector< uint32_t > & giveFullListOfRobIds() const
std::vector< IdentifierHash > rod2hash(uint16_t subsystem, uint16_t rod) const
uint32_t hash2source(unsigned int h) const
Use IdentifiableContainer with RpcPad.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
eformat::ROBFragment< PointerType > ROBFragment
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.