Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
kome::operation::Normalization Class Reference

normalization class More...

#include <Normalization.h>

Inheritance diagram for kome::operation::Normalization:
Inheritance graph
[legend]
Collaboration diagram for kome::operation::Normalization:
Collaboration graph
[legend]

Public Member Functions

 Normalization ()
 constructor
 
virtual ~Normalization ()
 destructor
 
void setNormalizInfo (kome::plugin::PluginCall *func, kome::objects::SettingParameterValues *settings, kome::objects::DataGroupNode *stdGroup)
 sets filter information More...
 
- Public Member Functions inherited from kome::objects::XYDataOperation
 XYDataOperation ()
 constructor
 
virtual ~XYDataOperation ()
 destructor
 
void setName (const char *name)
 sets name More...
 
const char * getName ()
 gets name More...
 
void setIndex (int index)
 set index More...
 
int getIndex ()
 get index More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Chromatogram &chrom)
 updates xy data More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Spectrum &spec)
 updates xy data More...
 
void update (kome::core::XYData &src, kome::core::XYData &dst, Sample &sample)
 updates xy data More...
 

Protected Member Functions

void init ()
 initializes
 
virtual void getUpdatedData (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum *spec)
 gets updated data points More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Chromatogram &chrom)
 This method is called by update method. (override method) More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum &spec)
 This method is called by update method. (override method) More...
 
virtual void onUpdate (kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Sample &sample)
 This method is called by update method. (override method) More...
 

Protected Attributes

kome::plugin::PluginCall * m_fun
 
kome::objects::SettingParameterValues m_settings
 
kome::objects::DataGroupNodem_stdGroup
 
kome::objects::DataGroupNodem_trmtGroup
 
- Protected Attributes inherited from kome::objects::XYDataOperation
std::string m_name
 
int m_index
 

Detailed Description

normalization class

Definition at line 28 of file Normalization.h.

Member Function Documentation

void kome::operation::Normalization::getUpdatedData ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Spectrum spec 
)
protectedvirtual

gets updated data points

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]specspectrum

Definition at line 99 of file Normalization.cpp.

103  {
104  // check the member
105  if( m_fun == NULL ){
106  LOG_WARN_CODE( FMT( "The filter function is not assigned." ), ERR_NULL_POINTER );
107  return;
108  }
109 
110  // parameters
112 
113  kome::plugin::PluginCallTool::setXYData( params, src );
114  kome::plugin::PluginCallTool::setUpdatedXYData( params, dst );
115  kome::plugin::PluginCallTool::setSettingValues( params, m_settings );
116  kome::plugin::PluginCallTool::setSpectrum( params, *spec );
117 
118  kome::plugin::PluginCallTool::setControlGroup( params, *m_stdGroup );
119  kome::plugin::PluginCallTool::setGroup( params, *m_trmtGroup );
120 
121  // normalization methods
122  m_fun->invoke( &params );
123 }
kome::objects::SettingParameterValues m_settings
Definition: Normalization.h:47
const unsigned int ERR_NULL_POINTER
Definition: ErrorCode.h:69
kome::objects::DataGroupNode * m_trmtGroup
Definition: Normalization.h:53
kome::objects::DataGroupNode * m_stdGroup
Definition: Normalization.h:50
#define NULL
Definition: CoreMacros.h:18
kome::plugin::PluginCall * m_fun
Definition: Normalization.h:44
parameters of plug-in function management class
Definition: Parameters.h:28
void kome::operation::Normalization::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Chromatogram chrom 
)
protectedvirtual

This method is called by update method. (override method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]chromchromatogram

Implements kome::objects::XYDataOperation.

Definition at line 126 of file Normalization.cpp.

130  {
131  m_trmtGroup = chrom.getOrgChromatogram()->getGroup(); // @date 2014.03.06 <Mod> M.Izumi
132  getUpdatedData( src, dst, NULL );
133 }
DataGroupNode * getGroup()
gets spectrum group
kome::objects::DataGroupNode * m_trmtGroup
Definition: Normalization.h:53
#define NULL
Definition: CoreMacros.h:18
virtual void getUpdatedData(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum *spec)
gets updated data points
Chromatogram * getOrgChromatogram()
gets original chromatogram

Here is the call graph for this function:

void kome::operation::Normalization::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Spectrum spec 
)
protectedvirtual

