ATLAS Offline Software
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 
7 namespace LVL1 {
8 
9 // Default constructor
10 EnergyCMXData::EnergyCMXData() : m_crate(0), m_module(0), m_Ex(0), m_Ey(0), m_Et(0)
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) :
19  m_crate(crate),
20  m_module(module),
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 
44 {
45 }
46 
47 
52  return m_crate;
53 }
54 
57  return m_module;
58 }
59 
60 
62 std::vector<unsigned int> LVL1::EnergyCMXData::DataWords() const {
63  return m_DataWords;
64 }
65 
67 unsigned int LVL1::EnergyCMXData::Ex() const {
68  return m_Ex;
69 }
70 
72 unsigned int LVL1::EnergyCMXData::Ey() const {
73  return m_Ey;
74 }
75 
77 unsigned int LVL1::EnergyCMXData::Et() const {
78  return m_Et;
79 }
80 
81 
82 } // end namespace
et
Extra patterns decribing particle interation process.
LVL1::EnergyCMXData::DataWords
std::vector< unsigned int > DataWords() const
the 4 raw backplane data words
Definition: EnergyCMXData.cxx:62
LVL1::EnergyCMXData::EnergyCMXData
EnergyCMXData()
Constructors.
Definition: EnergyCMXData.cxx:10
LVL1::EnergyCMXData::Ey
unsigned int Ey() const
Ey value for module.
Definition: EnergyCMXData.cxx:72
LVL1::EnergyCMXData::m_DataWords
std::vector< unsigned int > m_DataWords
Definition: EnergyCMXData.h:50
LVL1::EnergyCMXData::Ex
unsigned int Ex() const
Ex value for module.
Definition: EnergyCMXData.cxx:67
LVL1
eFexTowerBuilder creates xAOD::eFexTowerContainer from supercells (LATOME) and triggerTowers (TREX) i...
Definition: ICMMCPHitsCnvTool.h:18
EnergyCMXData.h
LVL1::EnergyCMXData::m_Ex
unsigned int m_Ex
Definition: EnergyCMXData.h:47
python.PyAthena.module
module
Definition: PyAthena.py:134
LVL1::EnergyCMXData::module
int module() const
module number
Definition: EnergyCMXData.cxx:56
LVL1::EnergyCMXData::m_Et
unsigned int m_Et
Definition: EnergyCMXData.h:49
LVL1::EnergyCMXData::crate
int crate() const
Data accessors.
Definition: EnergyCMXData.cxx:51
LVL1::EnergyCMXData::Et
unsigned int Et() const
ET value for module.
Definition: EnergyCMXData.cxx:77
LVL1::EnergyCMXData::~EnergyCMXData
virtual ~EnergyCMXData()
Destructor.
Definition: EnergyCMXData.cxx:43
LVL1::EnergyCMXData::m_Ey
unsigned int m_Ey
Definition: EnergyCMXData.h:48