ATLAS Offline Software
Classes | Public Member Functions | Static Public Attributes | Static Private Member Functions | Private Attributes | List of all members
EMECHVManager::EMECHVData Class Reference

#include <EMECHVManager.h>

Collaboration diagram for EMECHVManager::EMECHVData:

Classes

class  Payload
 

Public Member Functions

 EMECHVData ()
 
 EMECHVData (std::unique_ptr< Payload > payload)
 
EMECHVDataoperator= (EMECHVData &&other) noexcept
 
 ~EMECHVData ()
 
bool hvOn (const EMECHVElectrode &electrode, const int &iGap) const
 
double voltage (const EMECHVElectrode &electrode, const int &iGap) const
 
double current (const EMECHVElectrode &electrode, const int &iGap) const
 
int hvLineNo (const EMECHVElectrode &electrode, const int &iGap) const
 

Static Public Attributes

static constexpr double INVALID = -99999
 

Static Private Member Functions

static int index (const EMECHVElectrode &electrode)
 

Private Attributes

std::unique_ptr< Payloadm_payload
 

Detailed Description

Definition at line 40 of file EMECHVManager.h.

Constructor & Destructor Documentation

◆ EMECHVData() [1/2]

EMECHVManager::EMECHVData::EMECHVData ( )
default

◆ EMECHVData() [2/2]

EMECHVManager::EMECHVData::EMECHVData ( std::unique_ptr< Payload payload)

Definition at line 111 of file EMECHVManager.cxx.

112  : m_payload (std::move (payload))
113 {
114 }

◆ ~EMECHVData()

EMECHVManager::EMECHVData::~EMECHVData ( )
default

Member Function Documentation

◆ current()

double EMECHVManager::EMECHVData::current ( const EMECHVElectrode electrode,
const int &  iGap 
) const

Definition at line 143 of file EMECHVManager.cxx.

144 {
145  return m_payload->m_payloadArray[index(electrode)].current[iGap];
146 }

◆ hvLineNo()

int EMECHVManager::EMECHVData::hvLineNo ( const EMECHVElectrode electrode,
const int &  iGap 
) const

Definition at line 149 of file EMECHVManager.cxx.

150 {
151  return m_payload->m_payloadArray[index(electrode)].hvLineNo[iGap];
152 }

◆ hvOn()

bool EMECHVManager::EMECHVData::hvOn ( const EMECHVElectrode electrode,
const int &  iGap 
) const

Definition at line 131 of file EMECHVManager.cxx.

132 {
133  return voltage (electrode, iGap) > INVALID;
134 }

◆ index()

int EMECHVManager::EMECHVData::index ( const EMECHVElectrode electrode)
staticprivate

Definition at line 155 of file EMECHVManager.cxx.

156 {
157  unsigned int electrodeIndex = electrode.getElectrodeIndex();
158  const EMECHVModule& module = electrode.getModule();
159  unsigned int etaIndex = module.getEtaIndex();
160  unsigned int phiIndex = module.getPhiIndex();
161  unsigned int sectorIndex = module.getSectorIndex();
162  unsigned int sideIndex = module.getSideIndex();
163 
164  unsigned int index=0;
165  if (module.getWheelIndex()==EMECHVModule::OUTER) index= 5376*sideIndex+768*etaIndex+96*phiIndex+24*sectorIndex+electrodeIndex;
166  else if (module.getWheelIndex()==EMECHVModule::INNER) index= 512*sideIndex+256*etaIndex+32*phiIndex+4*sectorIndex+electrodeIndex;
167 
168  return index;
169 }

◆ operator=()

EMECHVManager::EMECHVData & EMECHVManager::EMECHVData::operator= ( EMECHVData &&  other)
noexcept

Definition at line 118 of file EMECHVManager.cxx.

119  {
120  if (this != &other) {
121  m_payload = std::move (other.m_payload);
122  }
123  return *this;
124 }

◆ voltage()

double EMECHVManager::EMECHVData::voltage ( const EMECHVElectrode electrode,
const int &  iGap 
) const

Definition at line 137 of file EMECHVManager.cxx.

138 {
139  return m_payload->m_payloadArray[index(electrode)].voltage[iGap];
140 }

Member Data Documentation

◆ INVALID

constexpr double EMECHVManager::EMECHVData::INVALID = -99999
staticconstexpr

Definition at line 43 of file EMECHVManager.h.

◆ m_payload

std::unique_ptr<Payload> EMECHVManager::EMECHVData::m_payload
private

Definition at line 55 of file EMECHVManager.h.


The documentation for this class was generated from the following files:
index
Definition: index.py:1
EMECHVManager::EMECHVData::voltage
double voltage(const EMECHVElectrode &electrode, const int &iGap) const
Definition: EMECHVManager.cxx:137
EMECHVModule
Definition: EMECHVModule.h:20
python.PyAthena.module
module
Definition: PyAthena.py:134
EMECHVModule::INNER
@ INNER
Definition: EMECHVModule.h:22
EMECHVManager::EMECHVData::m_payload
std::unique_ptr< Payload > m_payload
Definition: EMECHVManager.h:55
EMECHVManager::EMECHVData::INVALID
static constexpr double INVALID
Definition: EMECHVManager.h:43
EMECHVElectrode::getModule
const EMECHVModule & getModule() const
Definition: EMECHVElectrode.cxx:37
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
eflowRec::phiIndex
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition: EtaPhiLUT.cxx:23
EMECHVModule::OUTER
@ OUTER
Definition: EMECHVModule.h:22
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
EMECHVElectrode::getElectrodeIndex
unsigned int getElectrodeIndex() const
Definition: EMECHVElectrode.cxx:27
EMECHVManager::EMECHVData::index
static int index(const EMECHVElectrode &electrode)
Definition: EMECHVManager.cxx:155