ATLAS Offline Software
SubBlockHeader.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 "SubBlockHeader.h"
6 
7 #include "WordDecoder.h"
8 
9 using namespace LVL1BS;
10 
11 namespace {
12  const WordDecoder 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 
26 
28  m_header(header){
29 }
30 
31 
33  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 0); }
34 
36  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 1);
37 }
39  return ::subBlockHeaderDecoder.get<uint8_t>(m_header,2);
40 }
42  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 3);
43 }
45  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 4);
46 }
48  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 5);
49 }
51  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 6);
52 }
54  return ::subBlockHeaderDecoder.get<uint8_t>(m_header, 7);
55 }
56 
58  return (type() & 0xc) == 0xc;
59 }
60 
62  return SubBlockHeader(word).isSubBlockHeader();
63 }
64 
66  return (type() & 0xe) == 0xc;
67 }
68 
69 
LVL1BS::SubBlockHeader::seqNum
uint8_t seqNum() const
Definition: SubBlockHeader.cxx:41
LVL1BS::SubBlockHeader::format
uint8_t format() const
Definition: SubBlockHeader.cxx:38
header
Definition: hcg.cxx:526
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:557
SubBlockHeader.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LVL1BS::SubBlockHeader::crate
uint8_t crate() const
Definition: SubBlockHeader.cxx:44
LVL1BS::SubBlockHeader::type
uint8_t type() const
Definition: SubBlockHeader.cxx:32
LVL1BS::SubBlockHeader::nSlice1
uint8_t nSlice1() const
Definition: SubBlockHeader.cxx:53
LVL1BS::WordDecoder
Definition: WordDecoder.h:37
LVL1BS::SubBlockHeader::isSubBlockHeader
bool isSubBlockHeader() const
Definition: SubBlockHeader.cxx:57
LVL1BS::SubBlockHeader::version
uint8_t version() const
Definition: SubBlockHeader.cxx:35
LVL1BS::SubBlockHeader::nSlice2
uint8_t nSlice2() const
Definition: SubBlockHeader.cxx:50
LVL1BS::BitField
Definition: WordDecoder.h:14
LVL1BS::SubBlockHeader::isPpmBlock
bool isPpmBlock() const
Definition: SubBlockHeader.cxx:65
LVL1BS::SubBlockHeader::module
uint8_t module() const
Definition: SubBlockHeader.cxx:47
WordDecoder.h
LVL1BS::SubBlockHeader::SubBlockHeader
SubBlockHeader(uint32_t header=0x0)
Constructor - default just sets word ID and number of header words.
Definition: SubBlockHeader.cxx:27
LVL1BS
Definition: ZdcByteStreamReadV1V2Tool.h:47
LVL1BS::SubBlockHeader::m_header
uint32_t m_header
Definition: SubBlockHeader.h:22