ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
LVL1::JetCMXTopoData Class Reference

#include <JetCMXTopoData.h>

Collaboration diagram for LVL1::JetCMXTopoData:

Public Member Functions

 JetCMXTopoData (int crate, bool overflow, const std::vector< uint32_t > &tobWords)
 Constructor with Crate number, overflow flag and vector of TOB words. More...
 
 JetCMXTopoData (int crate, bool overflow, const std::vector< JetTopoTOB > &tobs)
 Constructor with Crate number, overflow flag and TOB vector. More...
 
 JetCMXTopoData (int crate, const std::vector< uint32_t > &roiWords)
 For HLT: Constructor with Crate number and vector of RoI words. More...
 
 JetCMXTopoData (int crate)
 Constructor with Crate number only. More...
 
 JetCMXTopoData ()
 Default constructor. More...
 
 ~JetCMXTopoData ()
 Destructor. More...
 
int crate () const
 Return crate number (0-1) More...
 
bool overflow () const
 Return overflow flag. More...
 
void tobs (std::vector< JetTopoTOB > &tobs) const
 Return vector of TOBs. More...
 
const std::vector< uint32_t > & tobWords () const
 Return vector of TOB words. More...
 
void addTOB (const JetTopoTOB tob)
 Add TOB to record. More...
 
void addTOB (uint32_t tobWord)
 Add another TOB word to the collection. More...
 
void addRoI (uint32_t roiWord)
 Add TOB from RoI word. More...
 
void setOverflow (bool overflow)
 Set overflow flag. More...
 
JetCMXTopoDatacheckJemOverflow ()
 count whether any transmission JEM -> CMX had too many TOBs More...
 

Private Attributes

int m_crate
 Data members. More...
 
bool m_overflow
 overflow on CMX -> L1Topo transmission More...
 
bool m_jem_overflow
 overflow on JEM -> CMX transmission More...
 
std::vector< uint32_t > m_tobWords
 

Static Private Attributes

static const unsigned int s_maxTOBsPerLink = 32
 Static constants. More...
 
static const unsigned int s_maxTOBsPerJem = 4
 as specified in BackplaneFormats_v3.xlsx More...
 

Detailed Description

Definition at line 22 of file JetCMXTopoData.h.

Constructor & Destructor Documentation

◆ JetCMXTopoData() [1/5]

LVL1::JetCMXTopoData::JetCMXTopoData ( int  crate,
bool  overflow,
const std::vector< uint32_t > &  tobWords 
)

Constructor with Crate number, overflow flag and vector of TOB words.

Constructors.

Definition at line 16 of file JetCMXTopoData.cxx.

18  m_jem_overflow(false)
19  {
20 
21  m_tobWords.clear();
22  for (std::vector<uint32_t>::const_iterator it = tobWords.begin(); it != tobWords.end(); ++it) {
23  if (m_tobWords.size() < s_maxTOBsPerLink) m_tobWords.push_back( (*it) );
24  else m_overflow = true;
25  }
27  }

◆ JetCMXTopoData() [2/5]

LVL1::JetCMXTopoData::JetCMXTopoData ( int  crate,
bool  overflow,
const std::vector< JetTopoTOB > &  tobs 
)

Constructor with Crate number, overflow flag and TOB vector.

Definition at line 30 of file JetCMXTopoData.cxx.

32  m_jem_overflow(false)
33  {
34 
35  m_tobWords.clear();
36  for (std::vector<JetTopoTOB>::const_iterator it = tobs.begin(); it != tobs.end(); ++it) {
37  if (m_tobWords.size() < s_maxTOBsPerLink) m_tobWords.push_back( (*it).tobWord() );
38  else m_overflow = true;
39  }
41  }

◆ JetCMXTopoData() [3/5]

LVL1::JetCMXTopoData::JetCMXTopoData ( int  crate,
const std::vector< uint32_t > &  roiWords 
)

For HLT: Constructor with Crate number and vector of RoI words.

Definition at line 44 of file JetCMXTopoData.cxx.

