ATLAS Offline Software
Loading...
Searching...
No Matches
v40_Header.h
Go to the documentation of this file.
1//Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7
19
20#ifndef OFFLINE_EFORMAT_V40_HEADER_H
21#define OFFLINE_EFORMAT_V40_HEADER_H
22
23#include <stdint.h>
24
25namespace offline_eformat { namespace v40 {
26
37 class Header {
38
39 public:
40
47 Header (const uint32_t* it);
48
52 Header ();
53
59 Header (const Header& other);
60
64 virtual ~Header();
65
71 Header& operator= (const Header& other);
72
77 void throws (bool b);
78
82 bool throws () const;
83
89 Header& assign (const uint32_t* it);
90
94 uint32_t marker() const;
95
99 uint32_t fragment_size_word() const;
100
105 uint32_t header_size_word() const;
106
110 uint32_t version() const;
111
115 uint32_t source_id() const;
116
120 uint32_t nstatus () const;
121
127 const uint32_t* start() const;
128 inline void start (const uint32_t*& it) const { it = start(); } //legacy
129
135 const uint32_t* payload() const;
136 inline void payload (const uint32_t*& it) const { it = payload(); } //legacy
137
143 const uint32_t* end() const;
144 inline void end (const uint32_t*& it) const { it = end(); } //legacy
145
149 uint32_t payload_size_word (void) const;
150
156 const uint32_t* status() const;
157 inline void status (const uint32_t*& it) const { it = status(); } //legacy
158
162 uint32_t checksum_type () const;
163
168 uint32_t nspecific () const;
169
175 const uint32_t* specific_header() const;
176 inline void specific_header (const uint32_t*& it) const //legacy
177 { it = specific_header(); }
178
184 uint32_t checksum_value (void) const;
185
192 uint32_t eval_checksum (void) const;
193
199 bool checksum (void) const;
200
201 private:
202
203 const uint32_t* m_top;
204
205 };
206
207}}
208
209#endif //OFFLINE_EFORMAT_V40_HEADER_H
virtual ~Header()
Destructor virtualisation.
uint32_t nspecific() const
Returns the number of specific words available in the specific header part.
void start(const uint32_t *&it) const
Definition v40_Header.h:128
void end(const uint32_t *&it) const
Definition v40_Header.h:144
const uint32_t * start() const
Sets the pointer to my start.
void payload(const uint32_t *&it) const
Definition v40_Header.h:136
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...
Header(const uint32_t *it)
To build a header given the containing buffer.
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.
void status(const uint32_t *&it) const
Definition v40_Header.h:157
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
void specific_header(const uint32_t *&it) const
Definition v40_Header.h:176
Header()
Builds an empty, otherwise useless Header.