ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
dpPart.hpp
Go to the documentation of this file.
1 /**
2  * @file
3  * @ingroup daq_common_libdaq
4  * @copyright 2022 ESO - European Southern Observatory
5  *
6  * @brief Contains declaration for DpPart
7  */
8 #ifndef OCM_DAQ_DP_PART_HPP_
9 #define OCM_DAQ_DP_PART_HPP_
10 
11 #include <string>
12 #include <variant>
13 #include <vector>
14 #include <iosfwd>
15 
16 #include <daq/fits/keyword.hpp>
17 
18 namespace daq {
19 
20 /**
21  * Provides information of the location and origin of a FITS file or keywords produced by a data
22  * acquisition.
23  *
24  * @ingroup daq_common_libdaq
25  */
26 struct DpPart {
27  DpPart(std::string origin, std::string path) noexcept;
28  DpPart(std::string origin, fits::KeywordVector keywords) noexcept;
29  DpPart() = default;
30  DpPart(DpPart const&) = default;
31  DpPart(DpPart&&) noexcept = default;
32  DpPart& operator=(DpPart const&) = default;
33  DpPart& operator=(DpPart&&) noexcept = default;
34 
35  bool operator==(DpPart const& rhs) const noexcept;
36  bool operator!=(DpPart const& rhs) const noexcept;
37 
38  /**
39  * Component/process origin of the file
40  */
41  std::string origin;
42 
43  /**
44  * Holds a std::string path `[[user]@host:]path` or FITS keywords.
45  */
46  std::variant<std::string, fits::KeywordVector> info;
47 };
48 
49 using DpParts = std::vector<DpPart>;
50 
51 std::ostream& operator<<(std::ostream& os, DpPart const& part) noexcept;
52 
53 } // namespace daq
54 
55 #endif // #define OCM_DAQ_DP_PART_HPP_
daq::DpPart::DpPart
DpPart()=default
keyword.hpp
Contains data structure for FITS keywords.
daq
Definition: asyncProcess.cpp:15
daq::DpPart::DpPart
DpPart(DpPart const &)=default
daq::DpPart::info
std::variant< std::string, fits::KeywordVector > info
Holds a std::string path [[user]@host:]path or FITS keywords.
Definition: dpPart.hpp:46
daq::DpPart::origin
std::string origin
Component/process origin of the file.
Definition: dpPart.hpp:41
daq::fits::KeywordVector
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
Definition: keyword.hpp:414
daq::DpPart::DpPart
DpPart(DpPart &&) noexcept=default
daq::DpPart
Provides information of the location and origin of a FITS file or keywords produced by a data acquisi...
Definition: dpPart.hpp:26
daq::DpParts
std::vector< DpPart > DpParts
Definition: dpPart.hpp:49