|
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"
34 SmartIF<StoreGateSvc>
detStore{Gaudi::svcLocator()->service(
"DetectorStore")};
43 return StatusCode::SUCCESS;
47 if (!cnv_tool)
return nullptr;
74 unsigned int collIndex = 0;
75 unsigned int chanBegin = 0;
76 unsigned int chanEnd = 0;
82 for (collIndex = 0; it_Coll != it_CollEnd; ++collIndex, ++it_Coll) {
87 chanEnd += collection.
size();
91 pcollection.
m_begin = chanBegin;
92 pcollection.
m_end = chanEnd;
94 persCont->
m_PRD.resize(chanEnd);
95 for (
unsigned int i = 0;
i < collection.
size(); ++
i) {
97 persCont->
m_PRD[
i + chanBegin] = toPersistent((CONV**)
nullptr,
chan,
log );
127 for (
unsigned int icoll = 0; icoll < persCont->
m_collections.size(); ++icoll) {
142 log << MSG::ERROR <<
"RpcPrepDataContainerCnv_p1::persToTrans: Cannot get RpcPrepData!" <<
endmsg;
156 std::optional<Amg::Vector2D>
pos = surf.Trk::Surface::globalToLocal(globalposHIT,
tolerance);
158 log << MSG::WARNING <<
"RpcPrepDataContainerCnv_p1::persToTrans - globalToLocal failed!"<<
endmsg;
167 if (
sc.isFailure()) {
168 throw std::runtime_error(
"Failed to add collection to ID Container");
171 log <<
MSG::DEBUG <<
"AthenaPoolTPCnvIDCont::persToTrans, collection, hash_id/coll id = " << (
int) collIDHash <<
" / " <<
184 if(!m_isInitialized) {
185 if (this->
initialize(log) != StatusCode::SUCCESS) {
191 persToTrans(persObj, trans.get(),
log);
192 return(trans.release());
virtual void transToPers(const TRANS *transCont, PERS *persCont, MsgStream &log)
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
std::vector< Muon::MuonPRD_Collection_p1 > m_collections
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
StatusCode initialize(MsgStream &log)
ToolHandle< Trk::IEventCnvSuperTool > m_eventCnvTool
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)
int nGasGapPerLay() const
returns the number of gasgaps
Eigen::Matrix< double, 2, 1 > Vector2D
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
unsigned int m_end
End index into master collection.
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 setIdentifier(Identifier id)
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
value_type get_compact() const
Get the compact id.
virtual void persToTrans(const PERS *persCont, TRANS *transCont, MsgStream &log)
const MuonGM::RpcReadoutElement * getReadOutElement(const Identifier &id) const
virtual IdentifierHash identifyHash() const override final
virtual size_t numberOfCollections() const override final
return number of collections
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
#define CHECK(...)
Evaluate an expression and check for errors.
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.
Amg::Vector3D stripPos(const Identifier &id) const
Helpers for checking error return status codes and reporting errors.
unsigned int m_begin
Begin index into master collection.
Eigen::Matrix< double, 3, 1 > Vector3D
std::vector< TPObjRef > m_PRD
virtual Muon::RpcPrepDataContainer * createTransient(const Muon::MuonPRD_Container_p1 *persObj, MsgStream &log)
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.