|
RTC Toolkit 5.1.0
|
#include <fitsDataRecorder.hpp>
Public Member Functions | |
| FitsRecorder (const ColumnDescription &columns, const std::array< bool, sizeof...(T)> &disable={}, const std::string &extension_name="recording") | |
| create a new recorder | |
| virtual | ~FitsRecorder ()=default |
| void | Open (const std::filesystem::path &file) override |
| Open a file. | |
| void | Write (const std::tuple< T... > &data) override |
| Write a single row of data. | |
| void | Close () override |
| Close the currently open file. | |
| void | SetColumnLength (size_t column, size_t length) |
| Set the exact length of a column. | |
| void | SetColumnLength (const std::tuple< T... > &data) |
| std::string | DefaultFileExtension () override |
| Default filename extension for the recorder. | |
Public Member Functions inherited from rtctk::componentFramework::DataRecorder< T... > | |
| DataRecorder (const ColumnDescription &columns, const DisabledFields &disable={}) | |
| Create a new recorder. | |
| virtual | ~DataRecorder ()=default |
| void | SetDisabledFields (const DisabledFields &disable) |
| Disable certain fields so that they are not recorded. | |
| virtual void | Write (const gsl::span< const std::tuple< T... > > data) |
| Write multiple rows of data. | |
Additional Inherited Members | |
Public Types inherited from rtctk::componentFramework::DataRecorder< T... > | |
| using | TupleType |
| Type of the tuple returned by user-defined method AsTuple. | |
| using | DisabledFields |
| Type for disabled fields, an array of bools with length equal to size of the data tuple. | |
| using | ColumnDescription |
Protected Attributes inherited from rtctk::componentFramework::DataRecorder< T... > | |
| DisabledFields | m_disabled_fields |
| Array of fields that should not be recorded. | |
| const ColumnDescription | m_column_description |
|
explicit |
create a new recorder
| columns | column description (name and unit) |
| disable | array of bools, with boolean wether fields should be skipped during the recording |
| extension_name | name of the FITS extension to use for the binary table |
|
virtualdefault |
|
overridevirtual |
Close the currently open file.
Implements rtctk::componentFramework::DataRecorder< T... >.
|
inlineoverridevirtual |
Default filename extension for the recorder.
Implements rtctk::componentFramework::DataRecorder< T... >.
|
overridevirtual |
Open a file.
| [in] | file | The path to the file. |
Implements rtctk::componentFramework::DataRecorder< T... >.
| void rtctk::componentFramework::FitsRecorder< T >::SetColumnLength | ( | const std::tuple< T... > & | data | ) |
| void rtctk::componentFramework::FitsRecorder< T >::SetColumnLength | ( | size_t | column, |
| size_t | length ) |
Set the exact length of a column.
This is needed for FITS binary tables because variable length types create problems when recording, as the data is written in an heap area after the binary table and needs to move when the binary table grows. The size is given in number of elements. This function needs to be called before Open.
set exact size of a specific column.
|
overridevirtual |
Write a single row of data.
| [in] | data | The tuple containing all the data, including the disabled fields. |
Implements rtctk::componentFramework::DataRecorder< T... >.