ATLAS Offline Software
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 
8 namespace LVL1BS {
9 
10 // Constant definitions
11 
17 const int JemJetElement::s_pairBit;
18 const int JemJetElement::s_pinBit;
31 
33 {
34 }
35 
36 JemJetElement::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
LVL1BS::JemJetElement::s_emDataBit
static const int s_emDataBit
Definition: JemJetElement.h:41
LVL1BS::JemJetElement::JemJetElement
JemJetElement(uint32_t word)
Definition: JemJetElement.cxx:32
LVL1BS::JemJetElement::s_pairMask
static const uint32_t s_pairMask
Definition: JemJetElement.h:57
LVL1BS::JemJetElement::s_pairBit
static const int s_pairBit
Definition: JemJetElement.h:46
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
m_data
std::vector< T > m_data
Definition: TrackTruthMatchingBaseAlg.cxx:660
LVL1BS::JemJetElement::s_hadDataMask
static const uint32_t s_hadDataMask
Definition: JemJetElement.h:54
LVL1BS::JemJetElement::s_hadParityMask
static const uint32_t s_hadParityMask
Definition: JemJetElement.h:55
LVL1BS::JemJetElement::s_pairOffset
static const int s_pairOffset
Definition: JemJetElement.h:51
LVL1BS::JemJetElement::m_data
uint32_t m_data
Jet element data.
Definition: JemJetElement.h:62
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
LVL1BS::JemJetElement::s_hadDataBit
static const int s_hadDataBit
Definition: JemJetElement.h:43
LVL1BS::JemJetElement::s_jeWordId
static const int s_jeWordId
Definition: JemJetElement.h:49
LVL1BS::JemJetElement::s_linkErrorBit
static const int s_linkErrorBit
Definition: JemJetElement.h:45
LVL1BS::JemJetElement::s_wordIdBit
static const int s_wordIdBit
Definition: JemJetElement.h:48
JemJetElement.h
LVL1BS::JemJetElement::s_wordIdMask
static const uint32_t s_wordIdMask
Definition: JemJetElement.h:59
LVL1BS
Definition: ZdcByteStreamReadV1V2Tool.h:47
LVL1BS::JemJetElement::s_emParityBit
static const int s_emParityBit
Definition: JemJetElement.h:42
LVL1BS::JemJetElement::s_emDataMask
static const uint32_t s_emDataMask
Definition: JemJetElement.h:52
LVL1BS::JemJetElement::s_pinMask
static const uint32_t s_pinMask
Definition: JemJetElement.h:58
LVL1BS::JemJetElement::s_emParityMask
static const uint32_t s_emParityMask
Definition: JemJetElement.h:53
LVL1BS::JemJetElement::s_hadParityBit
static const int s_hadParityBit
Definition: JemJetElement.h:44
LVL1BS::JemJetElement::s_linkErrorMask
static const uint32_t s_linkErrorMask
Definition: JemJetElement.h:56
LVL1BS::JemJetElement::s_pairsPerPin
static const int s_pairsPerPin
Definition: JemJetElement.h:50
LVL1BS::JemJetElement::s_pinBit
static const int s_pinBit
Definition: JemJetElement.h:47