ATLAS Offline Software
Loading...
Searching...
No Matches
JemJetElement.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#include "JemJetElement.h"
7
8namespace LVL1BS {
9
10// Constant definitions
11
31
33{
34}
35
36JemJetElement::JemJetElement(const int chan, const int emDat, const int hadDat,
37 const int emParErr, const int hadParErr,
38 const int linkErr)
39{
40 uint32_t word = 0;
41 word |= (emDat & s_emDataMask) << s_emDataBit;
42 word |= (emParErr & s_emParityMask) << s_emParityBit;
43 word |= (hadDat & s_hadDataMask) << s_hadDataBit;
44 word |= (hadParErr & s_hadParityMask) << s_hadParityBit;
45 word |= (linkErr & s_linkErrorMask) << s_linkErrorBit;
46 if (word) {
47 word |= ((chan % s_pairsPerPin + s_pairOffset) & s_pairMask) << s_pairBit;
48 word |= ((chan / s_pairsPerPin) & s_pinMask) << s_pinBit;
49 word |= (s_jeWordId & s_wordIdMask) << s_wordIdBit;
50 }
51 m_data = word;
52}
53
54} // end namespace
static const uint32_t s_hadParityMask
static const uint32_t s_emParityMask
static const int s_hadDataBit
static const int s_jeWordId
static const int s_emParityBit
static const int s_pairOffset
uint32_t m_data
Jet element data.
static const uint32_t s_linkErrorMask
static const uint32_t s_emDataMask
static const int s_linkErrorBit
static const uint32_t s_pairMask
static const int s_pairBit
static const int s_hadParityBit
static const int s_pairsPerPin
static const uint32_t s_wordIdMask
static const int s_wordIdBit
static const int s_pinBit
static const uint32_t s_pinMask
JemJetElement(uint32_t word)
static const int s_emDataBit
static const uint32_t s_hadDataMask
setEventNumber uint32_t