ATLAS Offline Software
Loading...
Searching...
No Matches
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
10
12#include "GaudiKernel/ToolHandle.h"
13#include <stdint.h>
14
16class AFP_WordReadOut : public extends<AthAlgTool, IAFP_WordReadOut> {
17public:
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
76private:
77 ToolHandle<AFP_LinkNumTranslator> m_linkNumTrans {this, "AFP_LinkNumTranslator", "AFP_LinkNumTranslator", "Tool that translates link numbers"};
78};
79
80#endif
ToolHandle< AFP_LinkNumTranslator > m_linkNumTrans
bool isService(uint32_t the_word) const override
Returns true if the word is marked as service word.
virtual StatusCode initialize() override
uint32_t link(uint32_t the_word) const override
Value of 5-8 most significant bits.
bool isData(uint32_t the_word) const override
Returns true if the word is marked as data word.
bool isHeader(uint32_t the_word) const override
Returns true if the word is marked as header word.
static constexpr uint16_t s_wordService
Service word is marked with four most significant bits set to 0000.
static constexpr uint16_t s_wordData
Data word is marked with two most significant bits set to 11.
virtual StatusCode finalize() override
static constexpr uint16_t s_wordHeader
Header word is marked with four most significant bits set to 0011.
AFP_WordReadOut(const std::string &type, const std::string &name, const IInterface *parent)
virtual ~AFP_WordReadOut() override
uint32_t getBits(uint32_t the_word, const uint16_t start, const uint16_t stop) const override
Returns integer value of the selcted bits.