12#ifndef RTCTK_COMPONENTFRAMEWORK_FITSDATARECORDER_HPP
13#define RTCTK_COMPONENTFRAMEWORK_FITSDATARECORDER_HPP
83 const std::array<
bool,
sizeof...(T)>&
disable = {},
86 void Open(
const std::filesystem::path&
file)
override;
87 void Write(
const std::tuple<T...>& data)
override;
88 void Close()
override;
103 return std::string{
".fits"};
107 static void CloseFits(
fitsfile* pointer);
111 std::unique_ptr<
fitsfile,
decltype(&CloseFits)> m_fits_handle;
115 std::string m_extension_name;
119 long int m_row_index;
123 std::array<std::optional<size_t>,
sizeof...(T)> m_column_length;
This is an abstract class that can be used to implement an OutputStage for a Recording Unit.
Definition dataRecorder.hpp:29
const std::array< ColumnMetaData, sizeof...(T)> ColumnDescription
Definition dataRecorder.hpp:49
Definition fitsDataRecorder.hpp:28
FitsDataRecorderFitsError(const std::string &error)
Definition fitsDataRecorder.hpp:31
Definition fitsDataRecorder.hpp:71
FitsRecorder(const ColumnDescription &columns, const std::array< bool, sizeof...(T)> &disable={}, const std::string &extension_name="recording")
create a new recorder
Definition fitsDataRecorder.ipp:164
void Open(const std::filesystem::path &file) override
Open a file.
Definition fitsDataRecorder.ipp:175
std::string DefaultFileExtension() override
Default filename extension for the recorder.
Definition fitsDataRecorder.hpp:102
void SetColumnLength(size_t column, size_t length)
Set the exact length of a column.
Definition fitsDataRecorder.ipp:230
virtual ~FitsRecorder()=default
void Write(const std::tuple< T... > &data) override
Write a single row of data.
Definition fitsDataRecorder.ipp:274
void Close() override
Close the currently open file.
Definition fitsDataRecorder.ipp:358
The RtctkException class is the base class for all Rtctk exceptions.
Definition exceptions.hpp:211
RtctkException() noexcept
Definition exceptions.cpp:113
Provides an abstract DataRecorder class as the output stage for a recording unit.
Provides macros and utilities for exception handling.
FitsRecorder allows to write ColumnData to into fits files in a specified directory.
Definition commandReplier.cpp:22
elt::mal::future< std::string > InjectReqRepEvent(StateMachineEngine &engine)
Definition malEventInjector.hpp:23
Definition fitsDataRecorder.hpp:36
constexpr FitsColumn(std::string_view new_name, std::string_view new_unit)
Definition fitsDataRecorder.hpp:40
std::string_view name
Definition fitsDataRecorder.hpp:37
std::string_view unit
Definition fitsDataRecorder.hpp:38