OpenMS
Loading...
Searching...
No Matches
Observation.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: Hendrik Weisser $
6// $Authors: Hendrik Weisser $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12
16
17
18namespace OpenMS
19{
20 namespace IdentificationDataInternal
21 {
26 {
28 std::string data_id;
29
32
33 double rt, mz; //< Position
34
36 explicit Observation(
37 const std::string& data_id,
39 double rt = std::numeric_limits<double>::quiet_NaN(),
40 double mz = std::numeric_limits<double>::quiet_NaN()):
42 {
43 }
44
47 {
48 // merge meta info - existing entries may be overwritten:
49 addMetaValues(other);
50 rt = other.rt;
51 mz = other.mz;
52 return *this;
53 }
54 };
55
56 // combination of input file and data ID must be unique:
59 }
60}
A collection of identification records, unique and ordered by the key formed from the members KeyMemb...
Definition IDDataContainer.h:62
Interface for classes that can store arbitrary meta information (Type-Name-Value tuples).
Definition MetaInfoInterface.h:35
void addMetaValues(const MetaInfoInterface &from)
IteratorWrapper< Observations::iterator > ObservationRef
Definition Observation.h:58
IteratorWrapper< InputFiles::iterator > InputFileRef
Definition InputFile.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Representation of an observation, e.g. a spectrum or feature, in an input data file.
Definition Observation.h:26
double mz
Definition Observation.h:33
std::string data_id
Spectrum or feature ID (from the file referenced by input_file)
Definition Observation.h:28
InputFileRef input_file
Reference to the input file.
Definition Observation.h:31
Observation & merge(const Observation &other)
Merge in data from another object.
Definition Observation.h:46
Observation(const std::string &data_id, const InputFileRef &input_file, double rt=std::numeric_limits< double >::quiet_NaN(), double mz=std::numeric_limits< double >::quiet_NaN())
Constructor.
Definition Observation.h:36
double rt
Definition Observation.h:33