ATLAS Offline Software
Loading...
Searching...
No Matches
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}
std::unique_ptr< Payload > m_payload

◆ ~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}
static int index(const EMECHVElectrode &electrode)

◆ 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}
static constexpr double INVALID
double voltage(const EMECHVElectrode &electrode, const int &iGap) const

◆ 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}
unsigned int getElectrodeIndex() const
const EMECHVModule & getModule() const
unsigned int phiIndex(float phi, float binsize)
calculate phi index for a given phi
Definition EtaPhiLUT.cxx:23

◆ 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

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: