ProteoWizard
SpectrumList_Waters.hpp
Go to the documentation of this file.
1 //
2 // $Id: SpectrumList_Waters.hpp 4005 2012-10-12 21:37:32Z chambm $
3 //
4 //
5 // Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
6 //
7 // Copyright 2009 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 
25 #include "Reader_Waters_Detail.hpp"
29 
30 
31 using boost::shared_ptr;
32 
33 
34 namespace pwiz {
35 namespace msdata {
36 namespace detail {
37 
38 
39 //
40 // SpectrumList_Waters
41 //
43 {
44  public:
45 
46  virtual size_t size() const;
47  virtual const SpectrumIdentity& spectrumIdentity(size_t index) const;
48  virtual size_t find(const string& id) const;
49  virtual SpectrumPtr spectrum(size_t index, bool getBinaryData) const;
50  virtual SpectrumPtr spectrum(size_t index, DetailLevel detailLevel) const;
51 
52 #ifdef PWIZ_READER_WATERS
53  SpectrumList_Waters(MSData& msd, RawDataPtr rawdata);
54 
55  private:
56 
57  MSData& msd_;
58  RawDataPtr rawdata_;
59  size_t size_;
60 
61  struct IndexEntry : public SpectrumIdentity
62  {
63  int function;
64  int process;
65  int scan;
66  };
67 
68  mutable vector<IndexEntry> index_;
69  mutable map<string, size_t> idToIndexMap_;
70 
71  void createIndex();
72 #endif // PWIZ_READER_WATERS
73 };
74 
75 } // detail
76 } // msdata
77 } // pwiz