ATLAS Offline Software
AliveStraws.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ALIVESTRAWS_H
6 #define ALIVESTRAWS_H
9 #include <cassert>
10 #include <array>
11 
12 namespace TRTCond{
13 
14  class AliveStraws{
15  public:
16  static constexpr unsigned int NTOTAL = 7;
17  static constexpr unsigned int NLOCAL = 6;
18  static constexpr unsigned int NWHEEL = 34;
19  static constexpr unsigned int NLOCALPHI = 32;
21 
22  virtual ~AliveStraws() {}
23  const std::array<int,NTOTAL> &getStwTotal() const {return m_stw_total; }
24  const std::array<std::array<int,NLOCALPHI>,NLOCAL> &getStwLocal() const {return m_stw_local; }
25  const std::array<std::array<int,NLOCALPHI>,NWHEEL> &getStwWheel() const {return m_stw_wheel; }
26  void update(const unsigned int i, const unsigned int j, const unsigned int phi) {
27  assert(i>0 && i<m_stw_total.size() && i-1<m_stw_local.size() && j<m_stw_wheel.size() && phi<NLOCALPHI);
28  m_stw_total[0] +=1;
29  m_stw_total[i] +=1;
30  m_stw_local[i-1][phi] +=1;
31  m_stw_wheel[j][phi] +=1;
32  }
33 
34  private:
35  std::array<int,NTOTAL> m_stw_total {};
36  std::array<std::array<int,NLOCALPHI>,NLOCAL> m_stw_local {};
37  std::array<std::array<int,NLOCALPHI>,NWHEEL> m_stw_wheel {};
38  };
39 
40 }
42 CONDCONT_DEF(TRTCond::AliveStraws,110897079);
43 #endif
TRTCond::AliveStraws::getStwTotal
const std::array< int, NTOTAL > & getStwTotal() const
Definition: AliveStraws.h:23
CONDCONT_DEF
CONDCONT_DEF(TRTCond::AliveStraws, 110897079)
CondCont.h
Hold mappings of ranges to condition objects.
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
TRTCond::AliveStraws::~AliveStraws
virtual ~AliveStraws()
Definition: AliveStraws.h:22
TRTCond::AliveStraws::update
void update(const unsigned int i, const unsigned int j, const unsigned int phi)
Definition: AliveStraws.h:26
TRTCond::AliveStraws::m_stw_local
std::array< std::array< int, NLOCALPHI >, NLOCAL > m_stw_local
Definition: AliveStraws.h:36
TRTCond::AliveStraws::getStwWheel
const std::array< std::array< int, NLOCALPHI >, NWHEEL > & getStwWheel() const
Definition: AliveStraws.h:25
TRTCond::AliveStraws
Definition: AliveStraws.h:14
TRTCond::AliveStraws::AliveStraws
AliveStraws()
Definition: AliveStraws.h:20
TRTCond::AliveStraws::m_stw_total
std::array< int, NTOTAL > m_stw_total
Definition: AliveStraws.h:35
TRTCond::AliveStraws::NLOCALPHI
static constexpr unsigned int NLOCALPHI
Definition: AliveStraws.h:19
lumiFormat.i
int i
Definition: lumiFormat.py:92
TRTCond::AliveStraws::m_stw_wheel
std::array< std::array< int, NLOCALPHI >, NWHEEL > m_stw_wheel
Definition: AliveStraws.h:37
TRTCond::AliveStraws::NTOTAL
static constexpr unsigned int NTOTAL
Definition: AliveStraws.h:16
TRTCond::AliveStraws::NWHEEL
static constexpr unsigned int NWHEEL
Definition: AliveStraws.h:18
TRTCond::AliveStraws::NLOCAL
static constexpr unsigned int NLOCAL
Definition: AliveStraws.h:17
TRTCond
Definition: BasicRtRelation.cxx:8
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
TRTCond::AliveStraws::getStwLocal
const std::array< std::array< int, NLOCALPHI >, NLOCAL > & getStwLocal() const
Definition: AliveStraws.h:24
CLASS_DEF.h
macros to associate a CLID to a type