25 for (std::vector<CPTopoTOB>::const_iterator it =
tobs.begin(); it !=
tobs.end(); ++it) {
26 if (m_tobWords.size() < s_maxTOBsPerLink) m_tobWords.push_back( (*it).tobWord() );
27 else m_overflow = true;
40 for (std::vector<uint32_t>::const_iterator it =
tobWords.begin(); it !=
tobWords.end(); ++it) {
41 if (m_tobWords.size() < s_maxTOBsPerLink) m_tobWords.push_back( (*it) );
42 else m_overflow = true;
57 for (std::vector<uint32_t>::const_iterator it = roiWords.begin(); it != roiWords.end(); ++it) {
59 if (tob.crate() == m_crate && tob.cmx() == m_cmx) m_tobWords.push_back( tob.tobWord() );
146 std::vector< uint32_t >::const_iterator it =
m_tobWords.begin();
155 const size_t max_cpm_index = 14;
156 std::vector<uint32_t> counters_tob_per_cpm(max_cpm_index, 0);
159 const size_t iCpm = tob.
cpm()-1;
160 const bool icpmValid = iCpm < counters_tob_per_cpm.size();
162 counters_tob_per_cpm[iCpm] += 1;
175 std::any_of(counters_tob_per_cpm.begin(),
176 counters_tob_per_cpm.end(),
177 [](
const uint32_t &c) { return (c >= s_maxTOBsPerCpm); }));
static const unsigned int s_maxTOBsPerCpm
as specified in BackplaneFormats_v3.xlsx
const std::vector< uint32_t > & tobWords() const
Return vector of TOB words.
void addTOB(const CPTopoTOB tob)
Add TOB to record.
CPCMXTopoData(int crate, int cmx, bool overflow, const std::vector< uint32_t > &tobWords)
Constructor with Crate, CMX numbers, overflow flag and vector of TOB words.
int crate() const
Return crate number (0-3)
bool overflow() const
Return overflow flag.
int cmx() const
Return CMX number (0 = EM, 1 = TAU)
std::vector< uint32_t > m_tobWords
CPCMXTopoData & checkCpmOverflow()
count whether any transmission CPM -> CMX had too many TOBs
CPCMXTopoData()
Default constructor.
void addRoI(uint32_t roiWord)
Add TOB from RoI word.
bool m_cpm_overflow
overflow on CPM -> CMX transmission
~CPCMXTopoData()
Destructor.
static const unsigned int s_maxTOBsPerLink
Static constants.
void setOverflow(bool overflow)
Set overflow flag.
bool m_overflow
overflow on CMX -> L1Topo transmission
void tobs(std::vector< CPTopoTOB > &tobs) const
Fill a vector of TOBs.
uint32_t tobWord() const
Return packed TOB word.
int crate() const
Return crate number (0-3)
int cpm() const
Return CPM number (1-14)
int cmx() const
Return CMX number (0-1)
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...