ATLAS Offline Software
Loading...
Searching...
No Matches
EnergyCMXData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7namespace LVL1 {
8
9// Default constructor
11{
12 m_DataWords.clear();
13 m_DataWords.resize(4);
14}
15
16// Construct from pre-calculated data
18 unsigned int ex, unsigned int ey, unsigned int et) :
21 m_Ex(ex),
22 m_Ey(ey),
23 m_Et(et)
24{
25 m_DataWords.clear();
26 m_DataWords.resize(4);
27
29 m_DataWords[0] = m_Ex;
30 m_DataWords[1] = m_Ey;
31 m_DataWords[2] = m_Et;
32
33 // Finally set parity bits. Will assume we used odd parity here (flip initial assignment to change)
34 for (unsigned int word = 0; word < 4; ++word) {
35 unsigned int parity = 1;
36 for (unsigned int bit = 0; bit < 24; ++bit) if ( ( (m_DataWords[word]>>bit) & 1) > 0 ) parity++;
37 parity &= 1;
38 m_DataWords[word] |= (parity<<23);
39 }
40
41}
42
46
47
49
52 return m_crate;
53}
54
57 return m_module;
58}
59
60
62std::vector<unsigned int> LVL1::EnergyCMXData::DataWords() const {
63 return m_DataWords;
64}
65
67unsigned int LVL1::EnergyCMXData::Ex() const {
68 return m_Ex;
69}
70
72unsigned int LVL1::EnergyCMXData::Ey() const {
73 return m_Ey;
74}
75
77unsigned int LVL1::EnergyCMXData::Et() const {
78 return m_Et;
79}
80
81
82} // end namespace
unsigned int Ey() const
Ey value for module.
int crate() const
Data accessors.
std::vector< unsigned int > m_DataWords
std::vector< unsigned int > DataWords() const
the 4 raw backplane data words
virtual ~EnergyCMXData()
Destructor.
int module() const
module number
unsigned int Et() const
ET value for module.
EnergyCMXData()
Constructors.
int m_crate
Internal data.
unsigned int Ex() const
Ex value for module.
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Extra patterns decribing particle interation process.