|
McStas Readout Master 0.8.0
|
Public Member Functions | |
| CollectorSink (CollectorSink &other)=delete | |
| void | operator= (const CollectorSink &)=delete |
| bool | is_setup () const |
| std::string | current_filename () const |
| size_t | user_count () const |
| void | setup (const std::string &filename) |
| Open (or create) the one file this process collects into. | |
| size_t | count_points () const |
| How many scan points the file already holds, read from any collector group. | |
| void | teardown () |
| std::optional< HighFive::Group > | getCollector (const std::string &name, const DetectorType &detector, const ReadoutType &readout) |
| std::optional< HighFive::Group > | getCollector (const std::string &name, const HighFive::DataType &datatype, const std::optional< DetectorType > &detector=std::nullopt, const std::optional< std::string > &description=std::nullopt) |
| Get (or create) a collector group for records of an arbitrary compound datatype. | |
| auto | removeCollector (const std::string &name) |
| template<class T > | |
| void | addParameter (const std::string &name, T value, const std::optional< std::string > &unit=std::nullopt, const std::optional< std::string > &description=std::nullopt) |
Static Public Member Functions | |
| static const std::string & | type_attribute () |
| static const std::string & | collector_group_type () |
| static const std::string & | readout_dataset_name () |
| static const std::string & | cue_dataset_name () |
| static const std::string & | weight_dataset_name () |
| static const std::string & | normalization_dataset_name () |
| static const std::string & | detector_attribute_name () |
| The detector identity is a GROUP attribute, alongside the EFU routing attributes: together they say where — and as what — a group replays. The record layout needs no attribute at all: it is the dataset's own compound datatype, compared against the registry for sendability. | |
| static const std::string & | efu_address_attribute_name () |
| static const std::string & | efu_port_attribute_name () |
| static const std::string & | parameter_group_type () |
| static const std::string & | parameter_group_name () |
| static const std::string & | parameter_unit_attribute_name () |
| static const std::string & | parameter_description_attribute_name () |
| static const std::string & | program_attribute_name () |
| static const std::string & | version_attribute_name () |
| static const std::string & | revision_attribute_name () |
| static const std::string & | program_attribute_value () |
| static const std::string & | version_attribute_value () |
| static const std::string & | revision_attribute_value () |
| static RL_API CollectorSink * | instance () |
| static void | destroy () |
| static bool | allow_existing_file () |
| Whether a run may add to a collector file that already existed. | |
| template<class T > | |
| static void | extend_points (HighFive::DataSet ds, const size_t length, const T value) |
Grow a per-point dataset to length, filling any new elements with value. | |
Protected Attributes | |
| std::set< std::string > | users_ |
| bool | appending_ {false} |
| Whether this run is adding a scan point to a file that already held some. | |
| size_t | points_before_ {0} |
| How many points the file held when this run opened it. | |
| std::optional< std::string > | filename_ {std::nullopt} |
| std::optional< HighFive::File > | file_ {std::nullopt} |
| std::optional< HighFive::Group > | collector_ |
| std::optional< HighFive::Group > | parameters_ {std::nullopt} |
Definition at line 129 of file CollectorClass.h.
|
inline |
Definition at line 422 of file CollectorClass.h.
|
inlinestatic |
Whether a run may add to a collector file that already existed.
False unless READOUT_ALLOW_EXISTING_FILE is set in the environment. See setup().
Definition at line 244 of file CollectorClass.h.
Referenced by setup().
|
inlinestatic |
Definition at line 147 of file CollectorClass.h.
|
inline |
How many scan points the file already holds, read from any collector group.
The collector groups are the authority – every one of them carries one cue per point – and a file with no collector groups yet holds no points.
Definition at line 291 of file CollectorClass.h.
Referenced by setup().
|
inlinestatic |
Definition at line 155 of file CollectorClass.h.
|
inline |
Definition at line 238 of file CollectorClass.h.
|
inlinestatic |
Definition at line 233 of file CollectorClass.h.
|
inlinestatic |
The detector identity is a GROUP attribute, alongside the EFU routing attributes: together they say where — and as what — a group replays. The record layout needs no attribute at all: it is the dataset's own compound datatype, compared against the registry for sendability.
Definition at line 172 of file CollectorClass.h.
Referenced by getCollector().
|
inlinestatic |
Definition at line 176 of file CollectorClass.h.
|
inlinestatic |
Definition at line 180 of file CollectorClass.h.
|
inlinestatic |
Grow a per-point dataset to length, filling any new elements with value.
Definition at line 311 of file CollectorClass.h.
|
inline |
Definition at line 337 of file CollectorClass.h.
|
inline |
Get (or create) a collector group for records of an arbitrary compound datatype.
The typed overload above resolves the registry datatype for its ReadoutType; this overload accepts any compound type so user-described records get the same cue-based layout. The detector identity — the ESS packet-type byte, unrecoverable from the record layout — is written as a group attribute when known; the original type description string (when given) is stored as a dataset attribute.
Definition at line 352 of file CollectorClass.h.
References detector_attribute_name(), and points_before_.
|
inline |
Definition at line 237 of file CollectorClass.h.
|
inlinestatic |
Definition at line 163 of file CollectorClass.h.
|
inlinestatic |
Definition at line 197 of file CollectorClass.h.
|
inlinestatic |
Definition at line 189 of file CollectorClass.h.
|
inlinestatic |
Definition at line 185 of file CollectorClass.h.
|
inlinestatic |
Definition at line 193 of file CollectorClass.h.
|
inlinestatic |
Definition at line 201 of file CollectorClass.h.
|
inlinestatic |
Definition at line 213 of file CollectorClass.h.
|
inlinestatic |
Definition at line 151 of file CollectorClass.h.
|
inline |
Definition at line 417 of file CollectorClass.h.
|
inlinestatic |
Definition at line 209 of file CollectorClass.h.
|
inlinestatic |
Definition at line 221 of file CollectorClass.h.
|
inline |
Open (or create) the one file this process collects into.
Called once per file per process, from the Collector constructors and guarded by is_setup() – which is what makes it the right place to refuse a file that was already on disk. Several collectors sharing one file are expected and fine; what is not fine is a second run writing into the file a previous one left behind, which folds its rays into the earlier run's scan point and leaves one set of parameter values standing for all of them. Nothing errors when that happens, which is why it is refused here rather than detected later.
Definition at line 258 of file CollectorClass.h.
References allow_existing_file(), appending_, count_points(), and points_before_.
|
inline |
Definition at line 322 of file CollectorClass.h.
|
inlinestatic |
Definition at line 143 of file CollectorClass.h.
|
inline |
Definition at line 239 of file CollectorClass.h.
|
inlinestatic |
Definition at line 205 of file CollectorClass.h.
|
inlinestatic |
Definition at line 217 of file CollectorClass.h.
|
inlinestatic |
Definition at line 159 of file CollectorClass.h.
|
protected |
Whether this run is adding a scan point to a file that already held some.
Definition at line 135 of file CollectorClass.h.
Referenced by setup().
|
protected |
Definition at line 140 of file CollectorClass.h.
|
protected |
Definition at line 139 of file CollectorClass.h.
|
protected |
Definition at line 138 of file CollectorClass.h.
|
protected |
Definition at line 140 of file CollectorClass.h.
|
protected |
How many points the file held when this run opened it.
Definition at line 137 of file CollectorClass.h.
Referenced by getCollector(), and setup().
|
protected |
Definition at line 133 of file CollectorClass.h.