OpenMS
MzXMLFile.h
Go to the documentation of this file.
1 // Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Marc Sturm $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
12 #include <OpenMS/FORMAT/XMLFile.h>
16 
17 namespace OpenMS
18 {
19  class String;
20 
26  class OPENMS_DLLAPI MzXMLFile :
27  public Internal::XMLFile,
28  public ProgressLogger
29  {
30  typedef PeakMap MapType;
31 
32 public:
36  ~MzXMLFile() override;
37 
40 
42  const PeakFileOptions & getOptions() const;
43 
45  void setOptions(const PeakFileOptions &);
46 
55  void load(const String & filename, MapType & map);
56 
64  void store(const String & filename, const MapType & map) const;
65 
84  void transform(const String& filename_in, Interfaces::IMSDataConsumer * consumer, bool skip_full_count = false);
85 
100  void transform(const String& filename_in, Interfaces::IMSDataConsumer * consumer, MapType& map, bool skip_full_count = false);
101 
102 protected:
103 
105  void transformFirstPass_(const String& filename_in, Interfaces::IMSDataConsumer * consumer, bool skip_full_count);
106 
107 private:
108 
110  };
111 } // namespace OpenMS
112 
The interface of a consumer of spectra and chromatograms.
Definition: IMSDataConsumer.h:46
Base class for loading/storing XML files that have a handler derived from XMLHandler.
Definition: XMLFile.h:23
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
File adapter for MzXML 3.1 files.
Definition: MzXMLFile.h:29
~MzXMLFile() override
Destructor.
void setOptions(const PeakFileOptions &)
set options for loading/storing
const PeakFileOptions & getOptions() const
Non-mutable access to the options for loading/storing.
PeakFileOptions options_
Definition: MzXMLFile.h:109
void transform(const String &filename_in, Interfaces::IMSDataConsumer *consumer, bool skip_full_count=false)
Transforms a map while loading using the supplied MSDataConsumer.
void transformFirstPass_(const String &filename_in, Interfaces::IMSDataConsumer *consumer, bool skip_full_count)
Perform first pass through the file and retrieve the meta-data to initialize the consumer.
void load(const String &filename, MapType &map)
Loads a map from a MzXML file.
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
MzXMLFile()
Default constructor.
PeakMap MapType
Definition: MzXMLFile.h:30
void store(const String &filename, const MapType &map) const
Stores a map in a MzXML file.
void transform(const String &filename_in, Interfaces::IMSDataConsumer *consumer, MapType &map, bool skip_full_count=false)
Transforms a map while loading using the supplied MSDataConsumer.
Options for loading files containing peak data.
Definition: PeakFileOptions.h:22
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:27
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19