ATLAS Offline Software
Loading...
Searching...
No Matches
Muon::RpcRDO_Decoder Class Reference

#include <RpcRDO_Decoder.h>

Inheritance diagram for Muon::RpcRDO_Decoder:
Collaboration diagram for Muon::RpcRDO_Decoder:

Public Member Functions

 RpcRDO_Decoder (const std::string &type, const std::string &name, const IInterface *parent)
 ~RpcRDO_Decoder ()=default
virtual StatusCode initialize () override
virtual std::vector< std::unique_ptr< RpcDigit > > getDigit (const RpcFiredChannel *fChan, uint16_t &sectorID, uint16_t &padId, uint16_t &cmaId, const RpcCablingCondData *rpcCab) const override
virtual std::vector< IdentifiergetOfflineData (const RpcFiredChannel *fChan, uint16_t &sectorID, uint16_t &padId, uint16_t &cmaId, double &time, const RpcCablingCondData *rpcCab) const override

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Gaudi::Property< int > m_bczero { this, "BCZERO", 3, "Nominal BC for RPC readout"}

Detailed Description

Definition at line 29 of file RpcRDO_Decoder.h.

Constructor & Destructor Documentation

◆ RpcRDO_Decoder()

Muon::RpcRDO_Decoder::RpcRDO_Decoder ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 11 of file RpcRDO_Decoder.cxx.

11 :
12 base_class(type, name, parent) {}

◆ ~RpcRDO_Decoder()

Muon::RpcRDO_Decoder::~RpcRDO_Decoder ( )
default

Member Function Documentation

◆ getDigit()

std::vector< std::unique_ptr< RpcDigit > > Muon::RpcRDO_Decoder::getDigit ( const RpcFiredChannel * fChan,
uint16_t & sectorID,
uint16_t & padId,
uint16_t & cmaId,
const RpcCablingCondData * rpcCab ) const
overridevirtual

Definition at line 20 of file RpcRDO_Decoder.cxx.

21 {
22 std::vector<std::unique_ptr<RpcDigit>> rpcDigitVec{};
23
24 uint16_t side = (sectorID < 32) ? 0 : 1;
25 uint16_t slogic = sectorID - side * 32;
26 uint16_t ijk = fChan->ijk();
27 uint16_t channel = fChan->channel();
28
29 float time = (fChan->bcid() - m_bczero) * 25 + (fChan->time() + 0.5 - 2) * 3.125;
30
31 // skip the trigger hits
32 if (ijk == 7) { return rpcDigitVec; }
33
34 // Get the list of offline channels corresponding to the
35 // online identifier
36 std::list<Identifier> idList = rpcCab->give_strip_id(side, slogic, padId, cmaId, ijk, channel, &m_idHelperSvc->rpcIdHelper());
37
38 rpcDigitVec.reserve(idList.size());
39 for (const Identifier& stripOfflineId: idList) {
40 // and add the digit to the collection
41 std::unique_ptr<RpcDigit> rpcDigit = std::make_unique<RpcDigit>(stripOfflineId, time, -1., false);
42 rpcDigitVec.push_back(std::move(rpcDigit));
43 }
44
45 return rpcDigitVec;
46}
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Gaudi::Property< int > m_bczero
std::list< Identifier > give_strip_id(unsigned short int SubsystemId, unsigned short int SectorId, unsigned short int PADId, unsigned short int CMAId, unsigned short ijk, unsigned short int Channel, const RpcIdHelper *rpcId) const
ubit16 bcid() const
ubit16 channel() const
ubit16 ijk() const
ubit16 time() const
time(flags, cells_name, *args, **kw)
setWord1 uint16_t

◆ getOfflineData()

std::vector< Identifier > Muon::RpcRDO_Decoder::getOfflineData ( const RpcFiredChannel * fChan,
uint16_t & sectorID,
uint16_t & padId,
uint16_t & cmaId,
double & time,
const RpcCablingCondData * rpcCab ) const
overridevirtual

Definition at line 48 of file RpcRDO_Decoder.cxx.

49 {
50 std::vector<Identifier> rpcIdVec{};
51
52 uint16_t side = (sectorID < 32) ? 0 : 1;
53 uint16_t slogic = sectorID - side * 32;
54 uint16_t ijk = fChan->ijk();
55 uint16_t channel = fChan->channel();
56
57 time = (fChan->bcid() - m_bczero) * 25 + (fChan->time() + 0.5 - 2) * 3.125;
58
59 // skip the trigger hits
60 if (ijk == 7) { return rpcIdVec; }
61
62 // Get the list of offline channels corresponding to the
63 // online identifier
64 std::list<Identifier> idList = rpcCab->give_strip_id(side, slogic, padId, cmaId, ijk, channel, &m_idHelperSvc->rpcIdHelper());
65
66 rpcIdVec.assign(idList.begin(), idList.end());
67
68 return rpcIdVec;
69}

◆ initialize()

StatusCode Muon::RpcRDO_Decoder::initialize ( )
overridevirtual

Definition at line 14 of file RpcRDO_Decoder.cxx.

14 {
15 ATH_MSG_DEBUG("initialize");
16 ATH_CHECK(m_idHelperSvc.retrieve());
17 return StatusCode::SUCCESS;
18}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x)

Member Data Documentation

◆ m_bczero

Gaudi::Property<int> Muon::RpcRDO_Decoder::m_bczero { this, "BCZERO", 3, "Nominal BC for RPC readout"}
private

Definition at line 44 of file RpcRDO_Decoder.h.

44{ this, "BCZERO", 3, "Nominal BC for RPC readout"};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> Muon::RpcRDO_Decoder::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 43 of file RpcRDO_Decoder.h.

43{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

The documentation for this class was generated from the following files: