libpappsomspp
Library for mass spectrometry
pappso::MzCalibrationModel1Cached Class Reference

#include <mzcalibrationmodel1.h>

Inheritance diagram for pappso::MzCalibrationModel1Cached:
pappso::MzCalibrationModel1 pappso::MzCalibrationInterface

Public Member Functions

 MzCalibrationModel1Cached (double T1_frame, double T2_frame, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3, double C4, double T1_ref, double T2_ref, double dC1, double dC2)
 
virtual ~MzCalibrationModel1Cached ()
 
virtual double getMzFromTofIndex (quint32 tof_index) override
 get m/z from time of flight raw index More...
 
- Public Member Functions inherited from pappso::MzCalibrationModel1
 MzCalibrationModel1 (double T1_frame, double T2_frame, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3, double C4, double T1_ref, double T2_ref, double dC1, double dC2)
 
virtual ~MzCalibrationModel1 ()
 
virtual quint32 getTofIndexFromMz (double mz) override
 get raw TOF index of a given m/z More...
 
- Public Member Functions inherited from pappso::MzCalibrationInterface
 MzCalibrationInterface (double digitizerTimebase, double digitizerDelay)
 
virtual ~MzCalibrationInterface ()
 
MzCalibrationInterfaceoperator= (const MzCalibrationInterface &other)
 
bool operator== (const MzCalibrationInterface &other) const
 
double getTofFromTofIndex (quint32 tof_index) const
 get time of flight from raw index More...
 
double getTofFromTofIndex (double tof_index) const
 get time of flight from double index More...
 

Private Attributes

double m_arrMasses [600000] = {0}
 
quint32 m_max =600000
 

Additional Inherited Members

- Protected Attributes inherited from pappso::MzCalibrationInterface
double m_digitizerTimebase = 0
 
double m_digitizerDelay = 0
 
std::vector< double > m_mzCalibrationArr
 MZ calibration parameters. More...
 

Detailed Description

Definition at line 75 of file mzcalibrationmodel1.h.

Constructor & Destructor Documentation

◆ MzCalibrationModel1Cached()

pappso::MzCalibrationModel1Cached::MzCalibrationModel1Cached ( double  T1_frame,
double  T2_frame,
double  digitizerTimebase,
double  digitizerDelay,
double  C0,
double  C1,
double  C2,
double  C3,
double  C4,
double  T1_ref,
double  T2_ref,
double  dC1,
double  dC2 
)

Default constructor

Definition at line 238 of file mzcalibrationmodel1.cpp.

252  : MzCalibrationModel1(T1_frame,
253  T2_frame,
254  digitizerTimebase,
255  digitizerDelay,
256  C0,
257  C1,
258  C2,
259  C3,
260  C4,
261  T1_ref,
262  T2_ref,
263  dC1,
264  dC2)
265 {
266 }
MzCalibrationModel1(double T1_frame, double T2_frame, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3, double C4, double T1_ref, double T2_ref, double dC1, double dC2)

◆ ~MzCalibrationModel1Cached()

pappso::MzCalibrationModel1Cached::~MzCalibrationModel1Cached ( )
virtual

Destructor

Definition at line 268 of file mzcalibrationmodel1.cpp.

269 {
270 }

Member Function Documentation

◆ getMzFromTofIndex()

double MzCalibrationModel1Cached::getMzFromTofIndex ( quint32  tof_index)
overridevirtual

get m/z from time of flight raw index

Parameters
tof_indextime of flight
Returns
m/z value

Reimplemented from pappso::MzCalibrationModel1.

Definition at line 274 of file mzcalibrationmodel1.cpp.

275 {
276  if(m_max > tof_index)
277  {
278  if(m_arrMasses[tof_index] == 0)
279  {
280  m_arrMasses[tof_index] =
282  }
283  return m_arrMasses[tof_index];
284  }
285  else
286  {
287  return MzCalibrationModel1::getMzFromTofIndex(tof_index);
288  }
289 }
virtual double getMzFromTofIndex(quint32 tof_index) override
get m/z from time of flight raw index

References pappso::MzCalibrationModel1::getMzFromTofIndex(), m_arrMasses, and m_max.

Member Data Documentation

◆ m_arrMasses

double pappso::MzCalibrationModel1Cached::m_arrMasses[600000] = {0}
private

Definition at line 104 of file mzcalibrationmodel1.h.

Referenced by getMzFromTofIndex().

◆ m_max

quint32 pappso::MzCalibrationModel1Cached::m_max =600000
private

Definition at line 105 of file mzcalibrationmodel1.h.

Referenced by getMzFromTofIndex().


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