ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
12#include "v40_Header.h"
13#include "eformat/checksum.h"
14
16 : m_top(it)
17{
18}
19
24
29
33
35{
36 if (this != &other) {
37 m_top = other.m_top;
38 }
39 return *this;
40}
41
43{
44 return m_top[0];
45}
46
48{
49 return m_top[1];
50}
51
53{
54 return m_top[2];
55}
56
58{
59 return m_top[3];
60}
61
63{
64 return m_top[4];
65}
66
68{
69 return m_top[5];
70}
71
73{
74 return m_top;
75}
76
78{
79 return m_top + header_size_word();
80}
81
82const uint32_t* offline_eformat::v40::Header::end () const
83{
84 return m_top + fragment_size_word();
85}
86
91
93{
94 return m_top + 6;
95}
96
98{
99 return m_top[6 + nstatus()];
100}
101
103{
104 return header_size_word() - ( 7 + nstatus() );
105}
106
108{
109 return m_top + 7 + nstatus();
110}
111
113{
114 return (checksum_type()?m_top[fragment_size_word()-1]:0);
115}
116
118{
119 m_top = it;
120 return *this;
121}
122
124{
125 return eformat::helper::checksum(checksum_type(), payload(), payload_size_word());
126}
127
129{
130 return (eval_checksum() == checksum_value());
131}
Contains the information on the Header of a fragment as described by the original note.
Definition v40_Header.h:37
virtual ~Header()
Destructor virtualisation.
uint32_t nspecific() const
Returns the number of specific words available in the specific header part.
const uint32_t * start() const
Sets the pointer to my start.
const uint32_t * specific_header() const
Returns an iterator to the start of the specific header part.
uint32_t checksum_type() const
Returns the check-sum type entry.
uint32_t eval_checksum(void) const
Evaluates the current (supposed) checksum for this fragment, taking into consideration the current se...
bool checksum(void) const
This will actually re-calculate the checksum and verify that the payload of the current fragment matc...
uint32_t checksum_value(void) const
Access the check sum value of this fragment, if any.
uint32_t payload_size_word(void) const
Returns the payload size.
uint32_t fragment_size_word() const
Returns the size, in words, of the current fragment.
const uint32_t * payload() const
Sets the pointer to where the payload starts.
Header & operator=(const Header &other)
Assigment operator.
uint32_t source_id() const
Returns the full source identifier.
const uint32_t * status() const
Returns the status words, as an iterator to the status words available.
uint32_t marker() const
Returns the fragment type.
uint32_t nstatus() const
Returns the number of status words available.
uint32_t version() const
Returns the formatting version.
uint32_t header_size_word() const
Returns the size, in words, of the current header.
const uint32_t * end() const
Sets the pointer to one-past my end position.
Header & assign(const uint32_t *it)
Reassign this header.
const uint32_t * m_top
< representation
Definition v40_Header.h:203
Header()
Builds an empty, otherwise useless Header.