ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
ForwardDetectors
AFP
AFP_ByteStream2RawCnv
AFP_ByteStream2RawCnv
AFP_WordReadOut.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef AFP_RECORDREADOUT_H
6
#define AFP_RECORDREADOUT_H
7
8
#include "
AFP_ByteStream2RawCnv/IAFP_WordReadOut.h
"
9
#include "
AFP_ByteStream2RawCnv/AFP_LinkNumTranslator.h
"
10
11
#include "
AthenaBaseComps/AthAlgTool.h
"
12
#include "GaudiKernel/ToolHandle.h"
13
#include <stdint.h>
14
16
class
AFP_WordReadOut
:
public
extends<AthAlgTool, IAFP_WordReadOut> {
17
public
:
18
AFP_WordReadOut
(
const
std::string&
type
,
const
std::string& name,
const
IInterface* parent);
19
virtual
~AFP_WordReadOut
()
override
;
20
21
virtual
StatusCode
initialize
()
override
;
22
virtual
StatusCode
finalize
()
override
;
23
28
bool
isHeader
(uint32_t the_word)
const override
{
return
s_wordHeader
==
getBits
(the_word, 31, 28);}
29
34
bool
isData
(uint32_t the_word)
const override
{
return
s_wordData
==
getBits
(the_word, 31, 30);}
35
40
bool
isService
(uint32_t the_word)
const override
{
return
s_wordService
==
getBits
(the_word, 31, 28);}
41
46
uint32_t
link
(uint32_t the_word)
const override
{
return
m_linkNumTrans
->translate(
getBits
(the_word, 27, 24));}
47
65
uint32_t
getBits
(uint32_t the_word,
const
uint16_t start,
const
uint16_t stop)
const override
;
66
68
static
constexpr
uint16_t
s_wordHeader
= 3;
69
71
static
constexpr
uint16_t
s_wordData
= 3;
72
74
static
constexpr
uint16_t
s_wordService
= 0;
75
76
private
:
77
ToolHandle<AFP_LinkNumTranslator>
m_linkNumTrans
{
this
,
"AFP_LinkNumTranslator"
,
"AFP_LinkNumTranslator"
,
"Tool that translates link numbers"
};
78
};
79
80
#endif
AFP_LinkNumTranslator.h
AthAlgTool.h
IAFP_WordReadOut.h
AFP_WordReadOut::m_linkNumTrans
ToolHandle< AFP_LinkNumTranslator > m_linkNumTrans
Definition
AFP_WordReadOut.h:77
AFP_WordReadOut::isService
bool isService(uint32_t the_word) const override
Returns true if the word is marked as service word.
Definition
AFP_WordReadOut.h:40
AFP_WordReadOut::initialize
virtual StatusCode initialize() override
Definition
AFP_WordReadOut.cxx:16
AFP_WordReadOut::link
uint32_t link(uint32_t the_word) const override
Value of 5-8 most significant bits.
Definition
AFP_WordReadOut.h:46
AFP_WordReadOut::isData
bool isData(uint32_t the_word) const override
Returns true if the word is marked as data word.
Definition
AFP_WordReadOut.h:34
AFP_WordReadOut::isHeader
bool isHeader(uint32_t the_word) const override
Returns true if the word is marked as header word.
Definition
AFP_WordReadOut.h:28
AFP_WordReadOut::s_wordService
static constexpr uint16_t s_wordService
Service word is marked with four most significant bits set to 0000.
Definition
AFP_WordReadOut.h:74
AFP_WordReadOut::s_wordData
static constexpr uint16_t s_wordData
Data word is marked with two most significant bits set to 11.
Definition
AFP_WordReadOut.h:71
AFP_WordReadOut::finalize
virtual StatusCode finalize() override
Definition
AFP_WordReadOut.cxx:27
AFP_WordReadOut::s_wordHeader
static constexpr uint16_t s_wordHeader
Header word is marked with four most significant bits set to 0011.
Definition
AFP_WordReadOut.h:68
AFP_WordReadOut::AFP_WordReadOut
AFP_WordReadOut(const std::string &type, const std::string &name, const IInterface *parent)
Definition
AFP_WordReadOut.cxx:7
AFP_WordReadOut::~AFP_WordReadOut
virtual ~AFP_WordReadOut() override
Definition
AFP_WordReadOut.cxx:12
AFP_WordReadOut::getBits
uint32_t getBits(uint32_t the_word, const uint16_t start, const uint16_t stop) const override
Returns integer value of the selcted bits.
Definition
AFP_WordReadOut.cxx:32
type
Generated on
for ATLAS Offline Software by
1.17.0