ProteoWizard
ChromatogramList_ABI.hpp
Go to the documentation of this file.
1 //
2 // $Id: ChromatogramList_ABI.hpp 2735 2011-05-29 05:53:40Z brendanx $
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 
26 #ifdef PWIZ_READER_ABI
27 #include "pwiz_aux/msrc/utility/vendor_api/ABI/WiffFile.hpp"
29 using namespace pwiz::vendor_api::ABI;
30 #endif // PWIZ_READER_ABI
31 
32 
33 namespace pwiz {
34 namespace msdata {
35 namespace detail {
36 
37 
39 {
40  public:
41 
42  virtual size_t size() const;
43  virtual const ChromatogramIdentity& chromatogramIdentity(size_t index) const;
44  virtual size_t find(const std::string& id) const;
45  virtual ChromatogramPtr chromatogram(size_t index, bool getBinaryData) const;
46 
47 #ifdef PWIZ_READER_ABI
48  ChromatogramList_ABI(const MSData& msd, WiffFilePtr wifffile, const ExperimentsMap& experimentsMap, int sample);
49 
50  private:
51 
52  const MSData& msd_;
53  WiffFilePtr wifffile_;
54  ExperimentsMap experimentsMap_;
55  int sample;
56 
57  mutable size_t size_;
58 
59  mutable util::once_flag_proxy indexInitialized_;
60 
61  struct IndexEntry : public ChromatogramIdentity
62  {
63  CVID chromatogramType;
64  int sample;
65  int period;
66  ExperimentPtr experiment;
67  int transition;
68  double q1, q3;
69  };
70 
71  mutable std::vector<IndexEntry> index_;
72  mutable std::map<std::string, size_t> idToIndexMap_;
73 
74  void createIndex() const;
75 #endif // PWIZ_READER_ABI
76 };
77 
78 
79 } // detail
80 } // msdata
81 } // pwiz