ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace TRTCond{
13
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}
42CONDCONT_DEF(TRTCond::AliveStraws,110897079);
43#endif
Scalar phi() const
phi method
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::array< int, NTOTAL > m_stw_total
Definition AliveStraws.h:35
const std::array< std::array< int, NLOCALPHI >, NWHEEL > & getStwWheel() const
Definition AliveStraws.h:25
static constexpr unsigned int NLOCAL
Definition AliveStraws.h:17
std::array< std::array< int, NLOCALPHI >, NWHEEL > m_stw_wheel
Definition AliveStraws.h:37
const std::array< int, NTOTAL > & getStwTotal() const
Definition AliveStraws.h:23
const std::array< std::array< int, NLOCALPHI >, NLOCAL > & getStwLocal() const
Definition AliveStraws.h:24
void update(const unsigned int i, const unsigned int j, const unsigned int phi)
Definition AliveStraws.h:26
static constexpr unsigned int NWHEEL
Definition AliveStraws.h:18
std::array< std::array< int, NLOCALPHI >, NLOCAL > m_stw_local
Definition AliveStraws.h:36
static constexpr unsigned int NLOCALPHI
Definition AliveStraws.h:19
static constexpr unsigned int NTOTAL
Definition AliveStraws.h:16