ProteoWizard
Reader_Thermo.hpp
Go to the documentation of this file.
1//
2// $Id$
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 _READER_THERMO_HPP_
25#define _READER_THERMO_HPP_
26
27
30
31namespace pwiz {
32namespace msdata {
33
34
36{
37 public:
38
39 virtual std::string identify(const std::string& filename,
40 const std::string& head) const;
41
42 virtual void read(const std::string& filename,
43 const std::string& head,
44 MSData& result,
45 int runIndex = 0,
46 const Config& config = Config()) const;
47
48 virtual void read(const std::string& filename,
49 const std::string& head,
50 std::vector<MSDataPtr>& results,
51 const Config& config = Config()) const
52 {
53 results.push_back(MSDataPtr(new MSData));
54 read(filename, head, *results.back(), 0, config);
55 }
56
57 virtual const char *getType() const {return "Thermo RAW";}
58
59 /// checks header for "Finnigan" wide char string
60 static bool hasRAWHeader(const std::string& head);
61};
62
63
64} // namespace msdata
65} // namespace pwiz
66
67
68#endif // _READER_THERMO_HPP_
69
#define PWIZ_API_DECL
Definition Export.hpp:32
virtual void read(const std::string &filename, const std::string &head, MSData &result, int runIndex=0, const Config &config=Config()) const
fill in the MSData structure from the first (or only) sample
virtual void read(const std::string &filename, const std::string &head, std::vector< MSDataPtr > &results, const Config &config=Config()) const
fill in a vector of MSData structures; provides support for multi-run input files
virtual const char * getType() const
returns a unique string identifying the reader type
virtual std::string identify(const std::string &filename, const std::string &head) const
return file type iff Reader recognizes the file, else empty;
static bool hasRAWHeader(const std::string &head)
checks header for "Finnigan" wide char string
interface for file readers
Definition Reader.hpp:39
boost::shared_ptr< MSData > MSDataPtr
Definition MSData.hpp:913
This is the root element of ProteoWizard; it represents the mzML element, defined as: intended to cap...
Definition MSData.hpp:850
Reader configuration.
Definition Reader.hpp:45