ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Go to the documentation of this file.
6 #ifndef DAQ_DPM_DP_SPEC_HPP
7 #define DAQ_DPM_DP_SPEC_HPP
11 #include <string_view>
15 #include <nlohmann/json.hpp>
22 using std::invalid_argument::invalid_argument;
56 std::optional<SourceFitsFile>
source;
59 using SourceTypes = std::variant<SourceFitsKeywords, SourceFitsFile>;
83 std::filesystem::path
path;
95 #endif // #ifndef DAQ_DPM_DP_SPEC_HPP
Close representation of the JSON structure but with stronger types.
std::string RsyncPath() const
std::filesystem::path path
Contains data structure for FITS keywords.
std::vector< SourceTypes > sources
DpSpec ParseDpSpec(Json const &json)
Parse JSON to construct the DpSpec structure.
std::optional< SourceFitsFile > source
std::variant< Filter, Transform > KeywordRule
fits::KeywordVector keywords
std::vector< KeywordRule > KeywordRules
KeywordRules keyword_rules
std::variant< SourceFitsKeywords, SourceFitsFile > SourceTypes
std::vector< std::string > selection_patterns
KeywordRules keyword_rules
Describes parsed origin string into its components "host" and "path".
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
std::string file_prefix
Optioal user chosen file prefix to make it easier to identify the produced file.
std::vector< std::string > selection_patterns
Origin ParseSourceOrigin(std::string const &origin_str)
Parse origin string from DpSpec into component parts.