ATLAS Offline Software
CaloUserHeader.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 "CaloUserHeader.h"
6 #include "WordDecoder.h"
7 
8 using namespace LVL1BS;
9 
10 namespace {
11  const WordDecoder caloUserWordDecoder({
12  BitField("Length", 0, 4),
13  BitField("L1A Slice: PP FADC", 4, 5),
14  BitField("LUT", 9, 3),
15  BitField("CP", 12, 4),
16  BitField("JEP", 16, 4),
17  BitField("PP Lower Bound", 20, 8),
18  BitField("Type", 28, 4)
19  });
20 }
21 
22 
24  m_header(header){
25 }
26 
27 
29  return ::caloUserWordDecoder.get<uint8_t>(m_header, 0);
30 }
32  return ::caloUserWordDecoder.get<uint8_t>(m_header, 1);
33 }
35  return ::caloUserWordDecoder.get<uint8_t>(m_header,2);
36 }
38  return ::caloUserWordDecoder.get<uint8_t>(m_header, 3);
39 }
41  return ::caloUserWordDecoder.get<uint8_t>(m_header, 4);
42 }
44  return ::caloUserWordDecoder.get<uint8_t>(m_header, 5);
45 }
47  return ::caloUserWordDecoder.get<uint8_t>(m_header, 6) == 0xf;
48 }
50  return CaloUserHeader(word).isValid();
51 }
52 
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
LVL1BS::CaloUserHeader::m_header
uint32_t m_header
Definition: CaloUserHeader.h:24
LVL1BS::WordDecoder
Definition: WordDecoder.h:37
LVL1BS::CaloUserHeader::isValid
bool isValid() const
Definition: CaloUserHeader.cxx:46
LVL1BS::BitField
Definition: WordDecoder.h:14
CaloUserHeader.h
LVL1BS::CaloUserHeader::cp
uint8_t cp() const
Definition: CaloUserHeader.cxx:37
LVL1BS::CaloUserHeader::ppLowerBound
uint8_t ppLowerBound() const
Definition: CaloUserHeader.cxx:43
LVL1BS::CaloUserHeader::ppFadc
uint8_t ppFadc() const
Definition: CaloUserHeader.cxx:31
LVL1BS::CaloUserHeader::CaloUserHeader
CaloUserHeader(uint32_t header=0xf0000001)
Constructor - default just sets word ID and number of header words.
Definition: CaloUserHeader.cxx:23
WordDecoder.h
LVL1BS::CaloUserHeader::length
uint8_t length() const
Definition: CaloUserHeader.cxx:28
LVL1BS::CaloUserHeader::lut
uint8_t lut() const
Definition: CaloUserHeader.cxx:34
LVL1BS
Definition: ZdcByteStreamReadV1V2Tool.h:47
LVL1BS::CaloUserHeader::jep
uint8_t jep() const
Definition: CaloUserHeader.cxx:40