Public Types | Public Member Functions | Private Attributes | List of all members
Tpc2dRoi Class Reference

#include <Tpc2dRoi.h>

Public Types

using Index = unsigned int
 
using LongIndex = unsigned long int
 
using DataArray = Real2dData< float >
 
using IndexArray = DataArray::IndexArray
 
using Dft = FftwDouble2dDftData
 
using DftPtr = std::unique_ptr< Dft >
 

Public Member Functions

 Tpc2dRoi ()
 
 Tpc2dRoi (Index ncha, Index nsam, Index icha0, LongIndex isam0=0)
 
LongIndex sampleOffset () const
 
Index sampleSize () const
 
Index channelOffset () const
 
Index channelSize () const
 
const DataArraydata () const
 
DataArraydata ()
 
float value (Index icha, LongIndex itck, float valdef=0.0) const
 
Dftdft ()
 
const Dftdft () const
 
void resetDft (Dft *pdft)
 

Private Attributes

Real2dData< float > m_data
 
LongIndex m_sampleOffset
 
Index m_channelOffset
 
DftPtr m_pdft
 

Detailed Description

Definition at line 18 of file Tpc2dRoi.h.

Member Typedef Documentation

Definition at line 24 of file Tpc2dRoi.h.

Definition at line 26 of file Tpc2dRoi.h.

using Tpc2dRoi::DftPtr = std::unique_ptr<Dft>

Definition at line 27 of file Tpc2dRoi.h.

using Tpc2dRoi::Index = unsigned int

Definition at line 22 of file Tpc2dRoi.h.

Definition at line 25 of file Tpc2dRoi.h.

using Tpc2dRoi::LongIndex = unsigned long int

Definition at line 23 of file Tpc2dRoi.h.

Constructor & Destructor Documentation

Tpc2dRoi::Tpc2dRoi ( )
inline

Definition at line 30 of file Tpc2dRoi.h.

Index m_channelOffset
Definition: Tpc2dRoi.h:79
LongIndex m_sampleOffset
Definition: Tpc2dRoi.h:78
Tpc2dRoi::Tpc2dRoi ( Index  ncha,
Index  nsam,
Index  icha0,
LongIndex  isam0 = 0 
)
inline

Definition at line 33 of file Tpc2dRoi.h.

34  : m_data({ncha, nsam}), m_sampleOffset(isam0), m_channelOffset(icha0) { }
Index m_channelOffset
Definition: Tpc2dRoi.h:79
Real2dData< float > m_data
Definition: Tpc2dRoi.h:77
LongIndex m_sampleOffset
Definition: Tpc2dRoi.h:78

Member Function Documentation

Index Tpc2dRoi::channelOffset ( ) const
inline

Definition at line 44 of file Tpc2dRoi.h.

44 { return m_channelOffset; }
Index m_channelOffset
Definition: Tpc2dRoi.h:79
Index Tpc2dRoi::channelSize ( ) const
inline

Definition at line 47 of file Tpc2dRoi.h.

47 { return data().nSamples()[0]; }
const IndexArray & nSamples() const
Definition: Real2dData.h:86
const DataArray & data() const
Definition: Tpc2dRoi.h:50
const DataArray& Tpc2dRoi::data ( ) const
inline

Definition at line 50 of file Tpc2dRoi.h.

50 { return m_data; }
Real2dData< float > m_data
Definition: Tpc2dRoi.h:77
DataArray& Tpc2dRoi::data ( )
inline

Definition at line 51 of file Tpc2dRoi.h.

51 { return m_data; }
Real2dData< float > m_data
Definition: Tpc2dRoi.h:77
Dft* Tpc2dRoi::dft ( )
inline

Definition at line 68 of file Tpc2dRoi.h.

68 { return m_pdft.get(); }
DftPtr m_pdft
Definition: Tpc2dRoi.h:80
const Dft* Tpc2dRoi::dft ( ) const
inline

Definition at line 69 of file Tpc2dRoi.h.

69 { return m_pdft.get(); }
DftPtr m_pdft
Definition: Tpc2dRoi.h:80
void Tpc2dRoi::resetDft ( Dft pdft)
inline

Definition at line 73 of file Tpc2dRoi.h.

73 { m_pdft.reset(pdft); }
DftPtr m_pdft
Definition: Tpc2dRoi.h:80
LongIndex Tpc2dRoi::sampleOffset ( ) const
inline

Definition at line 38 of file Tpc2dRoi.h.

38 { return m_sampleOffset; }
LongIndex m_sampleOffset
Definition: Tpc2dRoi.h:78
Index Tpc2dRoi::sampleSize ( ) const
inline

Definition at line 41 of file Tpc2dRoi.h.

41 { return data().nSamples()[1]; }
const IndexArray & nSamples() const
Definition: Real2dData.h:86
const DataArray & data() const
Definition: Tpc2dRoi.h:50
float Tpc2dRoi::value ( Index  icha,
LongIndex  itck,
float  valdef = 0.0 
) const
inline

Definition at line 55 of file Tpc2dRoi.h.

55  {
56  if ( icha < channelOffset() ) return valdef;
57  if ( itck < sampleOffset() ) return valdef;
58  Index chk = 0;
60  idxs[0] = icha - channelOffset();
61  idxs[1] = itck - sampleOffset();
62  float val = data().value(idxs, &chk);
63  if ( chk ) return valdef;
64  return val;
65  }
unsigned int Index
std::array< Index, 2 > IndexArray
Definition: Real2dData.h:34
Float value(const IndexArray &isams, Index *pchk=nullptr) const
Definition: Real2dData.h:184
Index channelOffset() const
Definition: Tpc2dRoi.h:44
const DataArray & data() const
Definition: Tpc2dRoi.h:50
LongIndex sampleOffset() const
Definition: Tpc2dRoi.h:38

Member Data Documentation

Index Tpc2dRoi::m_channelOffset
private

Definition at line 79 of file Tpc2dRoi.h.

Real2dData<float> Tpc2dRoi::m_data
private

Definition at line 77 of file Tpc2dRoi.h.

DftPtr Tpc2dRoi::m_pdft
private

Definition at line 80 of file Tpc2dRoi.h.

LongIndex Tpc2dRoi::m_sampleOffset
private

Definition at line 78 of file Tpc2dRoi.h.


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