![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #include "GaudiKernel/Bootstrap.h"
6 #include "GaudiKernel/GaudiException.h"
7 #include "GaudiKernel/ISvcLocator.h"
8 #include "GaudiKernel/IMessageSvc.h"
9 #include "GaudiKernel/StatusCode.h"
25 ISvcLocator* svcLoc = Gaudi::svcLocator( );
28 if (
sc.isFailure()) std::cout <<
"Fail to locate Message Service" << std::endl;
30 MsgStream
log(
msgSvc,
"MuonDigitContainer" );
36 sc = svcLoc->service(
"DetectorStore",
detStore);
39 sc =
detStore->retrieve( mdtHelper,
"MDTIDHELPER" );
41 log << MSG::ERROR <<
" Cannot retrieve MdtIdHelper " <<
endmsg;
43 log << MSG::ERROR <<
" MdtIdHelper not found in DetectorStore " <<
endmsg;
45 if (!
sc.isSuccess())
throw GaudiException(
"can not get MdtIdHelper",
46 "MdtCsmIdHash::MdtCsmIdHash()",
sc);
62 }
else log << MSG::ERROR <<
"MDT hash constructor failed!" <<
endmsg;
75 std::cout <<
" MdtCsmIdHash::ERROR : identifier invalid ID "<<std::endl;
83 std::map<ID,int>::const_iterator
it =
m_lookup.find(
id);
int stationNameIndex(const std::string &name) const
IdContext detectorElement_context() const
id for detector element
virtual int get_id(const IdentifierHash &hash_id, Identifier &id, const IdContext *context=0) const override
Create compact id from hash id (return == 0 for OK)
size_type detectorElement_hash_max() const
int m_size
total number of IDs
std::vector< ID > m_int2id
reverse lookup
The Athena Transient Store API.
msgSvc
Provide convenience handles for various services.
::StatusCode StatusCode
StatusCode definition for legacy code.
int max() const
return maximum number of IDs
static int offset()
return offset
size_type module_hash_max() const
the maximum hash value
int operator()(const ID &id) const
Convert ID to int.
IdContext module_context() const
id for module
std::map< Identifier, int > m_lookup
lookup table
ID identifier(int i) const
reverse conversion