ifw-daq  2.1.0-pre1
IFW Data Acquisition modules
dpPart.cpp
Go to the documentation of this file.
1 #include <daq/dpPart.hpp>
2 #include <ostream>
3 
4 namespace daq {
5 
6 std::ostream& operator<<(std::ostream& os, DpPart const& part) noexcept {
7  os << "DpPart(origin='"<< part.origin << "', ";
8  if (std::holds_alternative<std::string>(part.info)) {
9  os << "path='" << std::get<std::string>(part.info) << "'";
10  } else {
11  os << "keywords=omitted...";
12  }
13  os <<")";
14  return os;
15 }
16 
17 DpPart::DpPart(std::string origin, std::string path) noexcept
18  : origin(std::move(origin)), info(std::move(path)) {
19 }
20 
21 DpPart::DpPart(std::string origin, fits::KeywordVector keywords) noexcept
22  : origin(std::move(origin)), info(std::move(keywords)) {
23 }
24 
25 
26 bool DpPart::operator==(DpPart const& rhs) const noexcept {
27  return origin == rhs.origin && info == rhs.info;
28 }
29 
30 bool DpPart::operator!=(DpPart const& rhs) const noexcept {
31  return !(*this == rhs);
32 }
33 
34 }
daq::DpPart::DpPart
DpPart()=default
daq
Definition: asyncProcess.cpp:15
daq::operator<<
daqif::DaqStatus & operator<<(daqif::DaqStatus &status, daq::Status const &rhs)
Convert daq::Status -> daqif::DaqStatus by populating from rhs.
Definition: conversion.cpp:18
daq::DpPart::operator==
bool operator==(DpPart const &rhs) const noexcept
Definition: dpPart.cpp:26
daq::fits::KeywordVector
std::vector< KeywordVariant > KeywordVector
Vector of keywords.
Definition: keyword.hpp:414
dpPart.hpp
Contains declaration for DpPart.
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::DpPart::operator!=
bool operator!=(DpPart const &rhs) const noexcept
Definition: dpPart.cpp:30