|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "GaudiKernel/ISvcLocator.h"
16 #include "GaudiKernel/Bootstrap.h"
17 #include "GaudiKernel/StatusCode.h"
18 #include "GaudiKernel/Service.h"
19 #include "GaudiKernel/MsgStream.h"
32 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
41 return StatusCode::SUCCESS;
68 unsigned int collIndex;
69 unsigned int chanBegin = 0;
70 unsigned int chanEnd = 0;
80 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
85 chanEnd += collection.
size();
89 pcollection.
m_begin = chanBegin;
90 pcollection.
m_end = chanEnd;
93 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
125 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
143 chan->m_detElOut = deOut;
148 chan->m_detElIn = deIn;
151 chan->m_detElIn =
nullptr;
158 if (
sc.isFailure()) {
159 throw std::runtime_error(
"Failed to add collection to ID Container");
162 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());
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,...
virtual Muon::TgcCoinDataContainer * createTransient(const Muon::MuonCoinDataContainer_p1 *persObj, MsgStream &log)
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.
Identifier identify() const
MuonCoinDataCollection< TgcCoinData > TgcCoinDataCollection
value_type get_compact() const
Get the compact id.
std::vector< Muon::MuonCoinDataCollection_p1 > m_collections
const MuonGM::MuonDetectorManager * m_muonDetMgr
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
virtual size_t numberOfCollections() const override final
return number of collections
::StatusCode StatusCode
StatusCode definition for legacy code.
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
std::vector< TPObjRef > m_CoinData
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
unsigned int m_hashId
Hash Identifier of this collection (write this one as well, so we don't rely on the IdHelper for it)
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log)
const TgcIdHelper * m_TgcId
void resize(size_type sz)
Resizes the collection to the specified number of elements.
unsigned int m_end
End index into master collection.
StatusCode initialize(MsgStream &log)
Helpers for checking error return status codes and reporting errors.
IdentifierHash identifyHash() const
unsigned int m_begin
Begin index into master collection.
void setIdentifier(Identifier id)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
size_type size() const noexcept
Returns the number of elements in the collection.
unsigned int m_id
Identifier of this collection.