OpenMS
IndexedMzMLDecoder.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hannes Roest $
6 // $Authors: Hannes Roest $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
11 #include <OpenMS/config.h>
12 #include <OpenMS/CONCEPT/Types.h>
15 
16 namespace OpenMS
17 {
18 
32  class OPENMS_DLLAPI IndexedMzMLDecoder
33  {
34  public:
35 
37  typedef std::vector< std::pair<std::string, std::streampos> > OffsetVector;
38 
54  int parseOffsets(const String& filename, std::streampos indexoffset, OffsetVector & spectra_offsets, OffsetVector& chromatograms_offsets);
55 
81  std::streampos findIndexListOffset(const String& filename, int buffersize = 1023);
82 
83  protected:
84 
120  int domParseIndexedEnd_(const std::string& in, OffsetVector & spectra_offsets, OffsetVector& chromatograms_offsets);
121  };
122 
123 }
A class to analyze indexedmzML files and extract the offsets of individual tags.
Definition: IndexedMzMLDecoder.h:33
int domParseIndexedEnd_(const std::string &in, OffsetVector &spectra_offsets, OffsetVector &chromatograms_offsets)
Extract data from a string containing an <indexList> tag.
std::streampos findIndexListOffset(const String &filename, int buffersize=1023)
Tries to extract the indexList offset from an indexedmzML.
int parseOffsets(const String &filename, std::streampos indexoffset, OffsetVector &spectra_offsets, OffsetVector &chromatograms_offsets)
Tries to extract the offsets of all spectra and chromatograms from an indexedmzML.
std::vector< std::pair< std::string, std::streampos > > OffsetVector
The vector containing binary offsets.
Definition: IndexedMzMLDecoder.h:37
A more convenient string class.
Definition: String.h:34
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22