OpenMS
Loading...
Searching...
No Matches
InputFile.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
15
16
17#include <set>
18
19namespace OpenMS
20{
21 namespace IdentificationDataInternal
22 {
24 struct InputFile
25 {
26 std::string name;
27
29
30 std::set<std::string> primary_files;
31
32 explicit InputFile(const std::string& name,
33 const std::string& experimental_design_id = "",
34 const std::set<std::string>& primary_files =
35 std::set<std::string>()):
38 {
39 }
40
41 InputFile(const InputFile& other) = default;
42
44 InputFile& merge(const InputFile& other)
45 {
46 if (experimental_design_id.empty())
47 {
49 }
51 {
52 throw Exception::InvalidValue(__FILE__, __LINE__,
53 OPENMS_PRETTY_FUNCTION,
54 "Trying to overwrite InputFile experimental design id with conflicting value.",
56 }
57 primary_files.insert(other.primary_files.begin(),
58 other.primary_files.end());
59 return *this;
60 }
61 };
62
65
66 }
67}
Invalid value exception.
Definition Exception.h:306
A collection of identification records, unique and ordered by the key formed from the members KeyMemb...
Definition IDDataContainer.h:62
IteratorWrapper< InputFiles::iterator > InputFileRef
Definition InputFile.h:64
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Information about input files that were processed.
Definition InputFile.h:25
InputFile(const InputFile &other)=default
std::string name
Definition InputFile.h:26
std::string experimental_design_id
Definition InputFile.h:28
InputFile(const std::string &name, const std::string &experimental_design_id="", const std::set< std::string > &primary_files=std::set< std::string >())
Definition InputFile.h:32
std::set< std::string > primary_files
Definition InputFile.h:30
InputFile & merge(const InputFile &other)
Merge in data from another object.
Definition InputFile.h:44
Wrapper that adds operator< to iterators, so they can be used as (part of) keys in maps/sets or multi...
Definition MetaData.h:20