ATLAS Offline Software
Loading...
Searching...
No Matches
TrigT1Result/TrigT1Result/Header.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_HEADER_H
7#define TRIGT1RESULT_HEADER_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 Header {
38
39 public:
40 // constants:
43 static constexpr unsigned int wordsPerHeader = 8;
44
47 : m_header() {}
48
50 Header( std::vector<uint32_t>&& v)
51 : m_header( std::move(v) ) {}
52
53 Header(Header&&) noexcept = default;
54 Header(const Header&) = default;
55 Header& operator=(Header&&) noexcept =default;
56 Header& operator=(const Header&) =default;
57
59 Header( const uint32_t, const uint32_t, const uint32_t );
61 Header( const uint32_t, const uint32_t );
63 Header( const uint32_t );
64
65
67 ~Header() = default;
68
70 const std::vector<uint32_t>& header() const;
72 int size() const;
73
74 /* 'get' methods for the various entries in the header */
75
77 uint32_t headerMarker() const;
79 uint32_t headerSize() const;
81 uint32_t formatVersion() const;
83 uint32_t sourceID() const;
85 uint32_t runNumber() const;
87 uint32_t L1ID() const;
89 uint32_t BCID() const;
91 uint32_t triggerType() const;
93 uint32_t eventType() const;
94
95 /* Method setting various properties */
96
98 void setRunNumber( const uint32_t );
100 void setL1ID( const uint32_t );
102 void setBCID( const uint32_t i );
104 void setTriggerType( const uint32_t i );
106 void setEventType( const uint32_t i );
107
109 const std::string dump() const;
111 const std::string print(const bool longFormat = false) const;
112
114 void dumpData() const;
116 void dumpData(MsgStream&) const;
117
118 private:
120 std::vector< uint32_t > m_header;
121
122 }; // class Header
123
124} // namespace ROIB
125
126// inline implementations
127
128#include "TrigT1Result/Header.icc"
129
130#endif // TRIGT1RESULT_HEADER_H
void setBCID(const uint32_t i)
set bunch crossing ID
void setEventType(const uint32_t i)
set LVL1 event type
const std::string print(const bool longFormat=false) const
print object content in a human readable format to string
Header()
default constructor: empty object
uint32_t headerSize() const
get number of words in header
uint32_t formatVersion() const
get version of header format
uint32_t runNumber() const
get run number
Header(Header &&) noexcept=default
uint32_t eventType() const
get LVL1 event type
void setRunNumber(const uint32_t)
set run number
uint32_t triggerType() const
get LVL1 trigger type
static constexpr unsigned int wordsPerHeader
a ROD header as used in the LVL1 has 8 words, not counting the one hardware word in the beginning
void dumpData() const
print object content to default message stream
const std::vector< uint32_t > & header() const
get full header
Header(std::vector< uint32_t > &&v)
constructor which fully specifies the initialiser values
uint32_t headerMarker() const
get header marker word
uint32_t L1ID() const
get extended LVL1 ID
void setL1ID(const uint32_t)
set extended LVL1 ID
std::vector< uint32_t > m_header
vector of unsigned ints - the only data member
void setTriggerType(const uint32_t i)
set LVL1 trigger type
uint32_t sourceID() const
get sub detector source ID
uint32_t BCID() const
get bunch crossing ID
int size() const
get header(data) size
Namespace of the LVL1 RoIB simulation.
-event-from-file
STL namespace.
#define private