OpenMS
TICFilter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 //
9 #pragma once
10 
12 
13 namespace OpenMS
14 {
22  class OPENMS_DLLAPI TICFilter :
23  public FilterFunctor
24  {
25 public:
26 
27  // @name Constructors and Destructors
28  // @{
31 
33  TICFilter(const TICFilter & source);
34 
36  ~TICFilter() override;
37  // @}
38 
39  // @name Operators
40  // @{
42  TICFilter & operator=(const TICFilter & source);
43  // @}
44 
45  // @name Accessors
46  // @{
48  static FilterFunctor * create() { return new TICFilter(); }
49 
51  template <typename SpectrumType>
52  double apply(SpectrumType & spectrum)
53  {
54  typedef typename SpectrumType::ConstIterator ConstIterator;
55  double TIC = 0;
56  //double window = (double)param_.getValue("window");
57 
58  for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
59  {
60  TIC += it->getIntensity();
61  }
62  return TIC;
63  }
64 
66  static const String getProductName()
67  {
68  return "TICFilter";
69  }
70 
71  // @}
72 
73  };
74 }
A FilterFunctor extracts some spectrum characteristics for quality assessment.
Definition: FilterFunctor.h:20
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:110
A more convenient string class.
Definition: String.h:34
TICFilter calculates TIC.
Definition: TICFilter.h:24
TICFilter(const TICFilter &source)
copy constructor
~TICFilter() override
destructor
static FilterFunctor * create()
Definition: TICFilter.h:48
double apply(SpectrumType &spectrum)
Definition: TICFilter.h:52
TICFilter & operator=(const TICFilter &source)
assignment operator
TICFilter()
standard constructor
static const String getProductName()
Definition: TICFilter.h:66
Definition: TIC.h:30
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22