McStas Readout Master 0.3.3
Loading...
Searching...
No Matches
Writer Class Reference

Legacy flat-file HDF5 writer used by the runtime-streaming Readout components. More...

#include <writer.h>

Public Member Functions

RL_API DetectorType detector_type () const
 
RL_API void detector_type (const DetectorType type)
 
RL_API ReadoutType readout_type () const
 
RL_API void readout_type (const ReadoutType type)
 
RL_API void verbose (const int v)
 
RL_API Writer (const std::string &filename, const DetectorType detectorType, const ReadoutType readoutType, const std::string &dataset_name="events")
 
RL_API void saveReadout (const uint8_t Ring, const uint8_t FEN, const double tof, const double weight, const void *data)
 Append one event; data must point to the readout struct matching the configured ReadoutType.
 
template<class T >
void saveReadout (T data)
 

Detailed Description

Legacy flat-file HDF5 writer used by the runtime-streaming Readout components.

Appends one row per event to a single unlimited events dataset whose compound datatype comes from the readout registry (hdf_compound_type). This is the pre-collector format: it has no cues, weights, or normalizations, and is not readable by the collector Reader/replay path — new code should use Collector (CollectorClass.h) instead.

Definition at line 33 of file writer.h.

Constructor & Destructor Documentation

◆ Writer()

RL_API Writer::Writer ( const std::string &  filename,
const DetectorType  detectorType,
const ReadoutType  readoutType,
const std::string &  dataset_name = "events" 
)
inlineexplicit

Definition at line 48 of file writer.h.

Member Function Documentation

◆ detector_type() [1/2]

RL_API DetectorType Writer::detector_type ( ) const
inline

Definition at line 42 of file writer.h.

◆ detector_type() [2/2]

RL_API void Writer::detector_type ( const DetectorType  type)
inline

Definition at line 43 of file writer.h.

◆ readout_type() [1/2]

RL_API ReadoutType Writer::readout_type ( ) const
inline

Definition at line 44 of file writer.h.

◆ readout_type() [2/2]

RL_API void Writer::readout_type ( const ReadoutType  type)
inline

Definition at line 45 of file writer.h.

◆ saveReadout() [1/2]

RL_API void Writer::saveReadout ( const uint8_t  Ring,
const uint8_t  FEN,
const double  tof,
const double  weight,
const void *  data 
)
inline

Append one event; data must point to the readout struct matching the configured ReadoutType.

Definition at line 88 of file writer.h.

References saveReadout().

Referenced by saveReadout().

◆ saveReadout() [2/2]

template<class T >
void Writer::saveReadout ( data)
inline

Definition at line 105 of file writer.h.

◆ verbose()

RL_API void Writer::verbose ( const int  v)
inline

Definition at line 46 of file writer.h.


The documentation for this class was generated from the following file: