ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
L1Topo::ModuleID Class Reference

Represents the L1Topo module ID, with decoder and encoder. More...

#include <ModuleID.h>

Collaboration diagram for L1Topo::ModuleID:

Public Member Functions

 ModuleID (unsigned int link, unsigned int module, unsigned int roiDaq)
 Construct from constituent parts and encode word. More...
 
 ModuleID (const uint16_t)
 Construct from word and decode constituent parts. More...
 
uint16_t link () const
 access method More...
 
uint16_t module () const
 access method More...
 
uint16_t roiDaq () const
 access method More...
 
uint16_t id () const
 access method More...
 
bool isDAQ () const
 True if this is a DAQ module. More...
 
bool isROI () const
 True if this is a ROI module. More...
 

Protected Member Functions

void decode ()
 method used by constructor to decode word More...
 
void encode ()
 method used by constructor to encode word More...
 

Private Attributes

uint16_t m_link
 
uint16_t m_module
 
uint16_t m_roiDaq
 
uint16_t m_id
 

Detailed Description

Represents the L1Topo module ID, with decoder and encoder.

Used to decode/encode the 16-bit module ID of L1Topo modules which makes up the first 16 bits of the 32-bit source ID that uniquely identifies a ROS and ROB fragment. Numbering scheme for the lower 8 bits is: rmmmssss, where ssss is the S-link fibre number (four bits allowing values 0-15) mmm is the L1Topo module number (three bits allowing values 0-7) r is a one bit flag distingushing RoI fibres (1) from DAQ fibres (0). Valid combinations according to the convention described by experts are: module 0 link 0 DAQ 0 000 0000 = 0x0000 module 0 link 1 RoI 0 000 0001 = 0x0081 module 1 link 0 DAQ 1 001 0000 = 0x0010 module 1 link 1 RoI 0 001 0001 = 0x0091 Link 2 may be used for the new RoIB. A third module may be a later upgrade.

Definition at line 28 of file ModuleID.h.

Constructor & Destructor Documentation

◆ ModuleID() [1/2]

L1Topo::ModuleID::ModuleID ( unsigned int  link,
unsigned int  module,
unsigned int  roiDaq 
)

Construct from constituent parts and encode word.

Definition at line 11 of file ModuleID.cxx.

13  this->encode();
14  }

◆ ModuleID() [2/2]

L1Topo::ModuleID::ModuleID ( const uint16_t  id)

Construct from word and decode constituent parts.

Definition at line 16 of file ModuleID.cxx.

17  :m_link(0), m_module(0), m_roiDaq(0), m_id(id) {
18  this->decode();
19  }

Member Function Documentation

◆ decode()

void L1Topo::ModuleID::decode ( )
protected

method used by constructor to decode word

Definition at line 51 of file ModuleID.cxx.

51  {
52  m_roiDaq = (m_id >> 7) & 0x1;
53  m_module = (m_id >> 4) & 0x7;
54  m_link = m_id & 0xf;
55  }

◆ encode()

void L1Topo::ModuleID::encode ( )
protected

method used by constructor to encode word

Definition at line 45 of file ModuleID.cxx.

45  {
46  m_id = (m_roiDaq & 0x1) << 7;
47  m_id |= (m_module & 0x7) << 4;
48  m_id |= (m_link & 0xf);
49  }

◆ id()

uint16_t L1Topo::ModuleID::id ( ) const

access method

Definition at line 41 of file ModuleID.cxx.

41  {
42  return m_id;
43  }

◆ isDAQ()

bool L1Topo::ModuleID::isDAQ ( ) const

True if this is a DAQ module.

Definition at line 25 of file ModuleID.cxx.

25  {
26  return m_roiDaq==0;
27  }

◆ isROI()

bool L1Topo::ModuleID::isROI ( ) const

True if this is a ROI module.

Definition at line 29 of file ModuleID.cxx.

29  {
30  return m_roiDaq==1;
31  }

◆ link()

uint16_t L1Topo::ModuleID::link ( ) const

access method

Definition at line 37 of file ModuleID.cxx.

37  {
38  return m_link;
39  }

◆ module()

uint16_t L1Topo::ModuleID::module ( ) const

access method

Definition at line 33 of file ModuleID.cxx.

33  {
34  return m_module;
35  }

◆ roiDaq()

uint16_t L1Topo::ModuleID::roiDaq ( ) const

access method

Definition at line 21 of file ModuleID.cxx.

21  {
22  return m_roiDaq;
23  }

Member Data Documentation

◆ m_id

uint16_t L1Topo::ModuleID::m_id
private

Definition at line 55 of file ModuleID.h.

◆ m_link

uint16_t L1Topo::ModuleID::m_link
private

Definition at line 52 of file ModuleID.h.

◆ m_module

uint16_t L1Topo::ModuleID::m_module
private

Definition at line 53 of file ModuleID.h.

◆ m_roiDaq

uint16_t L1Topo::ModuleID::m_roiDaq
private

Definition at line 54 of file ModuleID.h.


The documentation for this class was generated from the following files:
L1Topo::ModuleID::module
uint16_t module() const
access method
Definition: ModuleID.cxx:33
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
L1Topo::ModuleID::decode
void decode()
method used by constructor to decode word
Definition: ModuleID.cxx:51
L1Topo::ModuleID::m_roiDaq
uint16_t m_roiDaq
Definition: ModuleID.h:54
L1Topo::ModuleID::link
uint16_t link() const
access method
Definition: ModuleID.cxx:37
L1Topo::ModuleID::m_link
uint16_t m_link
Definition: ModuleID.h:52
L1Topo::ModuleID::roiDaq
uint16_t roiDaq() const
access method
Definition: ModuleID.cxx:21
L1Topo::ModuleID::m_module
uint16_t m_module
Definition: ModuleID.h:53
L1Topo::ModuleID::m_id
uint16_t m_id
Definition: ModuleID.h:55
L1Topo::ModuleID::encode
void encode()
method used by constructor to encode word
Definition: ModuleID.cxx:45