ATLAS Offline Software
Loading...
Searching...
No Matches
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
12#include "GaudiKernel/MsgStream.h"
13#include "MuonRDO/TgcRdo.h"
14#include "TgcByteStream.h"
15
16// constructor
18
19// destructor
21
22// Set TgcRdo
24 m_tgcRdo = rdo;
25}
26
27// convert TGC RDO to a vector of 32bit words
28void 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
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}
#define endmsg
const bool debug
This class provides conversions between RDO and ByteStream.
static void rdo2ByteStream(const TgcRdo *rdo, ByteStream &bs, MsgStream &log)
Convert RDO to ByteStream.
void setRdo(const TgcRdo *rdo)
Set TgcRdo.
const TgcRdo * m_tgcRdo
~TgcROD_Encoder()
Destructor.
TgcROD_Encoder()
Constructor.
void fillROD(std::vector< uint32_t > &v)
Convert all ROB fragment in the current list to a vector of 32bit words.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)