ProteoWizard
ChromatogramList_Thermo.hpp
Go to the documentation of this file.
1 //
2 // $Id: ChromatogramList_Thermo.hpp 3808 2012-07-24 20:31:10Z donmarsh $
3 //
4 //
5 // Original author: Darren Kessner <darren@proteowizard.org>
6 //
7 // Copyright 2008 Spielberg Family Center for Applied Proteomics
8 // Cedars-Sinai Medical Center, Los Angeles, California 90048
9 //
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
13 //
14 // http://www.apache.org/licenses/LICENSE-2.0
15 //
16 // Unless required by applicable law or agreed to in writing, software
17 // distributed under the License is distributed on an "AS IS" BASIS,
18 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 // See the License for the specific language governing permissions and
20 // limitations under the License.
21 //
22 
23 
24 #ifndef _CHROMATOGRAMLIST_THERMO_
25 #define _CHROMATOGRAMLIST_THERMO_
26 
27 
34 
35 
36 #ifdef PWIZ_READER_THERMO
37 #include "pwiz_aux/msrc/utility/vendor_api/thermo/RawFile.h"
39 using namespace pwiz::vendor_api::Thermo;
40 #endif // PWIZ_READER_THERMO
41 
42 
43 using boost::shared_ptr;
44 
45 
46 namespace pwiz {
47 namespace msdata {
48 namespace detail {
49 
51 {
52 public:
53 
54  virtual size_t size() const;
55  virtual const ChromatogramIdentity& chromatogramIdentity(size_t index) const;
56  virtual size_t find(const string& id) const;
57  virtual ChromatogramPtr chromatogram(size_t index, bool getBinaryData) const;
58 
59 #ifdef PWIZ_READER_THERMO
60  ChromatogramList_Thermo(const MSData& msd, RawFilePtr rawfile, const Reader::Config& config);
61 
62  private:
63 
64  const MSData& msd_;
65  shared_ptr<RawFile> rawfile_;
66  const Reader::Config config_;
67 
68  mutable util::once_flag_proxy indexInitialized_;
69 
70  struct IndexEntry : public ChromatogramIdentity
71  {
72  CVID chromatogramType;
73  ControllerType controllerType;
74  long controllerNumber;
75  string filter;
76  double q1, q3;
77  double q3Offset;
78  };
79 
80  mutable vector<IndexEntry> index_;
81  mutable map<string, size_t> idMap_;
82 
83  void createIndex() const;
84 #endif // PWIZ_READER_THERMO
85 };
86 
87 } // detail
88 } // msdata
89 } // pwiz
90 
91 #endif // _CHROMATOGRAMLIST_THERMO_