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);
152 using FitsFile::Close;
153 using FitsFile::GetFilePath;
154 using FitsFile::GetFitsFile;
155 using KeywordRules::GetInitialKeywords;
156 using KeywordRules::GetKeywordRuleProcessor;
157 using Source::GetName;
163 std::string m_location;
175 std::optional<KeywordRuleProcessor::DefaultRule>
const& initial_keywords,
176 std::unique_ptr<KeywordRuleProcessor> keyword_rules) noexcept;
177 using KeywordRules::GetInitialKeywords;
178 using KeywordRules::GetKeywordRuleProcessor;
179 using Source::GetName;
196 using SourceTypes = std::variant<FitsKeywordsSource, FitsFileSource>;
Contains functions and data structures related to cfitsio.
Interface for keyword rule processors.
FitsFileSource(std::string name, std::filesystem::path path, std::string location, std::optional< KeywordRuleProcessor::DefaultRule > const &initial_keywords, std::unique_ptr< KeywordRuleProcessor > keyword_rules)
FitsKeywordsSource(std::string name, fits::KeywordVector keywords, std::optional< KeywordRuleProcessor::DefaultRule > const &initial_keywords, std::unique_ptr< KeywordRuleProcessor > keyword_rules) noexcept
fits::KeywordVector & GetKeywords() &noexcept
fits::KeywordVector const & GetKeywords() const &noexcept
TargetSource(std::string name, std::filesystem::path path, std::optional< KeywordRuleProcessor::DefaultRule > const &initial_keywords, std::unique_ptr< KeywordRuleProcessor > keyword_rules)
void Close()
Close fits file.
fitsfile * GetFitsFile() const noexcept
Get fits file pointer.
std::filesystem::path const & GetFilePath() const &noexcept
Get file system path associated with this file.
FitsFile(std::filesystem::path path, fits::OpenMode mode)
Open existing fits file.
Represents the keyword rules from the Data Product Specification.
auto GetKeywordRuleProcessor() const -> KeywordRuleProcessor const &
KeywordRules(std::optional< KeywordRuleProcessor::DefaultRule > const &initial, std::unique_ptr< KeywordRuleProcessor > keyword_rules)
auto GetInitialKeywords() const -> std::optional< KeywordRuleProcessor::DefaultRule > const &
Source(std::string name) noexcept
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.
SourceNotFoundError(char const *path)