ATLAS Offline Software
Event
ByteStreamCnvSvcLegacy
src
offline_eformat
old
v40_Header.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
12
#include "
v40_Header.h
"
13
#include "eformat/checksum.h"
14
15
offline_eformat::v40::Header::Header
(
const
uint32_t
*
it
)
16
: m_top(
it
)
17
{
18
}
19
20
offline_eformat::v40::Header::Header
()
21
: m_top()
22
{
23
}
24
25
offline_eformat::v40::Header::Header
(
const
offline_eformat::v40::Header
&
other
)
26
: m_top(
other
.m_top)
27
{
28
}
29
30
offline_eformat::v40::Header::~Header
()
31
{
32
}
33
34
offline_eformat::v40::Header
&
offline_eformat::v40::Header::operator=
(
const
offline_eformat::v40::Header
&
other
)
35
{
36
if
(
this
!= &
other
) {
37
m_top =
other
.m_top;
38
}
39
return
*
this
;
40
}
41
42
uint32_t
offline_eformat::v40::Header::marker
()
const
43
{
44
return
m_top[0];
45
}
46
47
uint32_t
offline_eformat::v40::Header::fragment_size_word
()
const
48
{
49
return
m_top[1];
50
}
51
52
uint32_t
offline_eformat::v40::Header::header_size_word
()
const
53
{
54
return
m_top[2];
55
}
56
57
uint32_t
offline_eformat::v40::Header::version
()
const
58
{
59
return
m_top[3];
60
}
61
62
uint32_t
offline_eformat::v40::Header::source_id
()
const
63
{
64
return
m_top[4];
65
}
66
67
uint32_t
offline_eformat::v40::Header::nstatus
()
const
68
{
69
return
m_top[5];
70
}
71
72
const
uint32_t
*
offline_eformat::v40::Header::start
()
const
73
{
74
return
m_top;
75
}
76
77
const
uint32_t
*
offline_eformat::v40::Header::payload
()
const
78
{
79
return
m_top + header_size_word();
80
}
81
82
const
uint32_t
*
offline_eformat::v40::Header::end
()
const
83
{
84
return
m_top + fragment_size_word();
85
}
86
87
uint32_t
offline_eformat::v40::Header::payload_size_word
(
void
)
const
88
{
89
return
fragment_size_word() - (header_size_word() + (checksum_type()?1:0));
90
}
91
92
const
uint32_t
*
offline_eformat::v40::Header::status
()
const
93
{
94
return
m_top + 6;
95
}
96
97
uint32_t
offline_eformat::v40::Header::checksum_type
()
const
98
{
99
return
m_top[6 + nstatus()];
100
}
101
102
uint32_t
offline_eformat::v40::Header::nspecific
()
const
103
{
104
return
header_size_word() - ( 7 + nstatus() );
105
}
106
107
const
uint32_t
*
offline_eformat::v40::Header::specific_header
()
const
108
{
109
return
m_top + 7 + nstatus();
110
}
111
112
uint32_t
offline_eformat::v40::Header::checksum_value
(
void
)
const
113
{
114
return
(checksum_type()?m_top[fragment_size_word()-1]:0);
115
}
116
117
offline_eformat::v40::Header
&
offline_eformat::v40::Header::assign
(
const
uint32_t
*
it
)
118
{
119
m_top =
it
;
120
return
*
this
;
121
}
122
123
uint32_t
offline_eformat::v40::Header::eval_checksum
(
void
)
const
124
{
125
return
eformat::helper::checksum(checksum_type(),
payload
(), payload_size_word());
126
}
127
128
bool
offline_eformat::v40::Header::checksum
(
void
)
const
129
{
130
return
(eval_checksum() == checksum_value());
131
}
offline_eformat::v40::Header::nspecific
uint32_t nspecific() const
Returns the number of specific words available in the specific header part.
Definition:
v40_Header.cxx:102
offline_eformat::v40::Header::end
const uint32_t * end() const
Sets the pointer to one-past my end position.
Definition:
v40_Header.cxx:82
offline_eformat::v40::Header::version
uint32_t version() const
Returns the formatting version.
Definition:
v40_Header.cxx:57
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
offline_eformat::v40::Header::payload_size_word
uint32_t payload_size_word(void) const
Returns the payload size.
Definition:
v40_Header.cxx:87
offline_eformat::v40::Header::source_id
uint32_t source_id() const
Returns the full source identifier.
Definition:
v40_Header.cxx:62
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
offline_eformat::v40::Header::header_size_word
uint32_t header_size_word() const
Returns the size, in words, of the current header.
Definition:
v40_Header.cxx:52
offline_eformat::v40::Header::specific_header
const uint32_t * specific_header() const
Returns an iterator to the start of the specific header part.
Definition:
v40_Header.cxx:107
v40_Header.h
offline_eformat::v40::Header
Contains the information on the Header of a fragment as described by the original note.
Definition:
v40_Header.h:37
offline_eformat::v40::Header::status
const uint32_t * status() const
Returns the status words, as an iterator to the status words available.
Definition:
v40_Header.cxx:92
offline_eformat::v40::Header::checksum
bool checksum(void) const
This will actually re-calculate the checksum and verify that the payload of the current fragment matc...
Definition:
v40_Header.cxx:128
offline_eformat::v40::Header::payload
const uint32_t * payload() const
Sets the pointer to where the payload starts.
Definition:
v40_Header.cxx:77
offline_eformat::v40::Header::checksum_type
uint32_t checksum_type() const
Returns the check-sum type entry.
Definition:
v40_Header.cxx:97
offline_eformat::v40::Header::operator=
Header & operator=(const Header &other)
Assigment operator.
Definition:
v40_Header.cxx:34
offline_eformat::v40::Header::marker
uint32_t marker() const
Returns the fragment type.
Definition:
v40_Header.cxx:42
offline_eformat::v40::Header::checksum_value
uint32_t checksum_value(void) const
Access the check sum value of this fragment, if any.
Definition:
v40_Header.cxx:112
PixelModuleFeMask_create_db.payload
string payload
Definition:
PixelModuleFeMask_create_db.py:69
offline_eformat::v40::Header::assign
Header & assign(const uint32_t *it)
Reassign this header.
Definition:
v40_Header.cxx:117
InDetDD::other
@ other
Definition:
InDetDD_Defs.h:16
offline_eformat::v40::Header::~Header
virtual ~Header()
Destructor virtualisation.
Definition:
v40_Header.cxx:30
offline_eformat::v40::Header::eval_checksum
uint32_t eval_checksum(void) const
Evaluates the current (supposed) checksum for this fragment, taking into consideration the current se...
Definition:
v40_Header.cxx:123
offline_eformat::v40::Header::start
const uint32_t * start() const
Sets the pointer to my start.
Definition:
v40_Header.cxx:72
offline_eformat::v40::Header::fragment_size_word
uint32_t fragment_size_word() const
Returns the size, in words, of the current fragment.
Definition:
v40_Header.cxx:47
offline_eformat::v40::Header::Header
Header()
Builds an empty, otherwise useless Header.
Definition:
v40_Header.cxx:20
offline_eformat::v40::Header::nstatus
uint32_t nstatus() const
Returns the number of status words available.
Definition:
v40_Header.cxx:67
Generated on Wed Dec 25 2024 21:22:25 for ATLAS Offline Software by
1.8.18