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 241 of file mzcalibrationmodel1.cpp.

255  : MzCalibrationModel1(T1_frame,
256  T2_frame,
257  digitizerTimebase,
258  digitizerDelay,
259  C0,
260  C1,
261  C2,
262  C3,
263  C4,
264  T1_ref,
265  T2_ref,
266  dC1,
267  dC2)
268 {
269 }
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 271 of file mzcalibrationmodel1.cpp.

272 {
273 }

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 277 of file mzcalibrationmodel1.cpp.

278 {
279  if(m_max > tof_index)
280  {
281  if(m_arrMasses[tof_index] == 0)
282  {
283  m_arrMasses[tof_index] =
285  }
286  return m_arrMasses[tof_index];
287  }
288  else
289  {
290  return MzCalibrationModel1::getMzFromTofIndex(tof_index);
291  }
292 }
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: