ATLAS Offline Software
Classes | Public Member Functions | Private Attributes | List of all members
PyDumper::SafeFloatAccess Class Reference

#include <PyDumperDict.h>

Collaboration diagram for PyDumper::SafeFloatAccess:

Classes

union  ieee754_float
 

Public Member Functions

 SafeFloatAccess (const std::vector< float > &v)
 
double operator[] (size_t i)
 

Private Attributes

const std::vector< float > & m_v
 

Detailed Description

Definition at line 27 of file PyDumperDict.h.

Constructor & Destructor Documentation

◆ SafeFloatAccess()

PyDumper::SafeFloatAccess::SafeFloatAccess ( const std::vector< float > &  v)
inline

Definition at line 50 of file PyDumperDict.h.

50 : m_v(v) {}

Member Function Documentation

◆ operator[]()

double PyDumper::SafeFloatAccess::operator[] ( size_t  i)
inline

Definition at line 51 of file PyDumperDict.h.

51  {
52  ieee754_float ff;
53  ff.f = m_v[i];
54  if (ff.ieee.exponent == 0xff)
55  return std::nan("");
56  return m_v[i];
57  }

Member Data Documentation

◆ m_v

const std::vector<float>& PyDumper::SafeFloatAccess::m_v
private

Definition at line 59 of file PyDumperDict.h.


The documentation for this class was generated from the following file:
lumiFormat.i
int i
Definition: lumiFormat.py:85
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
PyDumper::SafeFloatAccess::m_v
const std::vector< float > & m_v
Definition: PyDumperDict.h:59
python.PyAthena.v
v
Definition: PyAthena.py:154