OpenMS
MzDataFile.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: Marc Sturm $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/FORMAT/XMLFile.h>
15 #include <OpenMS/KERNEL/Peak1D.h>
19 
20 namespace OpenMS
21 {
27  class OPENMS_DLLAPI MzDataFile :
28  public Internal::XMLFile,
29  public ProgressLogger
30  {
31  typedef PeakMap MapType;
32 
33 public:
34 
38  ~MzDataFile() override;
39 
42 
44  const PeakFileOptions & getOptions() const;
45 
47  void setOptions(const PeakFileOptions &);
48 
57  void load(const String & filename, MapType & map);
58 
66  void store(const String & filename, const MapType & map) const;
67 
77  bool isSemanticallyValid(const String & filename, StringList & errors, StringList & warnings);
78 
79 private:
80 
83  };
84 
85 } // namespace OpenMS
86 
87 
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:45
File adapter for MzData files.
Definition: MzDataFile.h:30
void setOptions(const PeakFileOptions &)
set options for loading/storing
MzDataFile()
Default constructor.
const PeakFileOptions & getOptions() const
Non-mutable access to the options for loading/storing.
PeakFileOptions options_
Options for loading / storing.
Definition: MzDataFile.h:82
~MzDataFile() override
Destructor.
void load(const String &filename, MapType &map)
Loads a map from a MzData file.
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
PeakMap MapType
Definition: MzDataFile.h:31
void store(const String &filename, const MapType &map) const
Stores a map in a MzData file.
bool isSemanticallyValid(const String &filename, StringList &errors, StringList &warnings)
Checks if a file is valid with respect to the mapping file and the controlled vocabulary.
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
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:44
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19