ATLAS Offline Software
MuonSpectrometer
MuonRDO
src
CscRawData.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 "
MuonRDO/CscRawData.h
"
6
#include "GaudiKernel/MsgStream.h"
7
9
bool
CscRawData::samples
(
const
unsigned
int
i
,
const
unsigned
int
numSamples,
10
std::vector<uint16_t>&
adc
)
const
{
11
adc
.clear();
12
if
( numSamples == 0 )
return
false
;
13
unsigned
int
width
=
m_amps
.size() / numSamples;
14
if
(
i
>
width
)
return
false
;
15
for
(
unsigned
int
j=0; j<numSamples; ++j ) {
16
unsigned
int
pos
=
i
*numSamples+j;
17
adc
.push_back(
m_amps
[
pos
] );
18
}
19
return
true
;
20
}
21
22
23
MsgStream&
operator <<
( MsgStream& sl,
const
CscRawData
&
data
)
24
{
25
sl <<
"CscRawData ("
<< &
data
<<
") "
26
<<
", Collection ID="
<<
data
.identify()
27
<<
", address="
<<
data
.address()
28
<<
", rpuID="
<<
data
.rpuID()
29
<<
", isTimeComputed="
<<
data
.isTimeComputed()
30
<<
", time="
<<
data
.time()
31
<<
", width="
<<
data
.width()
32
<<
", ADC samples=["
;
33
for
(
unsigned
i
=0;
i
<
data
.samples().
size
();
i
++ ) {
34
sl <<
data
.samples()[
i
] <<
","
;
35
}
36
sl <<
"]"
<<std::endl;
37
return
sl;
38
}
39
40
41
std::ostream&
operator <<
( std::ostream& sl,
const
CscRawData
&
data
)
42
{
43
sl <<
"CscRawData "
44
<<
", Collection ID="
<<
data
.identify()
45
<<
", address="
<<
data
.address()
46
<<
", rpuID="
<<
data
.rpuID()
47
<<
", isTimeComputed="
<<
data
.isTimeComputed()
48
<<
", time="
<<
data
.time()
49
<<
", width="
<<
data
.width()
50
<<
", ADC samples=["
;
51
for
(
unsigned
i
=0;
i
<
data
.samples().
size
();
i
++ ) {
52
sl <<
data
.samples()[
i
] <<
","
;
53
}
54
sl <<
"]"
<<std::endl;
55
return
sl;
56
}
data
char data[hepevt_bytes_allocation_ATLAS]
Definition:
HepEvt.cxx:11
python.setupRTTAlg.size
int size
Definition:
setupRTTAlg.py:39
lumiFormat.i
int i
Definition:
lumiFormat.py:85
CscRawData::width
uint16_t width() const
Definition:
CscRawData.h:128
operator<<
MsgStream & operator<<(MsgStream &sl, const CscRawData &data)
Overload of << operator for MsgStream for debug output.
Definition:
CscRawData.cxx:23
CscRawData::samples
const std::vector< uint16_t > & samples() const
Definition:
CscRawData.h:130
CscRawData.h
python.LumiBlobConversion.pos
pos
Definition:
LumiBlobConversion.py:18
CscRawData
Class to hold the electronic output for a single CSC readout channel: n sampling ADC data + the addre...
Definition:
CscRawData.h:21
ReadFloatFromCool.adc
adc
Definition:
ReadFloatFromCool.py:48
CscRawData::m_amps
std::vector< uint16_t > m_amps
data members
Definition:
CscRawData.h:28
Generated on Thu Nov 7 2024 21:12:55 for ATLAS Offline Software by
1.8.18