ATLAS Offline Software
Loading...
Searching...
No Matches
MuCTPI_MultiplicityWord_Decoder Class Reference

Class helping to decode the MuCTPI multiplicity words. More...

#include <MuCTPI_MultiplicityWord_Decoder.h>

Collaboration diagram for MuCTPI_MultiplicityWord_Decoder:

Public Types

enum  TriggerMode_t { inclusive , exclusive }
 Possible trigger threshold modes. More...

Public Member Functions

 MuCTPI_MultiplicityWord_Decoder (const uint32_t multword=0, const TriggerMode_t mode=exclusive)
 Constructor.
 MuCTPI_MultiplicityWord_Decoder (const uint32_t multword, const bool inclusiveTriggerMode)
 Constructor.
 ~MuCTPI_MultiplicityWord_Decoder ()=default
 Destructor.
uint16_t getNCandidates () const
 Function returning the total number of muon candidates.
uint16_t getMultiplicity (const uint16_t candidateNumber) const
 Function returning the 3-bit candidate multiplicity for the specified threshold.
uint16_t getBCID () const
 Function returning the 3-bit BCID fragment in the multiplicity word.
void setWord (const uint32_t word)
 Function setting the MuCTPI multiplicity word.
uint32_t getWord () const
 Function returning the MuCTPI multiplicity word.
void dumpData () const
 Function dumping the stored information to the message stream.
void dumpData (MsgStream &log) const
 Function dumping the stored information to the message stream.

Private Attributes

uint32_t m_multiplicityWord
 The 32-bit multiplicity word to decode.
TriggerMode_t m_triggerMode
 Trigger threshold mode (inclusive/exclusive)

Detailed Description

Class helping to decode the MuCTPI multiplicity words.

Date
2007-09-27 15:22:34
   The multiplicity word(s) in the MuCTPI readout data store the number
   of collected LVL1 muon candidates in 6 p<sub>T</sub> thresholds in (a)
   32-bit word(s). This class can help in decoding such a multiplicity word.

   For a detailed description of the data format of the MuCTPI, see
   the MIROD documentation (https://edms.cern.ch/file/248757/1/mirod.pdf).
Author
David Berge David.nosp@m..Ber.nosp@m.ge@ce.nosp@m.rn.c.nosp@m.h
Version
Revision
1.5

Definition at line 32 of file MuCTPI_MultiplicityWord_Decoder.h.

Member Enumeration Documentation

◆ TriggerMode_t

Constructor & Destructor Documentation

◆ MuCTPI_MultiplicityWord_Decoder() [1/2]

MuCTPI_MultiplicityWord_Decoder::MuCTPI_MultiplicityWord_Decoder ( const uint32_t multword = 0,
const TriggerMode_t mode = exclusive )

Constructor.

The constructor only has to give an initial value to MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord stored in the object.

Parameters
multwordThe 32-bit MuCTPI multiplicity word that you want to decode

Definition at line 23 of file MuCTPI_MultiplicityWord_Decoder.cxx.

24 : m_multiplicityWord( multword ), m_triggerMode(mode) {
25
26}
uint32_t m_multiplicityWord
The 32-bit multiplicity word to decode.
TriggerMode_t m_triggerMode
Trigger threshold mode (inclusive/exclusive)

◆ MuCTPI_MultiplicityWord_Decoder() [2/2]

MuCTPI_MultiplicityWord_Decoder::MuCTPI_MultiplicityWord_Decoder ( const uint32_t multword,
const bool inclusiveTriggerMode )

Constructor.

The constructor only has to give an initial value to MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord stored in the object.

Parameters
multwordThe 32-bit MuCTPI multiplicity word that you want to decode

Definition at line 33 of file MuCTPI_MultiplicityWord_Decoder.cxx.

35 if (inclusiveTriggerMode) m_triggerMode = inclusive;
36}

◆ ~MuCTPI_MultiplicityWord_Decoder()

MuCTPI_MultiplicityWord_Decoder::~MuCTPI_MultiplicityWord_Decoder ( )
default

Destructor.

Member Function Documentation

◆ dumpData() [1/2]

void MuCTPI_MultiplicityWord_Decoder::dumpData ( ) const

Function dumping the stored information to the message stream.

This function is not responsible for actually printing the information, it just creates a message stream to print the information to with MuCTPI_MultiplicityWord_Decoder::dumpData(MsgStream&) const.

Definition at line 88 of file MuCTPI_MultiplicityWord_Decoder.cxx.

88 {
89
90 SmartIF<IMessageSvc> msgSvc{Gaudi::svcLocator()->service("MessageSvc")};
91 if ( !msgSvc ) {
92 return;
93 }
94 MsgStream log( msgSvc, "MuCTPI_MultiplicityWord_Decoder" );
95 dumpData( log );
96
97 return;
98}
void dumpData() const
Function dumping the stored information to the message stream.
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ dumpData() [2/2]

void MuCTPI_MultiplicityWord_Decoder::dumpData ( MsgStream & log) const

Function dumping the stored information to the message stream.

Function printing the decodable information of the MuCTPI multiplicity word in an easy-to-read fashion.