This method is called by update method. (override method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]specspectrum

Implements kome::objects::XYDataOperation.

Definition at line 136 of file Normalization.cpp.

140  {
141  m_trmtGroup = spec.getOrgSpectrum()->getGroup(); // @date 2014.03.06 <Mod> M.Izumi
142  getUpdatedData( src, dst, &spec );
143 }
kome::objects::DataGroupNode * m_trmtGroup
Definition: Normalization.h:53
Spectrum * getOrgSpectrum()
gets original spectrum
Definition: Spectrum.cpp:1003
virtual void getUpdatedData(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum *spec)
gets updated data points
DataGroupNode * getGroup()
gets spectrum group
Definition: Spectrum.cpp:898

Here is the call graph for this function:

void kome::operation::Normalization::onUpdate ( kome::core::XYData src,
kome::core::XYData dst,
kome::objects::Sample sample 
)
protectedvirtual

This method is called by update method. (override method)

Parameters
[in]srcsource xy data
[out]dstthe object to store updated xy data
[in]samplesample object

Implements kome::objects::XYDataOperation.

Definition at line 146 of file Normalization.cpp.

150  {
152  getUpdatedData( src, dst, NULL );
153 }
kome::objects::DataGroupNode * m_trmtGroup
Definition: Normalization.h:53
#define NULL
Definition: CoreMacros.h:18
virtual void getUpdatedData(kome::core::XYData &src, kome::core::XYData &dst, kome::objects::Spectrum *spec)
gets updated data points
DataGroupNode * getRootDataGroupNode()
gets root spectrum group
Definition: Sample.cpp:219

Here is the call graph for this function:

void kome::operation::Normalization::setNormalizInfo ( kome::plugin::PluginCall *  func,
kome::objects::SettingParameterValues settings,
kome::objects::DataGroupNode stdGroup 
)

sets filter information

Parameters
[in]funcfilter function
[in]settingssetting parameter values
[in]stdGroupstandard group

Definition at line 49 of file Normalization.cpp.

53  {
54  // initialize
55  init();
56  if( func == NULL ){
57  return;
58  }
59 
60  if( stdGroup != NULL ){
61  m_stdGroup = stdGroup;
62  }
63 
64  // set information
65  m_fun = func;
66  if( settings != NULL ){
67  m_settings = *settings;
68  }
69 
70  // item
71  kome::plugin::PluginFunctionItem item;
72  item.setInfo( func );
73 
74  // set name
75  std::string name = FMT( "Normalization [%s", item.getLongName() );
76  std::string paramStr;
77  for( unsigned int i=0; i < m_settings.getNumberOfParameters(); i++ ){
78  // add parameter name
79  if( !paramStr.empty() ){
80  paramStr.append( ", " );
81  }
82 
83  std::string name = m_settings.getParameterName( i );
84  std::string value = m_settings.getParameterValue( i );
85 
86  paramStr.append( FMT( "%s=%s", name.c_str(), value.c_str() ) );
87  }
88 
89  if( paramStr.empty() ){
90  name.append( "]" );
91  }else{
92  name.append( FMT( "(%s)]", paramStr.c_str() ) );
93  }
94 
95  setName( name.c_str() );
96 }
kome::objects::SettingParameterValues m_settings
Definition: Normalization.h:47
void setName(const char *name)
sets name
kome::objects::DataGroupNode * m_stdGroup
Definition: Normalization.h:50
#define NULL
Definition: CoreMacros.h:18
const char * getParameterValue(const unsigned int index)
gets parameter value
kome::plugin::PluginCall * m_fun
Definition: Normalization.h:44
const char * getParameterName(const unsigned int index)
gets parameter name
unsigned int getNumberOfParameters()
gets the number of parameters

Here is the call graph for this function:

Member Data Documentation

kome::plugin::PluginCall* kome::operation::Normalization::m_fun
protected

filter function

Definition at line 44 of file Normalization.h.

kome::objects::SettingParameterValues kome::operation::Normalization::m_settings
protected

parameters

Definition at line 47 of file Normalization.h.

kome::objects::DataGroupNode* kome::operation::Normalization::m_stdGroup
protected

standard group

Definition at line 50 of file Normalization.h.

kome::objects::DataGroupNode* kome::operation::Normalization::m_trmtGroup
protected

treatment group

Definition at line 53 of file Normalization.h.


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