ATLAS Offline Software
Loading...
Searching...
No Matches
EMBHVManager::EMBHVData Class Reference

#include <EMBHVManager.h>

Collaboration diagram for EMBHVManager::EMBHVData:

Classes

class  Payload

Public Member Functions

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

Static Public Attributes

static constexpr double INVALID = -99999

Static Private Member Functions

static int index (const EMBHVElectrode &electrode)

Private Attributes

std::unique_ptr< Payloadm_payload

Detailed Description

Definition at line 38 of file EMBHVManager.h.

Constructor & Destructor Documentation

◆ EMBHVData() [1/2]

EMBHVManager::EMBHVData::EMBHVData ( )
default

◆ EMBHVData() [2/2]

EMBHVManager::EMBHVData::EMBHVData ( std::unique_ptr< Payload > payload)

Definition at line 105 of file EMBHVManager.cxx.

106 : m_payload (std::move (payload))
107{
108}
std::unique_ptr< Payload > m_payload

◆ ~EMBHVData()

EMBHVManager::EMBHVData::~EMBHVData ( )
default

Member Function Documentation

◆ current()

double EMBHVManager::EMBHVData::current ( const EMBHVElectrode & electrode,
const int & iGap ) const

Definition at line 136 of file EMBHVManager.cxx.

137{
138 return m_payload->m_payloadArray[index(electrode)].current[iGap];
139}
static int index(const EMBHVElectrode &electrode)

◆ hvLineNo()

int EMBHVManager::EMBHVData::hvLineNo ( const EMBHVElectrode & electrode,
const int & iGap ) const

Definition at line 142 of file EMBHVManager.cxx.

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

◆ hvOn()

bool EMBHVManager::EMBHVData::hvOn ( const EMBHVElectrode & electrode,
const int & iGap ) const

Definition at line 124 of file EMBHVManager.cxx.

125{
126 return voltage (electrode, iGap) > INVALID;
127}
static constexpr double INVALID
double voltage(const EMBHVElectrode &electrode, const int &iGap) const

◆ index()

int EMBHVManager::EMBHVData::index ( const EMBHVElectrode & electrode)
staticprivate

Definition at line 148 of file EMBHVManager.cxx.

149{
150 unsigned int electrodeIndex = electrode.getElectrodeIndex();
151 const EMBHVModule& module = electrode.getModule();
152 unsigned int etaIndex = module.getEtaIndex();
153 unsigned int phiIndex = module.getPhiIndex();
154 unsigned int sectorIndex = module.getSectorIndex();
155 unsigned int sideIndex = module.getSideIndex();
156 unsigned int index = 8192*sideIndex+1024*etaIndex+64*phiIndex+32*sectorIndex+electrodeIndex;
157 return index;
158}
const EMBHVModule & getModule() const
unsigned int getElectrodeIndex() const
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition EtaPhiLUT.cxx:23

◆ operator=()

EMBHVManager::EMBHVData & EMBHVManager::EMBHVData::operator= ( EMBHVData && other)
noexcept

Definition at line 112 of file EMBHVManager.cxx.

112 {
113 if (this != &other) {
114 m_payload = std::move (other.m_payload);
115 }
116 return *this;
117}

◆ voltage()

double EMBHVManager::EMBHVData::voltage ( const EMBHVElectrode & electrode,
const int & iGap ) const

Definition at line 130 of file EMBHVManager.cxx.

131{
132 return m_payload->m_payloadArray[index(electrode)].voltage[iGap];
133}

Member Data Documentation

◆ INVALID

double EMBHVManager::EMBHVData::INVALID = -99999
staticconstexpr

Definition at line 41 of file EMBHVManager.h.

◆ m_payload

std::unique_ptr<Payload> EMBHVManager::EMBHVData::m_payload
private

Definition at line 53 of file EMBHVManager.h.


The documentation for this class was generated from the following files: