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 "MuonRDO/TgcRdo.h"
10#include "TgcByteStream.h"
11
13#include "GaudiKernel/MsgStream.h"
14
15#include <iostream>
16
17// constructor
20
21
22// destructor
24
25
26// Set TgcRdo
28 m_tgcRdo = rdo;
29}
30
31// convert TGC RDO to a vector of 32bit words
32void 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
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 }
#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)