Go to the documentation of this file.
11 #ifndef RTCTK_COMPONENTFRAMEWORK_FITSDATARECORDER_HPP
12 #define RTCTK_COMPONENTFRAMEWORK_FITSDATARECORDER_HPP
15 #include <string_view>
18 #include <CCfits/FITS.h>
19 #include <CCfits/Table.h>
31 constexpr
FitsColumn(std::string_view new_name, std::string_view new_unit) :
name(new_name),
unit(new_unit) {}
44 explicit FitsError(
const CCfits::FitsException& exception) :
56 explicit FitsRecorder(
const ColumnDescription& columns,
const std::array<
bool,
sizeof...(T)>& disable = {},
const std::string& extension_name =
"recording");
58 void Open(
const std::filesystem::path& file)
override;
59 void Write(
const std::tuple<T...>& data)
override;
67 std::unique_ptr<CCfits::FITS> m_fits_handle;
71 CCfits::Table* m_fits_table_handle;
79 std::string m_extension_name;
88 #include "fitsDataRecorder.ipp"
90 #endif // RTCTK_COMPONENTFRAMEWORK_FITSDATARECORDER_HPP
FitsError(const CCfits::FitsException &exception)
Definition: fitsDataRecorder.hpp:44
Provides macros and utilities for exception handling.
Definition: fitsDataRecorder.hpp:41
std::string_view unit
Definition: fitsDataRecorder.hpp:29
RtctkException() noexcept
Definition: exceptions.cpp:99
Definition: commandReplier.cpp:20
FitsRecorder allows to write ColumnData to into fits files in a specified directory.
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:207
Definition: dataRecorder.hpp:21
Definition: fitsDataRecorder.hpp:38
void Close() override
Close the currently open file.
constexpr FitsColumn(std::string_view new_name, std::string_view new_unit)
Definition: fitsDataRecorder.hpp:31
FitsRecorder(const ColumnDescription &columns, const std::array< bool, sizeof...(T)> &disable={}, const std::string &extension_name="recording")
create a new recorder
void Open(const std::filesystem::path &file) override
Open a file.
std::string_view name
Definition: fitsDataRecorder.hpp:28
std::array< FitsColumn, sizeof...(T)> ColumnDescription
Definition: fitsDataRecorder.hpp:49
void Write(const std::tuple< T... > &data) override
Write a row of data.
Definition: fitsDataRecorder.hpp:27