OpenMS
TICFilter.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, 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  // @{
47 
49  template <typename SpectrumType>
50  double apply(SpectrumType & spectrum)
51  {
52  typedef typename SpectrumType::ConstIterator ConstIterator;
53  double TIC = 0;
54  //double window = (double)param_.getValue("window");
55 
56  for (ConstIterator it = spectrum.begin(); it != spectrum.end(); ++it)
57  {
58  TIC += it->getIntensity();
59  }
60  return TIC;
61  }
62 
63  // @}
64 
65  };
66 }
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
TICFilter calculates TIC.
Definition: TICFilter.h:24
TICFilter(const TICFilter &source)
copy constructor
~TICFilter() override
destructor
double apply(SpectrumType &spectrum)
Definition: TICFilter.h:50
TICFilter & operator=(const TICFilter &source)
assignment operator
TICFilter()
standard constructor
Definition: TIC.h:30
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19