ATLAS Offline Software
MuonSpectrometer
MuonCnv
MuonMDT_CnvTools
src
MdtReadOut.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef MUONBYTESTREAM_MDTREADOUT_H
6
#define MUONBYTESTREAM_MDTREADOUT_H
7
8
#include <stdint.h>
9
10
#include <utility>
11
// Base class for Mdt readout decoding
12
// adapted to Mdt from RpcReadOut
13
14
class
MdtReadOut
{
15
public
:
16
MdtReadOut
();
17
~MdtReadOut
() =
default
;
18
19
protected
:
20
constexpr std::pair<uint32_t, uint16_t>
getBitsWord
(
const
uint16_t
bstart,
const
uint16_t
bstop) {
21
uint32_t
word = 0;
22
for
(
uint16_t
i
= bstop;
i
< bstart;
i
++) word = ((word | 1) << 1);
23
return
std::make_pair(word, bstop);
24
}
25
26
// Decode a section of a 32-bits data word
27
uint32_t
getBits
(std::pair<uint32_t, uint16_t> wordbstop)
const
{
28
uint32_t
result
= (
m_word
>> wordbstop.second) & (wordbstop.first | 1);
29
return
result
;
30
}
31
32
// Encode a 32-bits data word from fragments with size < 16 bits
33
static
uint32_t
setBits
(
uint16_t
nData,
const
uint16_t
* inputData,
const
uint16_t
* inputPos);
34
35
// Encode a 32-bits data word from fragments with size < 32 bits
36
static
uint32_t
setBits
(
uint16_t
nData,
const
uint32_t
* inputData,
const
uint16_t
* inputPos);
37
38
uint32_t
m_word
;
39
};
40
41
#endif
get_generator_info.result
result
Definition:
get_generator_info.py:21
MdtReadOut::m_word
uint32_t m_word
Definition:
MdtReadOut.h:38
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
MdtReadOut::getBits
uint32_t getBits(std::pair< uint32_t, uint16_t > wordbstop) const
Definition:
MdtReadOut.h:27
MdtReadOut
Definition:
MdtReadOut.h:14
MdtReadOut::~MdtReadOut
~MdtReadOut()=default
MdtReadOut::MdtReadOut
MdtReadOut()
Definition:
MdtReadOut.cxx:11
xAOD::uint16_t
setWord1 uint16_t
Definition:
eFexEMRoI_v1.cxx:93
lumiFormat.i
int i
Definition:
lumiFormat.py:85
MdtReadOut::setBits
static uint32_t setBits(uint16_t nData, const uint16_t *inputData, const uint16_t *inputPos)
Definition:
MdtReadOut.cxx:14
MdtReadOut::getBitsWord
constexpr std::pair< uint32_t, uint16_t > getBitsWord(const uint16_t bstart, const uint16_t bstop)
Definition:
MdtReadOut.h:20
Generated on Sun Dec 22 2024 21:14:15 for ATLAS Offline Software by
1.8.18