Class StatFilenameConstructor
Defined in File StatFilenameConstructor.h
Class Documentation
-
class StatFilenameConstructor
An implementation of the StatPublisher that dumps the data to a HDF5 file.
Public Functions
-
StatFilenameConstructor() = default
Construct a new Stat Filename Constructor object.
-
StatFilenameConstructor(const ska::pst::common::AsciiHeader &header)
Create instance of a Stat Filename Constructor Object.
- Parameters
header – the header of the scan
-
~StatFilenameConstructor() = default
Destroy the Stat HDF5 File Writer object.
-
void set_base_path(const std::string &base_path)
Set the base path object.
- Parameters
base_path – base directory to which files should be written
-
void set_eb_id(const std::string &eb_id)
Set the eb_id_path attribute.
- Parameters
eb_id – execution block id of the scan
-
void set_scan_id(const std::string &scan_id)
Set the scan_id_path attribute.
- Parameters
scan_id – the id of the scan
-
void set_telescope(const std::string &telescope)
Set the subsystem_id_path attribute to pst-low or pst-mid.
- Parameters
telescope – the telescope name, must be SKALow or SKAMid
-
std::filesystem::path get_filename(const std::string &utc_start, uint64_t obs_offset, uint64_t file_number)
Return the full filesystem path to a HDF5 output filename.
The filename will be constructed as: [stat_base]/[eb_id]/[pst-low|pst-mid]/[scan_id]/monitoring_stats/[utc_start]_[obs_offset]_[file_number].h5
- Parameters
utc_start – start utc of the scan
obs_offset – byte offset of the data segement stat storage
file_number – file sequence number produced by the publisher
- Returns
std::filesystem::path full path to output file name to be created.
Public Static Functions
-
static std::string get_subsystem_from_telescope(const std::string &telescope)
Get the subsystem id from telescope.
- Parameters
telescope – the telescope name [SKALow or SKAMid]
- Returns
std::string the subsystem id matching the telescope name
-
StatFilenameConstructor() = default