ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer
MuonCnv
MuonMDT_CnvTools
src
MdtReadOut.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
MdtReadOut.h
"
6
7
#include <string>
8
9
// using std::cout;
10
11
MdtReadOut::MdtReadOut
() :
m_word
(0) {}
12
13
// Encode a 32-bits data word from fragments with size < 16 bits
14
uint32_t
MdtReadOut::setBits
(uint16_t nData,
const
uint16_t* inputData,
const
uint16_t* inputPos) {
15
uint32_t
result
= 0;
16
uint32_t input = 0;
17
uint16_t pos = 0;
18
for
(uint16_t i = 0; i < nData; i++) {
19
input = *(inputData + i);
20
pos = *(inputPos + i);
21
result
=
result
| (input << pos);
22
}
23
return
result
;
24
}
25
26
// Encode a 32-bits data word from fragments with size < 32 bits
27
uint32_t
MdtReadOut::setBits
(uint16_t nData,
const
uint32_t* inputData,
const
uint16_t* inputPos) {
28
uint32_t
result
= 0;
29
uint32_t input = 0;
30
uint16_t pos = 0;
31
for
(uint16_t i = 0; i < nData; i++) {
32
input = *(inputData + i);
33
pos = *(inputPos + i);
34
result
=
result
| (input << pos);
35
}
36
return
result
;
37
}
MdtReadOut.h
MdtReadOut::setBits
static uint32_t setBits(uint16_t nData, const uint16_t *inputData, const uint16_t *inputPos)
Definition
MdtReadOut.cxx:14
MdtReadOut::MdtReadOut
MdtReadOut()
Definition
MdtReadOut.cxx:11
MdtReadOut::m_word
uint32_t m_word
Definition
MdtReadOut.h:38
result
Generated on
for ATLAS Offline Software by
1.14.0