Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "GaudiKernel/ISvcLocator.h"
19 #include "GaudiKernel/Bootstrap.h"
32 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
42 return StatusCode::SUCCESS;
67 unsigned int pcollIndex;
68 unsigned int pcollBegin = 0;
69 unsigned int pcollEnd = 0;
73 for (pcollIndex = 0; it_Coll != it_CollEnd; ++pcollIndex, ++it_Coll) {
78 pcollBegin = pcollEnd;
79 pcollEnd += collection.
size();
87 persCont->
m_prds.resize(pcollEnd);
90 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
91 unsigned int pchanIndex=
i+pcollBegin;
121 unsigned int pchanIndex(0);
124 for (
unsigned int pcollIndex = 0; pcollIndex < pCollEnd; ++pcollIndex) {
131 unsigned int pchanEnd = pchanIndex+pcoll.
m_size;
132 unsigned int chanIndex = 0;
136 for (; pchanIndex < pchanEnd; ++ pchanIndex, ++chanIndex) {
142 int result = m_RpcId->get_detectorElement_hash(clusId, deIDHash);
143 if (
result)
log << MSG::WARNING <<
" Muon::RpcCoinDataContainerCnv_p1::persToTrans: problem converting Identifier to DE hash "<<
endmsg;
145 m_muonDetMgr->getRpcReadoutElement(deIDHash);
147 auto chan = std::make_unique<Muon::RpcCoinData>
153 chan->setHashAndIndex(collIDHash, chanIndex);
154 (*coll)[chanIndex] = std::move(
chan);
159 if (
sc.isFailure()) {
160 throw std::runtime_error(
"Failed to add collection to ID Container");
163 log <<
MSG::DEBUG <<
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = " << (
int) collIDHash <<
" / "
175 if(!m_isInitialized) {
176 if (this->
initialize(log) != StatusCode::SUCCESS) {
182 persToTrans(persObj, trans.get(),
log);
183 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
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
value_type get_compact() const
Get the compact id.
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
value_type get_compact() const
Get the compact id.
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)
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.
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
#define CHECK(...)
Evaluate an expression and check for errors.
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.
Helpers for checking error return status codes and reporting errors.
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)
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
void setIdentifier(Identifier id)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
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.