29 for (
unsigned int i=0; i<5 && i<
m_status.size() && i<
m_count.size(); ++i){
32 m_word |= (fibre << (((4-i)*5)+3) );
37 for (
unsigned int i=0; i<5; ++i){
38 uint32_t fibre =
m_word >> (((4-i)*5)+3) & 0x1f;
58 os <<
" Fibre status,sizes: ";
59 for (
unsigned int i=0; i<5 && i<f.status().size() && i<f.count().size(); ++i){
60 os <<
"(" << f.status().at(i) <<
"," << f.count().at(i) <<
") ";
Represents the L1Topo fibre word of the L1Topo DAQ header, with decoder and encoder.
Fibre(std::vector< uint32_t > &&status, std::vector< uint32_t > &&count)
Construct from contents and encode word: vectors of up to 5 status flags and sizes....
void encode()
method used by constructor to encode word
std::vector< uint32_t > m_status
fibre status
uint32_t m_word
The raw data representation.
const std::vector< uint32_t > & status() const
access method
uint32_t word() const
access method
std::vector< uint32_t > m_count
fibre counts
const std::vector< uint32_t > & count() const
access method
void decode()
method used by constructor to decode word
std::ostream & operator<<(std::ostream &, const Error)
Helper to print errors as text rather than numbers.