ATLAS Offline Software
Loading...
Searching...
No Matches
AFP_WordReadOut.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7AFP_WordReadOut::AFP_WordReadOut(const std::string& type, const std::string& name, const IInterface* parent) :
8 base_class(type, name, parent)
9{
10}
11
15
17{
18 if (m_linkNumTrans.retrieve().isFailure()) {
19 ATH_MSG_WARNING("Failed to retrieve service " << m_linkNumTrans );
20 return StatusCode::SUCCESS;
21 } else {
22 ATH_MSG_DEBUG("Retrieved service " << m_linkNumTrans );
23 }
24 return StatusCode::SUCCESS;
25}
26
28{
29 return StatusCode::SUCCESS;
30}
31
32uint32_t AFP_WordReadOut::getBits(uint32_t the_word, const uint16_t start, const uint16_t stop) const
33{
34 uint32_t word = 0;
35 for (uint16_t i = stop; i < start; i++) {
36 word = ((word | 1) << 1);
37 }
38 uint32_t result = (the_word >> stop) & (word | 1);
39 return result;
40}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
ToolHandle< AFP_LinkNumTranslator > m_linkNumTrans
virtual StatusCode initialize() override
virtual StatusCode finalize() override
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.