ATLAS Offline Software
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 
16  : m_top(it)
17 {
18 }
19 
21  : m_top()
22 {
23 }
24 
26  : m_top(other.m_top)
27 {
28 }
29 
31 {
32 }
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 
83 {
84  return m_top + fragment_size_word();
85 }
86 
88 {
89  return fragment_size_word() - (header_size_word() + (checksum_type()?1:0));
90 }
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 }
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:423
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