ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
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 <iostream>
10
11
#include "
AthenaKernel/getMessageSvc.h
"
12
#include "GaudiKernel/MsgStream.h"
13
#include "
MuonRDO/TgcRdo.h
"
14
#include "
TgcByteStream.h
"
15
16
// constructor
17
Muon::TgcROD_Encoder::TgcROD_Encoder
() :
m_tgcRdo
(nullptr) {}
18
19
// destructor
20
Muon::TgcROD_Encoder::~TgcROD_Encoder
() =
default
;
21
22
// Set TgcRdo
23
void
Muon::TgcROD_Encoder::setRdo
(
const
TgcRdo
* rdo) {
24
m_tgcRdo
= rdo;
25
}
26
27
// convert TGC RDO to a vector of 32bit words
28
void
Muon::TgcROD_Encoder::fillROD
(std::vector<uint32_t>& v) {
29
MsgStream log(
Athena::getMessageSvc
(),
"TgcROD_Encoder::fillROD"
);
30
bool
debug
= (log.level() <= MSG::DEBUG);
31
32
// ROD encoder
33
// // set RDO and encode to ROD data
34
std::vector<uint32_t> t_vData;
35
36
TgcByteStream
bs;
37
bs.
rdo2ByteStream
(
m_tgcRdo
, t_vData, log);
38
39
// append to vector and dump
40
std::vector<uint32_t>::const_iterator it = t_vData.begin();
41
std::vector<uint32_t>::const_iterator it_e = t_vData.end();
42
uint32_t iWord = 0;
43
if
(
debug
) {
44
log << MSG::DEBUG <<
"************** dumping the words ************"
45
<<
endmsg
;
46
}
47
for
(; it != it_e; ++it) {
48
v.push_back(*it);
49
if
(
debug
) {
50
log << MSG::DEBUG <<
"word "
<< MSG::dec << std::setw(3) << iWord
51
<<
" = "
<< MSG::hex << std::setw(8) << *it <<
endmsg
;
52
}
53
++iWord;
54
}
55
}
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
debug
const bool debug
Definition
MakeUncertaintyPlots.cxx:53
TgcByteStream.h
TgcROD_Encoder.h
TgcRdo.h
Muon::TgcByteStream
This class provides conversions between RDO and ByteStream.
Definition
TgcByteStream.h:23
Muon::TgcByteStream::rdo2ByteStream
static void rdo2ByteStream(const TgcRdo *rdo, ByteStream &bs, MsgStream &log)
Convert RDO to ByteStream.
Definition
TgcByteStream.cxx:15
Muon::TgcROD_Encoder::setRdo
void setRdo(const TgcRdo *rdo)
Set TgcRdo.
Definition
TgcROD_Encoder.cxx:23
Muon::TgcROD_Encoder::m_tgcRdo
const TgcRdo * m_tgcRdo
Definition
TgcROD_Encoder.h:42
Muon::TgcROD_Encoder::~TgcROD_Encoder
~TgcROD_Encoder()
Destructor.
Muon::TgcROD_Encoder::TgcROD_Encoder
TgcROD_Encoder()
Constructor.
Definition
TgcROD_Encoder.cxx:17
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:28
TgcRdo
Definition
TgcRdo.h:22
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition
getMessageSvc.cxx:20
Generated on
for ATLAS Offline Software by
1.17.0