|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "GaudiKernel/ISvcLocator.h"
19 #include "GaudiKernel/Bootstrap.h"
32 ISvcLocator* svcLocator = Gaudi::svcLocator();
45 return StatusCode::FAILURE;
54 return StatusCode::FAILURE;
66 return StatusCode::SUCCESS;
91 unsigned int pcollIndex;
92 unsigned int pcollBegin = 0;
93 unsigned int pcollEnd = 0;
97 for (pcollIndex = 0; it_Coll != it_CollEnd; ++pcollIndex, ++it_Coll) {
102 pcollBegin = pcollEnd;
103 pcollEnd += collection.
size();
111 persCont->
m_prds.resize(pcollEnd);
114 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
115 unsigned int pchanIndex=
i+pcollBegin;
145 unsigned int pchanIndex(0);
148 for (
unsigned int pcollIndex = 0; pcollIndex < pCollEnd; ++pcollIndex) {
155 unsigned int pchanEnd = pchanIndex+pcoll.
m_size;
156 unsigned int chanIndex = 0;
160 for (; pchanIndex < pchanEnd; ++ pchanIndex, ++chanIndex) {
166 int result = m_RpcId->get_detectorElement_hash(clusId, deIDHash);
167 if (
result)
log << MSG::WARNING <<
" Muon::RpcCoinDataContainerCnv_p1::persToTrans: problem converting Identifier to DE hash "<<
endmsg;
169 m_muonDetMgr->getRpcReadoutElement(deIDHash);
171 auto chan = std::make_unique<Muon::RpcCoinData>
177 chan->setHashAndIndex(collIDHash, chanIndex);
178 (*coll)[chanIndex] = std::move(
chan);
183 if (
sc.isFailure()) {
184 throw std::runtime_error(
"Failed to add collection to ID Container");
187 log <<
MSG::DEBUG <<
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = " << (
int) collIDHash <<
" / "
199 if(!m_isInitialized) {
200 if (this->
initialize(log) != StatusCode::SUCCESS) {
206 persToTrans(persObj, trans.get(),
log);
207 return(trans.release());
const MuonGM::MuonDetectorManager * m_muonDetMgr
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,...
std::vector< PRD > m_prds
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log)
Identifier identify() const
Persistent representation of the transient Muon::RpcCoinData class.
static Muon::RpcCoinData createRpcCoinData(const Muon::RpcCoinData_p1 *persObj, const Identifier &id, const MuonGM::RpcReadoutElement *detEl, MsgStream &log)
The Athena Transient Store API.
virtual size_t numberOfCollections() const override final
return number of collections
unsigned short m_size
Collection size into master collection Note I use a short.
value_type get_compact(void) const
Get the compact id.
MuonCoinDataCollection< RpcCoinData > RpcCoinDataCollection
::StatusCode StatusCode
StatusCode definition for legacy code.
Class to hold the persistent representation of MuonPRD_Collection.
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
std::vector< MuonPRD_Collection_p2 > m_collections
const RpcIdHelper * m_RpcId
void resize(size_type sz)
Resizes the collection to the specified number of elements.
Class to contain the Muon Prep Raw Data.
unsigned int m_hashId
Hash Identifier of this collection.
IdentifierHash identifyHash() const
std::vector< unsigned short > m_prdDeltaId
The delta identifiers of the PRD i.e.
virtual TRANS * createTransient(const PERS *persObj, MsgStream &log)
value_type get_compact(void) const
Get the compact id.
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
void setIdentifier(Identifier id)
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
StatusCode initialize(MsgStream &log)
size_type size() const noexcept
Returns the number of elements in the collection.
void transToPers(const Muon::RpcCoinData *transObj, Muon::RpcCoinData_p1 *persObj, MsgStream &log)
unsigned int m_id
Identifier of this collection.