OpenMS
Loading...
Searching...
No Matches
QPXCollectionExport.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: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <OpenMS/config.h>
12
13#include <string>
14#include <vector>
15
16namespace OpenMS
17{
18 class ConsensusMap;
19 class ExperimentalDesign;
20
51class OPENMS_DLLAPI QPXCollectionExport
52{
53public:
75 static bool requireExportable(const ConsensusMap& cmap, const ExperimentalDesign& design);
76
107 class OPENMS_DLLAPI Transaction
108 {
109 public:
118 explicit Transaction(const std::string& directory);
119
127
131 void commit();
132
133 Transaction(const Transaction&) = delete;
137
138 private:
139 std::string directory_;
141 std::vector<std::string> preexisting_;
142 bool committed_ {false};
143 };
144};
145
146} // namespace OpenMS
A container for consensus elements.
Definition ConsensusMap.h:67
Representation of an experimental design in OpenMS. Instances can be loaded with the ExperimentalDesi...
Definition ExperimentalDesign.h:449
Scope guard that leaves no partial QPX collection behind.
Definition QPXCollectionExport.h:108
Transaction & operator=(Transaction &&)=delete
Transaction(const Transaction &)=delete
Transaction & operator=(const Transaction &)=delete
~Transaction()
Remove the collection files this export created, unless commit() was called.
std::vector< std::string > preexisting_
Collection files that were already on disk when the guard started; never removed.
Definition QPXCollectionExport.h:141
Transaction(const std::string &directory)
Start guarding a QPX collection directory.
std::string directory_
Definition QPXCollectionExport.h:139
void commit()
Keep the collection: the export completed.
Whole-collection preflight for the QPX Parquet export (-out_qpx)
Definition QPXCollectionExport.h:52
static bool requireExportable(const ConsensusMap &cmap, const ExperimentalDesign &design)
Refuse a collection that cannot be written in full, before any file is created.
OpenMS looks in the< code > OPENMS_THERMO_MANAGED_DIR</code > environment variable then in the share directory
Definition common-cmake-parameters.doxygen:179
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19