45  : m_crate( crate ),
46  m_jem_overflow(false)
47  {
48 
49  m_overflow = false;
50  m_tobWords.clear();
51 
52  for (std::vector<uint32_t>::const_iterator it = roiWords.begin(); it != roiWords.end(); ++it) {
53  JetTopoTOB tob((*it));
54  if (tob.crate() == m_crate) m_tobWords.push_back( tob.tobWord() );
55  }
57  }

◆ JetCMXTopoData() [4/5]

LVL1::JetCMXTopoData::JetCMXTopoData ( int  crate)

Constructor with Crate number only.

Definition at line 60 of file JetCMXTopoData.cxx.

61  : m_crate( crate ), m_overflow( false ),
62  m_jem_overflow(false)
63  {
64  m_tobWords.clear();
65  }

◆ JetCMXTopoData() [5/5]

LVL1::JetCMXTopoData::JetCMXTopoData ( )

Default constructor.

Definition at line 68 of file JetCMXTopoData.cxx.

69  : m_crate( 0 ), m_overflow ( false ),
70  m_jem_overflow(false)
71  {
72  m_tobWords.clear();
73  }

◆ ~JetCMXTopoData()

LVL1::JetCMXTopoData::~JetCMXTopoData ( )

Destructor.

Definition at line 77 of file JetCMXTopoData.cxx.

77  {
78  }

Member Function Documentation

◆ addRoI()

void LVL1::JetCMXTopoData::addRoI ( uint32_t  roiWord)

Add TOB from RoI word.

Add another TOB word to the collection.

Note: overflows ignored in this method

Definition at line 96 of file JetCMXTopoData.cxx.

96  {
97  JetTopoTOB tob(roiWord);
98  if (tob.crate() == m_crate) m_tobWords.push_back( tob.tobWord() );
99  }

◆ addTOB() [1/2]

void LVL1::JetCMXTopoData::addTOB ( const JetTopoTOB  tob)

Add TOB to record.

Add another TOB to the collection.

Definition at line 82 of file JetCMXTopoData.cxx.

82  {
83  if (m_tobWords.size() < s_maxTOBsPerLink)
84  m_tobWords.push_back(tob.tobWord());
85  else m_overflow = true;
86  }

◆ addTOB() [2/2]

void LVL1::JetCMXTopoData::addTOB ( uint32_t  tobWord)

Add another TOB word to the collection.

Definition at line 90 of file JetCMXTopoData.cxx.

90  {
91  if (m_tobWords.size() < s_maxTOBsPerLink) m_tobWords.push_back( tobWord );
92  else m_overflow = true;
93  }

◆ checkJemOverflow()

JetCMXTopoData & LVL1::JetCMXTopoData::checkJemOverflow ( )

count whether any transmission JEM -> CMX had too many TOBs

In which case toggle m_jem_overflow

Definition at line 137 of file JetCMXTopoData.cxx.

138 {
139  const size_t max_jem_index = 15; // as indicated in JetTopoTOB::jem()
140  std::vector<uint32_t> counters_tob_per_jem(max_jem_index, 0);
141  for(const uint32_t word : m_tobWords) {
142  JetTopoTOB tob(m_crate, word);
143  const size_t iJem = tob.jem();
144  counters_tob_per_jem[iJem] += 1;
145  }
147  std::any_of(counters_tob_per_jem.begin(),
148  counters_tob_per_jem.end(),
149  [](const uint32_t &c) { return (c >= s_maxTOBsPerJem); }));
150  return *this;
151 }

◆ crate()

int LVL1::JetCMXTopoData::crate ( ) const

Return crate number (0-1)

Access methods.

Definition at line 109 of file JetCMXTopoData.cxx.

109  {
110  return m_crate;
111  }

◆ overflow()

bool LVL1::JetCMXTopoData::overflow ( ) const

Return overflow flag.

Definition at line 114 of file JetCMXTopoData.cxx.

114  {
115  if ( m_overflow ||
116  (m_tobWords.size() > s_maxTOBsPerLink) ||
117  m_jem_overflow ) return true;
118  return false;
119  }

