ATLAS Offline Software
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):
17 class MsgStream;
18 
19 namespace ROIB {
20 
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;
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 
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
112 #include "TrigT1Result/Trailer.icc"
113 
114 #endif // TRIGT1RESULT_TRAILER_H
ROIB::Trailer::dumpData
void dumpData() const
print object content to default message stream
Definition: Trailer.cxx:76
ROIB::Trailer::statusInfo
uint32_t statusInfo() const
get info status word (LVL1 trailer assumes only on word)
ROIB::Trailer::errorStatus
uint32_t errorStatus() const
get error status word (LVL1 trailer assumes only on word)
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ROIB::Trailer::size
int size() const
get trailer/data size (should always return 5)
ROIB::Trailer::numDataWords
uint32_t numDataWords() const
get number of data words
ROIB::Trailer::setNumDataWords
void setNumDataWords(const unsigned int)
set number of data words
ROIB::Trailer::setSimulationError
void setSimulationError()
set error status to 0xffff0000 for ROD was not found in SG
ROIB::Trailer::m_trailer
std::vector< uint32_t > m_trailer
vector of unsigned ints - the only data member - hopefully 5
Definition: Trailer.h:105
ROIB::Trailer::Trailer
Trailer()
default constructor: empty object
Definition: Trailer.h:46
ROIB::Trailer::trailer
const std::vector< uint32_t > & trailer() const
get full trailer
Trailer.icc
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
ROIB
Namespace of the LVL1 RoIB simulation.
Definition: ILvl1ResultAccessTool.h:19
ROIB::Trailer::Trailer
Trailer(Trailer &&) noexcept=default
ROIB::Trailer::numStatusWords
uint32_t numStatusWords() const
get number of status words in trailer
ROIB::Trailer::print
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Definition: Trailer.cxx:56
vector
Definition: MultiHisto.h:13
ROIB::Trailer::dump
const std::string dump() const
dump raw object content to string
Definition: Trailer.cxx:45
ROIB::Trailer::~Trailer
~Trailer()=default
empty default destructor
ROIB::Trailer
ROIB::Trailer models the LVL1 ROD Trailer.
Definition: Trailer.h:37
python.PyAthena.v
v
Definition: PyAthena.py:154
ROIB::Trailer::statusPosition
uint32_t statusPosition() const
get position of status information in ROD (LVL1 assumes 1)
python.CaloScaleNoiseConfig.default
default
Definition: CaloScaleNoiseConfig.py:79
ROIB::Trailer::wordsPerTrailer
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