OpenMS
MSPFile.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
15 #include <vector>
16 
17 namespace OpenMS
18 {
27  class OPENMS_DLLAPI MSPFile :
28  public DefaultParamHandler
29  {
30 public:
31 
37 
39  MSPFile(const MSPFile & rhs);
40 
42  ~MSPFile() override;
44 
46  MSPFile & operator=(const MSPFile & rhs);
47 
59  void load(const String & filename, std::vector<PeptideIdentification> & ids, PeakMap & exp);
60 
66  void store(const String & filename, const PeakMap & exp) const;
67 
68 protected:
69 
71  void parseHeader_(const String & header, PeakSpectrum & spec);
72  };
73 
74 } // namespace OpenMS
75 
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:45
File adapter for MSP files (NIST spectra library)
Definition: MSPFile.h:29
void load(const String &filename, std::vector< PeptideIdentification > &ids, PeakMap &exp)
Loads a map from a MSPFile file.
void parseHeader_(const String &header, PeakSpectrum &spec)
reads the header information and stores it as metainfo in the spectrum
MSPFile()
Default constructor.
MSPFile(const MSPFile &rhs)
Copy constructor.
~MSPFile() override
Destructor.
void store(const String &filename, const PeakMap &exp) const
Stores a map in a MSPFile file.
MSPFile & operator=(const MSPFile &rhs)
assignment operator
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19