![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/ISvcLocator.h"
16 #include "GaudiKernel/Bootstrap.h"
27 ISvcLocator* svcLocator = Gaudi::svcLocator();
32 return StatusCode::FAILURE;
37 sc = svcLocator->service(
"DetectorStore",
detStore);
40 return StatusCode::FAILURE;
49 return StatusCode::FAILURE;
56 return StatusCode::FAILURE;
60 return StatusCode::SUCCESS;
65 if (!cnv_tool)
return nullptr;
90 TRANS::const_iterator it_Coll = transCont->
begin();
91 TRANS::const_iterator it_CollEnd = transCont->
end();
92 unsigned int pcollIndex =0;
93 unsigned int pcollBegin = 0;
94 unsigned int pcollEnd = 0;
100 for (pcollIndex = 0; it_Coll != it_CollEnd; ++pcollIndex, ++it_Coll) {
107 pcollBegin = pcollEnd;
108 pcollEnd += collection.
size();
115 persCont->
m_prds.resize(pcollEnd);
118 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
119 unsigned int pchanIndex=
i+pcollBegin;
151 unsigned int pchanIndex(0);
155 for (
unsigned int pcollIndex = 0; pcollIndex < pCollEnd; ++pcollIndex) {
165 unsigned int pchanEnd = pchanIndex+pcoll.
m_size;
166 unsigned int chanIndex = 0;
170 for (; pchanIndex < pchanEnd; ++ pchanIndex, ++chanIndex) {
177 int result = m_MdtId->get_detectorElement_hash(clusId, deIDHash);
179 log << MSG::WARNING<<
" Muon::MdtPrepDataContainerCnv_p2::persToTrans: problem converting Identifier to DE hash "<<
endmsg;
182 auto chan = std::make_unique<MdtPrepData>
188 chan->setHashAndIndex(collIDHash, chanIndex);
194 if (
sc.isFailure()) {
195 throw std::runtime_error(
"Failed to add collection to Identifiable Container");
198 log <<
MSG::DEBUG <<
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = " << (
int) collIDHash <<
" / " <<
212 if(!m_isInitialized) {
213 if (this->
initialize(log) != StatusCode::SUCCESS) {
219 persToTrans(persObj, trans.get(),
log);
220 return(trans.release());
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
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,...
StatusCode initialize(MsgStream &log)
std::vector< PRD > m_prds
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
virtual void setIdentifier(Identifier id)
const MdtIdHelper * m_MdtId
The Athena Transient Store API.
virtual IdentifierHash identifyHash() const override final
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.
StoreGateSvc * m_storeGate
value_type get_compact(void) const
Get the compact id.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class to hold the persistent representation of MuonPRD_Collection.
Persistent representation of the transient Muon::MdtPrepData class.
static Muon::MdtPrepData createMdtPrepData(const Muon::MdtPrepData_p2 *persObj, const Identifier &id, const MuonGM::MdtReadoutElement *detEl, MsgStream &log)
virtual Identifier identify() const override final
const_iterator end() const
return const_iterator for end of container
const MuonGM::MdtReadoutElement * getReadOutElement(const Identifier &id) const
const_iterator begin() const
return const_iterator for first entry
std::vector< MuonPRD_Collection_p2 > m_collections
Template to hold collections of MuonPrepRawData objects.
Class to contain the Muon Prep Raw Data.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
Class to represent measurements from the Monitored Drift Tubes.
unsigned int m_hashId
Hash Identifier of this collection.
virtual Muon::MdtPrepDataContainer * createTransient(const Muon::MdtPrepDataContainer_p2 *persObj, MsgStream &log)
void transToPers(const Muon::MdtPrepData *transObj, Muon::MdtPrepData_p2 *persObj, MsgStream &log)
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
std::vector< unsigned short > m_prdDeltaId
The delta identifiers of the PRD i.e.
value_type get_compact(void) const
Get the compact id.
virtual void transToPers(const Muon::MdtPrepDataContainer *transCont, Muon::MdtPrepDataContainer_p2 *persCont, MsgStream &log)
Identifier32 get_identifier32(void) const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
virtual void persToTrans(const Muon::MdtPrepDataContainer_p2 *persCont, Muon::MdtPrepDataContainer *transCont, MsgStream &log)
size_type size() const noexcept
Returns the number of elements in the collection.
unsigned int m_id
Identifier of this collection.