ProteoWizard
SpectrumList_ChargeStateCalculator.hpp
Go to the documentation of this file.
1 //
2 // $Id: SpectrumList_ChargeStateCalculator.hpp 4092 2012-11-08 17:44:45Z kaipot $
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers <a.t> vanderbilt.edu>
6 //
7 // Copyright 2008 Vanderbilt University - Nashville, TN 37232
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 //
21 
22 
23 #ifndef _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_
24 #define _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_
25 
26 
30 
31 
32 namespace pwiz {
33 namespace analysis {
34 
35 
36 /// SpectrumList implementation that assigns (probable) charge states to tandem mass spectra
38 {
39  public:
41  bool overrideExistingChargeState = true,
42  int maxMultipleCharge = 3,
43  int minMultipleCharge = 2,
44  double intensityFractionBelowPrecursorForSinglyCharged = 0.9,
45  bool makeMS2 = false);
46 
47  /// accepts any tandem mass spectrum
48  static bool accept(const msdata::SpectrumListPtr& inner) {return true;}
49 
50  /// charge calculation requires binary data to function, so returned spectra will always provide the binary data
51  virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData = true) const;
52 
53  private:
54  bool override_;
57  double fraction_;
58  bool makeMS2_;
59 };
60 
61 
62 } // namespace analysis
63 } // namespace pwiz
64 
65 
66 #endif // _SPECTRUMLIST_CHARGESTATECALCULATOR_HPP_