ATLAS Offline Software
Loading...
Searching...
No Matches
Fibre.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef L1TOPORDO_FIBRE_H
6#define L1TOPORDO_FIBRE_H
7
8#include <vector>
9#include <cstdint>
10#include <iostream>
11
12namespace L1Topo {
13
20
21
22 class Fibre {
23 public:
25 Fibre(std::vector<uint32_t> &&status, std::vector<uint32_t> &&count);
27 Fibre(const uint32_t word);
29 const std::vector<uint32_t>& status() const;
31 const std::vector<uint32_t>& count() const;
33 uint32_t word() const;
34 protected:
36 void decode();
38 void encode();
39 private:
41 std::vector<uint32_t> m_status;
43 std::vector<uint32_t> m_count;
45 uint32_t m_word;
46 };
47
49 std::ostream& operator<<(std::ostream&, const Fibre&);
50
51} // namespace L1Topo
52
53#endif // L1TOPORDO_FIBRE_H
Represents the L1Topo fibre word of the L1Topo DAQ header, with decoder and encoder.
Definition Fibre.h:22
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....
Definition Fibre.cxx:13
void encode()
method used by constructor to encode word
Definition Fibre.cxx:25
std::vector< uint32_t > m_status
fibre status
Definition Fibre.h:41
uint32_t m_word
The raw data representation.
Definition Fibre.h:45
const std::vector< uint32_t > & status() const
access method
Definition Fibre.cxx:48
uint32_t word() const
access method
Definition Fibre.cxx:44
std::vector< uint32_t > m_count
fibre counts
Definition Fibre.h:43
const std::vector< uint32_t > & count() const
access method
Definition Fibre.cxx:52
void decode()
method used by constructor to decode word
Definition Fibre.cxx:36
std::ostream & operator<<(std::ostream &, const Error)
Helper to print errors as text rather than numbers.
Definition Error.cxx:8