ATLAS Offline Software
MuonSpectrometer
MuonCnv
MuonTGC_CnvTools
src
TgcROD_Encoder.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// Implementation of TgcROD_Encoder class
6
7
#include "
TgcROD_Encoder.h
"
8
9
#include "
MuonRDO/TgcRdo.h
"
10
#include "
TgcByteStream.h
"
11
12
#include "
AthenaKernel/getMessageSvc.h
"
13
#include "GaudiKernel/MsgStream.h"
14
15
#include <iostream>
16
17
// constructor
18
Muon::TgcROD_Encoder::TgcROD_Encoder
() : m_tgcRdo(nullptr)
19
{}
20
21
22
// destructor
23
Muon::TgcROD_Encoder::~TgcROD_Encoder
() =
default
;
24
25
26
// Set TgcRdo
27
void
Muon::TgcROD_Encoder::setRdo
(
const
TgcRdo
* rdo) {
28
m_tgcRdo = rdo;
29
}
30
31
// convert TGC RDO to a vector of 32bit words
32
void
Muon::TgcROD_Encoder::fillROD
(std::vector<uint32_t>&
v
)
33
{
34
MsgStream
log
(
Athena::getMessageSvc
(),
"TgcROD_Encoder::fillROD"
);
35
bool
debug
= (
log
.level() <=
MSG::DEBUG
);
36
37
// ROD encoder
38
// // set RDO and encode to ROD data
39
std::vector<uint32_t> t_vData;
40
41
TgcByteStream
bs;
42
bs.
rdo2ByteStream
(m_tgcRdo, t_vData,
log
);
43
44
// append to vector and dump
45
std::vector<uint32_t>::const_iterator
it
= t_vData.begin();
46
std::vector<uint32_t>::const_iterator it_e = t_vData.end();
47
uint32_t
iWord=0;
48
if
(
debug
) {
49
log
<<
MSG::DEBUG
<<
"************** dumping the words ************"
<<
endmsg
;
50
}
51
for
(;
it
!=it_e; ++
it
) {
52
v
.push_back(*
it
);
53
if
(
debug
) {
54
log
<<
MSG::DEBUG
<<
"word "
55
<< MSG::dec << std::setw(3) << iWord <<
" = "
56
<< MSG::hex << std::setw(8) << *
it
57
<<
endmsg
;
58
}
59
++iWord;
60
}
61
62
}
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
Muon::TgcROD_Encoder::setRdo
void setRdo(const TgcRdo *rdo)
Set TgcRdo.
Definition:
TgcROD_Encoder.cxx:27
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition:
getMessageSvc.cxx:20
Muon::TgcByteStream::rdo2ByteStream
static void rdo2ByteStream(const TgcRdo *rdo, ByteStream &bs, MsgStream &log)
Convert RDO to ByteStream.
Definition:
TgcByteStream.cxx:18
TgcROD_Encoder.h
endmsg
#define endmsg
Definition:
AnalysisConfig_Ntuple.cxx:63
TgcByteStream.h
TgcRdo.h
Muon::TgcROD_Encoder::~TgcROD_Encoder
~TgcROD_Encoder()
Destructor.
debug
const bool debug
Definition:
MakeUncertaintyPlots.cxx:53
Muon::TgcByteStream
Definition:
TgcByteStream.h:24
python.PyAthena.v
v
Definition:
PyAthena.py:154
DEBUG
#define DEBUG
Definition:
page_access.h:11
python.CaloCondTools.log
log
Definition:
CaloCondTools.py:20
Muon::TgcROD_Encoder::fillROD
void fillROD(std::vector< uint32_t > &v)
Convert all ROB fragment in the current list to a vector of 32bit words.
Definition:
TgcROD_Encoder.cxx:32
Muon::TgcROD_Encoder::TgcROD_Encoder
TgcROD_Encoder()
Constructor.
Definition:
TgcROD_Encoder.cxx:18
TgcRdo
Definition:
TgcRdo.h:22
Generated on Sat Jan 4 2025 21:19:11 for ATLAS Offline Software by
1.8.18