ProteoWizard
MSIHandler.hpp
Go to the documentation of this file.
1 //
2 // $Id$
3 //
4 //
5 // Original author: Robert Burke <robert.burke@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 _MSIREADER_HPP_
25 #define _MSIREADER_HPP_
26 
28 #include "TabReader.hpp"
29 #include "boost/shared_ptr.hpp"
30 
31 namespace pwiz {
32 namespace util {
33 
35 {
36 public:
37 
38  struct Record
39  {
40  Record() : scan(0), time(0), mz(0), intensity(0), charge(0), chargeStates(0), kl(0), background(0), median(0), peaks(0), scanFirst(0), scanLast(0), scanCount(0) {}
41  Record(const std::vector<std::string>& fields);
42  Record(const Record& r);
43 
44  size_t scan;
45  float time;
46  float mz;
47  float mass;
48  float intensity;
49  int charge;
51  float kl;
52  float background;
53  float median;
54  int peaks;
55  int scanFirst;
56  int scanLast;
57  int scanCount;
58 
59  };
60 
62 
63  virtual ~MSIHandler() {}
64 
65  virtual bool updateRecord(const std::vector<std::string>& fields);
66 
67  size_t size() const;
68 
69  Record record(size_t index) const;
70 
71  Record lastRecord() const;
72 
73 private:
74  class Impl;
75  boost::shared_ptr<Impl> pimpl;
76 };
77 
78 } // namespace pwiz
79 } // namespace utility
80 
81 
82 #endif // _MSIREADER_HPP_
pwiz::util::MSIHandler::Record::median
float median
Definition: MSIHandler.hpp:53
pwiz::util::MSIHandler::Record::scan
size_t scan
Definition: MSIHandler.hpp:44
pwiz::util::MSIHandler
Definition: MSIHandler.hpp:35
pwiz
Definition: ChromatogramList_Filter.hpp:36
pwiz::util::MSIHandler::Record::Record
Record(const Record &r)
pwiz::util::MSIHandler::size
size_t size() const
pwiz::util::MSIHandler::~MSIHandler
virtual ~MSIHandler()
Definition: MSIHandler.hpp:63
pwiz::util::MSIHandler::Record::intensity
float intensity
Definition: MSIHandler.hpp:48
pwiz::util::MSIHandler::lastRecord
Record lastRecord() const
pwiz::util::MSIHandler::updateRecord
virtual bool updateRecord(const std::vector< std::string > &fields)
TabReader.hpp
pwiz::util::MSIHandler::record
Record record(size_t index) const
PWIZ_API_DECL
#define PWIZ_API_DECL
Definition: Export.hpp:32
pwiz::util::MSIHandler::Record::charge
int charge
Definition: MSIHandler.hpp:49
pwiz::util::MSIHandler::Record::scanFirst
int scanFirst
Definition: MSIHandler.hpp:55
Export.hpp
pwiz::util::MSIHandler::Record::mz
float mz
Definition: MSIHandler.hpp:46
pwiz::util::DefaultTabHandler
Definition: TabReader.hpp:56
pwiz::util::MSIHandler::Record::mass
float mass
Definition: MSIHandler.hpp:47
pwiz::util::MSIHandler::Record::background
float background
Definition: MSIHandler.hpp:52
pwiz::util::MSIHandler::Record::chargeStates
int chargeStates
Definition: MSIHandler.hpp:50
pwiz::util::MSIHandler::Record::Record
Record(const std::vector< std::string > &fields)
pwiz::util::MSIHandler::pimpl
boost::shared_ptr< Impl > pimpl
Definition: MSIHandler.hpp:74
pwiz::util::MSIHandler::Record::kl
float kl
Definition: MSIHandler.hpp:51
pwiz::util::MSIHandler::Record
Definition: MSIHandler.hpp:39
pwiz::util::MSIHandler::MSIHandler
MSIHandler()
pwiz::util::MSIHandler::Record::scanLast
int scanLast
Definition: MSIHandler.hpp:56
pwiz::util::MSIHandler::Record::peaks
int peaks
Definition: MSIHandler.hpp:54
pwiz::util::MSIHandler::Record::scanCount
int scanCount
Definition: MSIHandler.hpp:57
pwiz::chemistry::Ion::mz
double mz(double neutralMass, int protonDelta, int electronDelta=0, int neutronDelta=0)
Definition: Ion.hpp:78
pwiz::util::MSIHandler::Record::time
float time
Definition: MSIHandler.hpp:45
pwiz::util::MSIHandler::Record::Record
Record()
Definition: MSIHandler.hpp:40