12#include "GaudiKernel/Bootstrap.h"
13#include "GaudiKernel/StatusCode.h"
14#include "GaudiKernel/Service.h"
15#include "GaudiKernel/MsgStream.h"
32 log << MSG::DEBUG <<
"Converter initialized." <<
endmsg;
45 unsigned int collIndex;
48 persCont->resize(numColl); log << MSG::DEBUG <<
" Preparing " << persCont->size() <<
"Collections" <<
endmsg;
50 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
52 RpcPad_p1* pcoll = &( (*persCont)[collIndex] );
55 log << MSG::DEBUG <<
" *** Writing RpcPadContainer ***" <<
endmsg;
62 if (!rpcCab.
isValid()||!rpcCabling) {
68 log << MSG::DEBUG <<
" Reading " << persCont->size() <<
"Collections" <<
endmsg;
69 for (
unsigned int icoll = 0; icoll < persCont->size(); ++icoll) {
72 cnv.
persToTrans( &( (*persCont)[icoll]), coll, log);
74 int temp = rpcCabling->operator()(coll->
identify());
77 log<<MSG::WARNING<<
"get_hash failed - nothing else we can try!"<<
endmsg;
85 log << MSG::WARNING<<
"Collection with hash="<<coll->
identifyHash()<<
" already exists in container (with "<<ptr->size()<<
" elements). "
86 <<
"Will therefore DISCARD this collection which has "<<coll->
size()<<
" elements)!"<<
endmsg;
91 log << MSG::WARNING<<
"Could not add collection with hash="<<coll->
identifyHash()
92 <<
" to IDC which has hash max of "<<transCont->
size()<<
" (PadHashFunction gives "<<rpcCabling->
max()<<
")"<<
endmsg;
93 throw std::runtime_error(
"Failed to add collection to ID Container. Hash = "+std::to_string(coll->
identifyHash()));
98 log << MSG::DEBUG <<
" *** Reading RpcPadContainer" <<
endmsg;
107 if (this->
initialize(log) != StatusCode::SUCCESS) {
108 log << MSG::FATAL <<
"Could not initialize RpcPadContainerCnv_p1 " <<
endmsg;
114 if (!rpcCab.
isValid()||!rpcCabling) {
120 return(trans.release());
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcPadContainer
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator end() const
return const_iterator for end of container
virtual size_t numberOfCollections() const override final
return number of collections
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
size_t size() const
Duplicate of fullSize for backwards compatability.
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
const_iterator begin() const
return const_iterator for first entry
This is a "hash" representation of an Identifier.
virtual void persToTrans(const RpcPad_p1 *persColl, RpcPad *transColl, MsgStream &log)
Converts vector of PERS::value_type objects to vector of TRANS::value_type objects,...
virtual void transToPers(const RpcPad *transColl, RpcPad_p1 *persColl, MsgStream &log)
Converts vector of TRANS::value_type objects to vector of PERS::value_type objects,...
StatusCode initialize(MsgStream &log)
SG::ReadCondHandleKey< RpcCablingCondData > m_rpcCabKey
virtual RpcPadContainer * createTransient(const RpcPadContainer_p1 *persObj, MsgStream &log) override
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log) override
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log) override
Use IdentifiableContainer with RpcPad.
Identifier identify() const
IdentifierHash identifyHash() const
Returns the OFFLINE identifier hash for this collection.