ProteoWizard
SpectrumList_ScanSummer.hpp
Go to the documentation of this file.
1 //
2 // $Id: SpectrumList_ScanSummer.hpp 6567 2014-08-01 20:14:32Z pcbrefugee $
3 //
4 //
5 // Original author: William French <william.r.french .@. vanderbilt.edu>
6 //
7 // Copyright 2008 Spielberg Family Center for Applied Proteomics
8 // Cedars-Sinai Medical Center, Los Angeles, California 90048
9 // Copyright 2008 Vanderbilt University - Nashville, TN 37232
10 //
11 // Licensed under the Apache License, Version 2.0 (the "License");
12 // you may not use this file except in compliance with the License.
13 // You may obtain a copy of the License at
14 //
15 // http://www.apache.org/licenses/LICENSE-2.0
16 //
17 // Unless required by applicable law or agreed to in writing, software
18 // distributed under the License is distributed on an "AS IS" BASIS,
19 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 // See the License for the specific language governing permissions and
21 // limitations under the License.
22 //
23 
24 
25 #ifndef _SPECTRUMLIST_SCANSUMMER_HPP_
26 #define _SPECTRUMLIST_SCANSUMMER_HPP_
27 
28 
31 
32 typedef struct {
33  double mz;
34  double intensity;
35 } parentIon;
36 
37 typedef struct {
38  double precursorMZ;
39  double rTimeStart;
40  std::vector <int> indexList;
42 
43 
44 namespace pwiz {
45 namespace analysis {
46 
47 
48 /// Provides a custom-sorted spectrum list
50 {
51  public:
52 
53  SpectrumList_ScanSummer(const msdata::SpectrumListPtr& inner, double precursorTol, double rTimeTol);
54  void pushSpectrum(const msdata::SpectrumIdentity&);
55  double getPrecursorMz(const msdata::Spectrum&) const;
56  //void sumSubScansResample( std::vector<double> &, std::vector<double> &, size_t, msdata::DetailLevel) const;
57  void sumSubScansNaive( std::vector<double> &, std::vector<double> &, size_t, msdata::DetailLevel) const;
58  virtual size_t size() const;
59  virtual const msdata::SpectrumIdentity& spectrumIdentity(size_t index) const;
60  virtual msdata::SpectrumPtr spectrum(size_t index, bool getBinaryData = false) const;
61  virtual msdata::SpectrumPtr spectrum(size_t index, msdata::DetailLevel) const;
62 
63  private:
64 
65  double lowerMZlimit;
66  double upperMZlimit;
67  double TotalDaltons;
68  double precursorTol_;
69  double rTimeTol_;
70 
71  mutable int ms2cnt;
72  std::vector<msdata::SpectrumIdentity> spectrumIdentities; // local cache, with fixed up index fields
73  std::vector<size_t> indexMap; // maps index -> original index
74  std::vector< precursorGroup > precursorList;
75  std::vector< precursorGroup > ms2RetentionTimes;
77  SpectrumList_ScanSummer& operator=(SpectrumList_ScanSummer&); //assignment operator
78 };
79 
80 
81 } // namespace analysis
82 } // namespace pwiz
83 
84 
85 #endif // _SPECTRUMLIST_SCANSUMMER_HPP_
86 
std::vector< precursorGroup > ms2RetentionTimes
std::vector< msdata::SpectrumIdentity > spectrumIdentities
boost::shared_ptr< Spectrum > SpectrumPtr
Definition: MSData.hpp:569
std::vector< int > indexList
Provides a custom-sorted spectrum list.
Inheritable pass-through implementation for wrapping a SpectrumList.
boost::shared_ptr< SpectrumList > SpectrumListPtr
Definition: MSData.hpp:707
#define PWIZ_API_DECL
Definition: Export.hpp:32
Identifying information for a spectrum.
Definition: MSData.hpp:469
The structure that captures the generation of a peak list (including the underlying acquisitions) ...
Definition: MSData.hpp:504