6#ifndef DAQ_DPM_MERGE_SOURCES_HPP
7#define DAQ_DPM_MERGE_SOURCES_HPP
13#include <nlohmann/json.hpp>
27 explicit Source(std::string name)
noexcept;
28 std::string
const&
GetName() const noexcept {
75 std::filesystem::path m_path;
88 KeywordRules(std::optional<KeywordRuleProcessor::DefaultRule>
const& initial,
89 std::unique_ptr<KeywordRuleProcessor> keyword_rules);
99 std::optional<KeywordRuleProcessor::DefaultRule> m_initial;
100 std::unique_ptr<KeywordRuleProcessor> m_processor;
120 std::filesystem::path path,
121 std::optional<KeywordRuleProcessor::DefaultRule>
const& initial_keywords,
122 std::unique_ptr<KeywordRuleProcessor> keyword_rules);
127 std::filesystem::path path,
128 std::optional<KeywordRuleProcessor::DefaultRule>
const& initial_keywords,
129 std::unique_ptr<KeywordRuleProcessor> keyword_rules,
131 using FitsFile::Close;
132 using FitsFile::GetFilePath;
133 using FitsFile::GetFitsFile;
134 using KeywordRules::GetInitialKeywords;
135 using KeywordRules::GetKeywordRuleProcessor;
136 using Source::GetName;
147 std::filesystem::path path,
148 std::string location,
149 std::optional<KeywordRuleProcessor::DefaultRule>
const& initial_keywords,
150 std::unique_ptr<KeywordRuleProcessor> keyword_rules,
151 bool alert_unmergeable);
156 std::filesystem::path path,
157 std::string location,
158 std::optional<KeywordRuleProcessor::DefaultRule>
const& initial_keywords,
159 std::unique_ptr<KeywordRuleProcessor> keyword_rules,
160 bool alert_unmergeable,
163 using FitsFile::Close;
164 using FitsFile::GetFilePath;
165 using FitsFile::GetFitsFile;
166 using KeywordRules::GetInitialKeywords;
167 using KeywordRules::GetKeywordRuleProcessor;
168 using Source::GetName;
175 return m_alert_unmergeable;
182 std::string m_location;
186 bool m_alert_unmergeable;
198 std::optional<KeywordRuleProcessor::DefaultRule>
const& initial_keywords,
199 std::unique_ptr<KeywordRuleProcessor> keyword_rules)
noexcept;
200 using KeywordRules::GetInitialKeywords;
201 using KeywordRules::GetKeywordRuleProcessor;
202 using Source::GetName;
219using SourceTypes = std::variant<FitsKeywordsSource, FitsFileSource>;
Contains functions and data structures related to cfitsio.
Interface for keyword rule processors.
std::string const & GetLocation() const noexcept
bool AlertUnmergeable() const noexcept
fits::KeywordVector & GetKeywords() &noexcept
fits::KeywordVector const & GetKeywords() const &noexcept
fitsfile * GetFitsFile() const noexcept
Get fits file pointer.
void Close()
Close fits file.
std::filesystem::path const & GetFilePath() const &noexcept
Get file system path associated with this file.
Represents the keyword rules from the Data Product Specification.
auto GetKeywordRuleProcessor() const -> KeywordRuleProcessor const &
auto GetInitialKeywords() const -> std::optional< KeywordRuleProcessor::DefaultRule > const &
std::string const & GetName() const noexcept
Contains data structure for FITS keywords.
std::variant< FitsKeywordsSource, FitsFileSource > SourceTypes
Variant of the different supported source types.
std::unique_ptr< fitsfile, void(*)(fitsfile *) noexcept > UniqueFitsFile
Defines unique ownership type to cfitsio fitsfile.
std::vector< KeywordVariant > KeywordVector
Vector of keywords.