|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #include "GaudiKernel/ISvcLocator.h"
15 #include "GaudiKernel/Bootstrap.h"
16 #include "GaudiKernel/StatusCode.h"
17 #include "GaudiKernel/Service.h"
18 #include "GaudiKernel/MsgStream.h"
32 ISvcLocator* svcLocator = Gaudi::svcLocator();
37 return StatusCode::FAILURE;
42 sc = svcLocator->service(
"DetectorStore",
detStore);
45 return StatusCode::FAILURE;
54 return StatusCode::FAILURE;
61 return StatusCode::FAILURE;
65 return StatusCode::SUCCESS;
69 if (!cnv_tool)
return nullptr;
96 unsigned int collIndex = 0;
97 unsigned int chanBegin = 0;
98 unsigned int chanEnd = 0;
103 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
108 chanEnd += collection.
size();
112 pcollection.
m_begin = chanBegin;
113 pcollection.
m_end = chanEnd;
115 persCont->
m_PRD.resize(chanEnd);
116 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
118 persCont->
m_PRD[
i + chanBegin] = toPersistent((CONV**)
nullptr,
chan,
log );
148 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
164 log << MSG::ERROR <<
"AthenaPoolTPCnvIDCont::persToTrans: Cannot get RpcPrepData!" <<
endmsg;
174 if (
sc.isFailure()) {
175 throw std::runtime_error(
"Failed to add collection to ID Container");
178 log <<
MSG::DEBUG <<
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = " << (
int) collIDHash <<
" / " <<
191 if(!m_isInitialized) {
192 if (this->
initialize(log) != StatusCode::SUCCESS) {
198 persToTrans(persObj, trans.get(),
log);
199 return(trans.release());
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
std::vector< Muon::MuonPRD_Collection_p1 > m_collections
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,...
unsigned int m_id
Identifier of this collection.
unsigned int m_hashId
Hash Identifier of this collection (write this one as well, so we don't rely on the IdHelper for it)
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
unsigned int m_end
End index into master collection.
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
virtual void setIdentifier(Identifier id)
StatusCode initialize(MsgStream &log)
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log)
StoreGateSvc * m_storeGate
const MuonGM::RpcReadoutElement * getReadOutElement(const Identifier &id) const
The Athena Transient Store API.
virtual IdentifierHash identifyHash() const override final
virtual size_t numberOfCollections() const override final
return number of collections
value_type get_compact(void) const
Get the compact id.
Class to represent RPC measurements.
::StatusCode StatusCode
StatusCode definition for legacy code.
virtual Identifier identify() const override final
const RpcIdHelper * m_RpcId
const_iterator end() const
return const_iterator for end of container
const_iterator begin() const
return const_iterator for first entry
Template to hold collections of MuonPrepRawData objects.
void resize(size_type sz)
Resizes the collection to the specified number of elements.
unsigned int m_begin
Begin index into master collection.
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
std::vector< TPObjRef > m_PRD
virtual Muon::RpcPrepDataContainer * createTransient(const Muon::MuonPRD_Container_p1 *persObj, MsgStream &log)
value_type get_compact(void) const
Get the compact id.
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
size_type size() const noexcept
Returns the number of elements in the collection.