ATLAS Offline Software
Loading...
Searching...
No Matches
Trailer.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef TRIGT1RESULT_TRAILER_H
7#define TRIGT1RESULT_TRAILER_H
8
9// std include(s):
10#include <stdint.h>
11
12// STL include(s):
13#include <string>
14#include <vector>
15
16// Forward declaration(s):
17class MsgStream;
18
19namespace ROIB {
20
36
37 class Trailer {
38
39 public:
40 // constants:
43 static constexpr unsigned int wordsPerTrailer = 5;
44
47 : m_trailer() {}
48
49 Trailer(Trailer&&) noexcept = default;
50 Trailer(const Trailer&) = default;
51 Trailer& operator=(Trailer&&) noexcept =default;
52 Trailer& operator=(const Trailer&) =default;
53
55 Trailer( std::vector< uint32_t > &&v)
56 : m_trailer( std::move(v) ) {}
57
59 Trailer( const uint32_t, const uint32_t );
61 Trailer( const uint32_t );
62
64 ~Trailer() = default;
65
66
68 const std::vector<uint32_t>& trailer() const;
69
71 int size() const;
72
73 /* 'get' methods for the various entries in the trailer */
74
76 uint32_t errorStatus() const;
78 uint32_t statusInfo() const;
80 uint32_t numStatusWords() const;
82 uint32_t numDataWords() const;
84 uint32_t statusPosition() const;
85
86 /* 'set' methods for the various entries in the trailer */
87
91 void setNumDataWords( const unsigned int );
92
94 const std::string dump() const;
96 const std::string print(const bool longFormat = false) const;
97
99 void dumpData() const;
101 void dumpData(MsgStream&) const;
102
103 private:
105 std::vector< uint32_t > m_trailer;
106
107 }; // class Trailer
108
109} // namespace ROIB
110
111// include inline implementations
113
114#endif // TRIGT1RESULT_TRAILER_H
static constexpr unsigned int wordsPerTrailer
a ROD trailer as used in the LVL1 has 5 words, not counting the one hardware word in the end
Definition Trailer.h:43
uint32_t statusPosition() const
get position of status information in ROD (LVL1 assumes 1)
~Trailer()=default
empty default destructor
const std::string dump() const
dump raw object content to string
Definition Trailer.cxx:45
Trailer()
default constructor: empty object
Definition Trailer.h:46
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition Trailer.cxx:56
uint32_t numDataWords() const
get number of data words
int size() const
get trailer/data size (should always return 5)
uint32_t numStatusWords() const
get number of status words in trailer
uint32_t errorStatus() const
get error status word (LVL1 trailer assumes only on word)
const std::vector< uint32_t > & trailer() const
get full trailer
uint32_t statusInfo() const
get info status word (LVL1 trailer assumes only on word)
void setSimulationError()
set error status to 0xffff0000 for ROD was not found in SG
std::vector< uint32_t > m_trailer
vector of unsigned ints - the only data member - hopefully 5
Definition Trailer.h:105
void dumpData() const
print object content to default message stream
Definition Trailer.cxx:76
Trailer(Trailer &&) noexcept=default
void setNumDataWords(const unsigned int)
set number of data words
Namespace of the LVL1 RoIB simulation.
STL namespace.