◆ setOverflow()

void LVL1::JetCMXTopoData::setOverflow ( bool  overflow)

Set overflow flag.

Definition at line 103 of file JetCMXTopoData.cxx.

103  {
105  }

◆ tobs()

void LVL1::JetCMXTopoData::tobs ( std::vector< JetTopoTOB > &  tobs) const

Return vector of TOBs.

Definition at line 127 of file JetCMXTopoData.cxx.

127  {
128  tobs.clear();
129 
130  std::vector< uint32_t >::const_iterator it = m_tobWords.begin();
131  for ( ; it != m_tobWords.end(); ++it)
132  tobs.push_back(JetTopoTOB(m_crate, (*it)));
133 
134  return;
135  }

◆ tobWords()

const std::vector< uint32_t > & LVL1::JetCMXTopoData::tobWords ( ) const

Return vector of TOB words.

Definition at line 122 of file JetCMXTopoData.cxx.

122  {
123  return m_tobWords;
124  }

Member Data Documentation

◆ m_crate

int LVL1::JetCMXTopoData::m_crate
private

Data members.

Definition at line 64 of file JetCMXTopoData.h.

◆ m_jem_overflow

bool LVL1::JetCMXTopoData::m_jem_overflow
private

overflow on JEM -> CMX transmission

Definition at line 66 of file JetCMXTopoData.h.

◆ m_overflow

bool LVL1::JetCMXTopoData::m_overflow
private

overflow on CMX -> L1Topo transmission

Definition at line 65 of file JetCMXTopoData.h.

◆ m_tobWords

std::vector< uint32_t > LVL1::JetCMXTopoData::m_tobWords
private

Definition at line 67 of file JetCMXTopoData.h.

◆ s_maxTOBsPerJem

const unsigned int LVL1::JetCMXTopoData::s_maxTOBsPerJem = 4
staticprivate

as specified in BackplaneFormats_v3.xlsx

Definition at line 70 of file JetCMXTopoData.h.

◆ s_maxTOBsPerLink

const unsigned int LVL1::JetCMXTopoData::s_maxTOBsPerLink = 32
staticprivate

Static constants.

Definition at line 69 of file JetCMXTopoData.h.


The documentation for this class was generated from the following files:
LVL1::JetCMXTopoData::tobWords
const std::vector< uint32_t > & tobWords() const
Return vector of TOB words.
Definition: JetCMXTopoData.cxx:122
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1::JetCMXTopoData::s_maxTOBsPerLink
static const unsigned int s_maxTOBsPerLink
Static constants.
Definition: JetCMXTopoData.h:69
LVL1::JetCMXTopoData::overflow
bool overflow() const
Return overflow flag.
Definition: JetCMXTopoData.cxx:114
skel.it
it
Definition: skel.GENtoEVGEN.py:396
LVL1::JetCMXTopoData::tobs
void tobs(std::vector< JetTopoTOB > &tobs) const
Return vector of TOBs.
Definition: JetCMXTopoData.cxx:127
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
LVL1::JetCMXTopoData::m_crate
int m_crate
Data members.
Definition: JetCMXTopoData.h:64
LVL1::JetCMXTopoData::m_jem_overflow
bool m_jem_overflow
overflow on JEM -> CMX transmission
Definition: JetCMXTopoData.h:66
LVL1::JetCMXTopoData::m_tobWords
std::vector< uint32_t > m_tobWords
Definition: JetCMXTopoData.h:67
LVL1::JetCMXTopoData::checkJemOverflow
JetCMXTopoData & checkJemOverflow()
count whether any transmission JEM -> CMX had too many TOBs
Definition: JetCMXTopoData.cxx:137
LVL1::JetCMXTopoData::m_overflow
bool m_overflow
overflow on CMX -> L1Topo transmission
Definition: JetCMXTopoData.h:65
LVL1::JetCMXTopoData::crate
int crate() const
Return crate number (0-1)
Definition: JetCMXTopoData.cxx:109
python.compressB64.c
def c
Definition: compressB64.py:93