ATLAS Offline Software
Loading...
Searching...
No Matches
MdtRODReadOut.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONBYTESTREAM_MDTRODREADOUT_H
6#define MUONBYTESTREAM_MDTRODREADOUT_H
7
8#include <stdint.h>
9
10#include <vector>
11
12#include "MdtReadOut.h"
13
14// Decoding methods for an MDT ROD
15// S. Rosati Feb 2003
16
17class MdtRODReadOut : public MdtReadOut {
18private:
19 // uint32_t m_dataWord;
20 // Data members
21 uint16_t m_subdetId; // Sub-detector Id
22 uint16_t m_mrodId; // MROD Id
23 uint32_t m_lvl1Id; // Lvl1 Id
24 uint16_t m_bcId; // Bunch crossing Id
25 uint16_t m_triggerTypeId; // Trigger type Id
26
27 // Data words in the ROD header
28 static constexpr uint32_t s_RODstart = 0xee1234ee;
29 static constexpr uint32_t s_RODheadersize = 0x8;
30 static constexpr uint32_t s_RODversion = 0; // ??
31
32public:
34 ~MdtRODReadOut() = default;
35
36 void decodeHeader(const std::vector<uint32_t>& p);
37 void decodeFooter(const std::vector<uint32_t>& p);
38
39 static uint32_t* encodeFooter();
40
41 // Header words
42 constexpr uint32_t makeHeaderMarker() { return s_RODstart; }
43 constexpr uint32_t makeHeaderSize() { return s_RODheadersize; }
44 constexpr uint32_t makeFormatVersion() { return s_RODversion; }
45 uint32_t makeRODId(uint16_t subdet, uint16_t mrod);
46
47 // Retrieve decoded results
48 uint16_t subdetId() const { return m_subdetId; }
49 uint16_t mrodId() const { return m_mrodId; }
50 uint32_t lvl1Id() const { return m_lvl1Id; }
51 uint16_t bcId() const { return m_bcId; }
52 uint16_t trigtypeId() const { return m_triggerTypeId; }
53
54private:
55 // Private functions
56 void setZero();
57
58}; // MUONBYTESTREAM_MDTRODREADOUT_H
59
60#endif
uint32_t makeRODId(uint16_t subdet, uint16_t mrod)
constexpr uint32_t makeHeaderSize()
constexpr uint32_t makeHeaderMarker()
uint16_t mrodId() const
uint16_t subdetId() const
uint16_t m_mrodId
~MdtRODReadOut()=default
void decodeHeader(const std::vector< uint32_t > &p)
static constexpr uint32_t s_RODstart
uint16_t bcId() const
uint32_t lvl1Id() const
uint16_t trigtypeId() const
static constexpr uint32_t s_RODversion
uint16_t m_triggerTypeId
void decodeFooter(const std::vector< uint32_t > &p)
uint16_t m_subdetId
uint16_t m_bcId
static uint32_t * encodeFooter()
constexpr uint32_t makeFormatVersion()
uint32_t m_lvl1Id
static constexpr uint32_t s_RODheadersize