|
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/PhysicalConstants.h"
16 return StatusCode::SUCCESS;
21 return StatusCode::SUCCESS;
23 std::unique_ptr<RpcDigitCollection> new_coll = std::make_unique<RpcDigitCollection>(elementId,
hash);
24 coll = new_coll.get();
26 if(lock.
addOrDelete(std::move(new_coll)).isFailure()){
27 msg<<MSG::ERROR<<
" Failed to add digit collection "<<elementId<<
endmsg;
29 return StatusCode::FAILURE;
32 return StatusCode::SUCCESS;
47 return StatusCode::SUCCESS;
56 return StatusCode::SUCCESS;
68 for (
const RpcPad* rpcPad : *rdoContainer) {
69 if (!rpcPad->empty()) {
ATH_CHECK(
decodeRpc(rpcPad, temp_out, cablingCondData.cptr())); }
73 return StatusCode::SUCCESS;
86 uint16_t cmaId = coinMatrix->onlineId();
96 if (digitVec.empty())
continue;
100 for (std::unique_ptr<RpcDigit>& newDigit : digitVec) {
103 if (
m_idHelperSvc->rpcIdHelper().get_module_hash(elementId, coll_hash)) {
104 ATH_MSG_ERROR(
"Unable to get RPC digit collection hash id the identifier is "
106 return StatusCode::FAILURE;
110 collection->push_back(std::move(newDigit));
114 return StatusCode::SUCCESS;
119 return StatusCode::SUCCESS;
123 if (!rdoContainer.isValid()) {
125 return StatusCode::FAILURE;
130 return StatusCode::FAILURE;
133 if (!muonDetMgr.isValid()) {
134 ATH_MSG_FATAL(
"Failed to retrieve the readout geometry "<<muonDetMgr.fullKey());
135 return StatusCode::FAILURE;
138 std::map<IdentifierHash, std::unique_ptr<RpcDigitCollection>> digit_map{};
141 ATH_MSG_VERBOSE(
"Convert RDO tdcSector: "<<
static_cast<int>(rdo->tdcsector())<<
", tdc:"
142 <<
static_cast<int>(rdo->tdc())<<
" channel: "<<
static_cast<int>(rdo->channel()) <<
", time: "<<
143 rdo->time()<<
", ToT: "<<rdo->timeoverthr());
148 conv_obj.tdcSector = rdo->tdcsector();
149 conv_obj.tdc = rdo->tdc();
150 conv_obj.channelId = rdo->channel();
152 if (!
cabling->getOfflineId(conv_obj, msgStream())) {
154 return StatusCode::FAILURE;
157 if (!
cabling->convert(conv_obj, chanId)) {
158 return StatusCode::FAILURE;
162 std::unique_ptr<RpcDigitCollection>& coll = digit_map[modHash];
165 coll = std::make_unique<RpcDigitCollection>(id_helper.
elementID(chanId), modHash);
169 const float digit_time = rdo->time();
171 + inverseSpeedOfLight * (muonDetMgr->getRpcReadoutElement(chanId)->stripPos(chanId)).
mag() : rdo->timeoverthr() ;
173 std::unique_ptr<RpcDigit>
digit = std::make_unique<RpcDigit>(chanId, digit_time, ToT, conv_obj.stripSide());
177 for (
auto& [
hash, coll] : digit_map){
178 if (coll->empty())
continue;
182 return StatusCode::SUCCESS;
std::map< IdentifierHash, RpcDigitCollection * > m_digitMap
RpcDigitContainer * m_cont
SG::ReadHandleKey< RpcPadContainer > m_rpcRdoKey
const_pointer_type cptr()
Dereference the pointer.
IDC_WriteHandle getWriteHandle(IdentifierHash hash)
Identifier elementID(int stationName, int stationEta, int stationPhi, int doubletR) const
StatusCode decodeNRpc(const EventContext &ctx, RpcDigitContainer &container) const
Use IdentifiableContainer with RpcDigitCollection.
size_t size() const
Duplicate of fullSize for backwards compatability.
int16_t & subDetector
Identifier of the subdetector region in the readout BA / BC etc.
SG::ReadHandleKey< xAOD::NRPCRDOContainer > m_nRpcRdoKey
#define ATH_MSG_VERBOSE(x)
SG::ReadCondHandleKey< MuonNRPC_CablingMap > m_nRpcCablingKey
Gaudi::Property< bool > m_patch_for_rpc_time
StatusCode decodeRpc(const RpcPad *, TempDigitContainer &container, const RpcCablingCondData *rpcCab) const
An algorithm that can be simultaneously executed in multiple threads.
SG::ReadCondHandleKey< RpcCablingCondData > m_rpcReadKey
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
Cabling information shipped around the Digi <-> Rdo conversions.
ToolHandle< Muon::IRPC_RDO_Decoder > m_rpcRdoDecoderTool
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual bool isValid() override final
Can the handle be successfully dereferenced?
RpcDigitCollection * m_lastColl
virtual StatusCode initialize() override final
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
StatusCode findCollection(const Identifier &elementId, const IdentifierHash &hash, RpcDigitCollection *&coll, MsgStream &msg)
StatusCode addOrDelete(std::unique_ptr< T > ptr)
IdentifierHash identifierHash() const
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
#define ATH_MSG_WARNING(x)
RpcRdoToRpcDigit(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_decodeNrpcRDO
size_type size() const noexcept
Returns the number of elements in the collection.
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
Scalar mag() const
mag method
virtual StatusCode execute(const EventContext &ctx) const override final
SG::WriteHandleKey< RpcDigitContainer > m_rpcDigitKey
Use IdentifiableContainer with RpcPad.