ATLAS Offline Software
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 
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
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
IAFP_WordReadOut.h
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
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::finalize
virtual StatusCode finalize() override
Definition: AFP_WordReadOut.cxx:27
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
AFP_WordReadOut::m_linkNumTrans
ToolHandle< AFP_LinkNumTranslator > m_linkNumTrans
Definition: AFP_WordReadOut.h:77
AFP_WordReadOut::initialize
virtual StatusCode initialize() override
Definition: AFP_WordReadOut.cxx:16
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
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
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
Class capable spliting word into parts, used to fill raw containers.
Definition: AFP_WordReadOut.h:16
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
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
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AFP_WordReadOut::~AFP_WordReadOut
virtual ~AFP_WordReadOut() override
Definition: AFP_WordReadOut.cxx:12
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::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
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AFP_WordReadOut::AFP_WordReadOut
AFP_WordReadOut(const std::string &type, const std::string &name, const IInterface *parent)
Definition: AFP_WordReadOut.cxx:7
AFP_LinkNumTranslator.h
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