Parameters
logA message stream to print the information to

Definition at line 105 of file MuCTPI_MultiplicityWord_Decoder.cxx.

105 {
106
107 log << MSG::DEBUG << "=================================================" << endmsg;
108 log << MSG::DEBUG << "Candidate Multiplicity word 0x" << MSG::hex << m_multiplicityWord << MSG::dec << endmsg;
109 for( uint16_t i = 0; i < LVL1::MuCTPIBits::MULT_THRESH_NUM; ++i ) {
110 log << MSG::DEBUG << "Pt threshold " << ( i + 1 ) << ", multiplicity " << getMultiplicity( i ) << endmsg;
111 }
112 log << MSG::DEBUG << "Number of candidates: " << getNCandidates() << endmsg;
113 log << MSG::DEBUG << "MICTP BCID: 0x" << MSG::hex
114 << getBCID() << MSG::dec << " ( " << getBCID() << " )" << endmsg;
115 log << MSG::DEBUG << "=================================================" << endmsg;
116
117 return;
118}
#define endmsg
uint16_t getBCID() const
Function returning the 3-bit BCID fragment in the multiplicity word.
uint16_t getMultiplicity(const uint16_t candidateNumber) const
Function returning the 3-bit candidate multiplicity for the specified threshold.
uint16_t getNCandidates() const
Function returning the total number of muon candidates.
static constexpr uint32_t MULT_THRESH_NUM
Definition MuCTPI_Bits.h:19

◆ getBCID()

uint16_t MuCTPI_MultiplicityWord_Decoder::getBCID ( ) const

Function returning the 3-bit BCID fragment in the multiplicity word.

Returns
3-bit BCID fragment in the multiplicity word

Definition at line 78 of file MuCTPI_MultiplicityWord_Decoder.cxx.

78 {
79
82}
static constexpr uint32_t MULT_BITS
Number of multiplicity bits reserved per threshold.
Definition MuCTPI_Bits.h:16
static constexpr uint32_t MULT_BCID_POS
Definition MuCTPI_Bits.h:22
static constexpr uint32_t MULT_VAL
Binary 111 representing the maximal multiplicity value for a given threshold.
Definition MuCTPI_Bits.h:14

◆ getMultiplicity()

uint16_t MuCTPI_MultiplicityWord_Decoder::getMultiplicity ( const uint16_t candidateNumber) const

Function returning the 3-bit candidate multiplicity for the specified threshold.

Be careful, that candidateNumber is defined from 0 to 5, not from 1 to 6!

Parameters
candidateNumberthe index of the threshold for which to get the number of candidates
Returns
3-bit candidate multiplicity for the specified threshold

Definition at line 61 of file MuCTPI_MultiplicityWord_Decoder.cxx.

61 {
62
63 if( candidateNumber >= LVL1::MuCTPIBits::MULT_THRESH_NUM ) {
64 // throw exception? issue warning?
65
66 throw GaudiException( "MuCTPI_MultiplicityWord_Decoder::getMultiplicity> Threshold out of range",
67 "MuCTPI_MultiplicityWord_Decoder::getMultiplicity", StatusCode::FAILURE );
68 return 99;
69 }
70
71 return ((m_multiplicityWord >> (candidateNumber * LVL1::MuCTPIBits::MULT_BITS)) &
73}

◆ getNCandidates()

uint16_t MuCTPI_MultiplicityWord_Decoder::getNCandidates ( ) const

Function returning the total number of muon candidates.

Returns
total number of muon candidates

Definition at line 42 of file MuCTPI_MultiplicityWord_Decoder.cxx.

42 {
43
44 uint16_t nCand = 0;
46 for( uint32_t i = 0; i < LVL1::MuCTPIBits::MULT_THRESH_NUM; ++i ) {
47 nCand += this->getMultiplicity( i );
48 }
49 } else {
50 nCand = this->getMultiplicity( 0 );
51 }
52 return nCand;
53}
setWord1 uint16_t

◆ getWord()

uint32_t MuCTPI_MultiplicityWord_Decoder::getWord ( ) const
inline

Function returning the MuCTPI multiplicity word.

Definition at line 57 of file MuCTPI_MultiplicityWord_Decoder.h.

57{ return m_multiplicityWord; }

◆ setWord()

void MuCTPI_MultiplicityWord_Decoder::setWord ( const uint32_t word)
inline

Function setting the MuCTPI multiplicity word.

Definition at line 55 of file MuCTPI_MultiplicityWord_Decoder.h.

55{ m_multiplicityWord = word; }

Member Data Documentation

◆ m_multiplicityWord

uint32_t MuCTPI_MultiplicityWord_Decoder::m_multiplicityWord
private

The 32-bit multiplicity word to decode.

Definition at line 66 of file MuCTPI_MultiplicityWord_Decoder.h.

◆ m_triggerMode

TriggerMode_t MuCTPI_MultiplicityWord_Decoder::m_triggerMode
private

Trigger threshold mode (inclusive/exclusive)

Definition at line 68 of file MuCTPI_MultiplicityWord_Decoder.h.


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