ATLAS Offline Software
ForwardDetectors
ZDC
ZdcCnv
ZdcByteStream
src
ZdcSubBlockHeader.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
ZdcByteStream/ZdcSubBlockHeader.h
"
6
7
#include "
ZdcByteStream/ZdcWordDecoder.h
"
8
9
//using namespace LVL1BS;
10
11
namespace
{
12
const
ZdcWordDecoder
subBlockHeaderDecoder(
13
{
14
BitField
(
"Type"
, 28, 4),
15
BitField
(
"Version"
, 25, 3),
16
BitField
(
"Format"
, 22, 3),
17
BitField
(
"SeqNum"
, 16, 6),
18
BitField
(
"Crate"
, 12, 4),
19
BitField
(
"Module"
, 8, 4),
20
BitField
(
"nSlice2"
, 3, 5),
21
BitField
(
"nSlice1"
, 0, 3)
22
});
23
}
24
25
ZdcSubBlockHeader::ZdcSubBlockHeader
(
uint32_t
header
):
26
m_header(
header
){
27
}
28
29
30
uint8_t
ZdcSubBlockHeader::type
()
const
{
31
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 0); }
32
33
uint8_t
ZdcSubBlockHeader::version
()
const
{
34
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 1);
35
}
36
uint8_t
ZdcSubBlockHeader::format
()
const
{
37
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
,2);
38
}
39
uint8_t
ZdcSubBlockHeader::seqNum
()
const
{
40
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 3);
41
}
42
uint8_t
ZdcSubBlockHeader::crate
()
const
{
43
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 4);
44
}
45
uint8_t
ZdcSubBlockHeader::module
()
const
{
46
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 5);
47
}
48
uint8_t
ZdcSubBlockHeader::nSlice2
()
const
{
49
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 6);
50
}
51
uint8_t
ZdcSubBlockHeader::nSlice1
()
const
{
52
return ::subBlockHeaderDecoder.get<
uint8_t
>(
m_header
, 7);
53
}
54
55
bool
ZdcSubBlockHeader::isSubBlockHeader
()
const
{
56
return
(
type
() & 0xc) == 0xc;
57
}
58
59
bool
ZdcSubBlockHeader::isSubBlockHeader
(
uint32_t
word) {
60
return
ZdcSubBlockHeader
(word).isSubBlockHeader();
61
}
62
63
bool
ZdcSubBlockHeader::isPpmBlock
()
const
{
64
return
(
type
() & 0xe) == 0xc;
65
}
66
67
header
Definition:
hcg.cxx:526
xAOD::uint8_t
uint8_t
Definition:
Muon_v1.cxx:557
xAOD::uint32_t
setEventNumber uint32_t
Definition:
EventInfo_v1.cxx:127
ZdcSubBlockHeader::isPpmBlock
bool isPpmBlock() const
Definition:
ZdcSubBlockHeader.cxx:63
ZdcSubBlockHeader.h
ZdcSubBlockHeader::module
uint8_t module() const
Definition:
ZdcSubBlockHeader.cxx:45
ZdcSubBlockHeader::format
uint8_t format() const
Definition:
ZdcSubBlockHeader.cxx:36
BitField
Definition:
ZdcWordDecoder.h:14
ZdcSubBlockHeader::version
uint8_t version() const
Definition:
ZdcSubBlockHeader.cxx:33
ZdcSubBlockHeader::nSlice1
uint8_t nSlice1() const
Definition:
ZdcSubBlockHeader.cxx:51
ZdcSubBlockHeader::type
uint8_t type() const
Definition:
ZdcSubBlockHeader.cxx:30
ZdcSubBlockHeader::m_header
uint32_t m_header
Definition:
ZdcSubBlockHeader.h:22
ZdcSubBlockHeader::nSlice2
uint8_t nSlice2() const
Definition:
ZdcSubBlockHeader.cxx:48
ZdcSubBlockHeader::seqNum
uint8_t seqNum() const
Definition:
ZdcSubBlockHeader.cxx:39
ZdcSubBlockHeader::crate
uint8_t crate() const
Definition:
ZdcSubBlockHeader.cxx:42
ZdcWordDecoder
Definition:
ZdcWordDecoder.h:37
ZdcSubBlockHeader::ZdcSubBlockHeader
ZdcSubBlockHeader(uint32_t header=0x0)
Constructor - default just sets word ID and number of header words.
Definition:
ZdcSubBlockHeader.cxx:25
ZdcWordDecoder.h
ZdcSubBlockHeader::isSubBlockHeader
bool isSubBlockHeader() const
Definition:
ZdcSubBlockHeader.cxx:55
Generated on Thu Nov 7 2024 21:32:23 for ATLAS Offline Software by
1.8.18