ATLAS Offline Software
Loading...
Searching...
No Matches
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
8using namespace LVL1BS;
9
10namespace {
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
26
27
28uint8_t CaloUserHeader::length() const {
29 return ::caloUserWordDecoder.get<uint8_t>(m_header, 0);
30}
31uint8_t CaloUserHeader::ppFadc() const {
32 return ::caloUserWordDecoder.get<uint8_t>(m_header, 1);
33}
34uint8_t CaloUserHeader::lut() const {
35 return ::caloUserWordDecoder.get<uint8_t>(m_header,2);
36}
37uint8_t CaloUserHeader::cp() const {
38 return ::caloUserWordDecoder.get<uint8_t>(m_header, 3);
39}
40uint8_t CaloUserHeader::jep() const {
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}
49bool CaloUserHeader::isValid(uint32_t word) {
50 return CaloUserHeader(word).isValid();
51}
52
uint8_t ppLowerBound() const
CaloUserHeader(uint32_t header=0xf0000001)
Constructor - default just sets word ID and number of header words.