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

Public Member Functions

 Collector (const std::string &filename, std::string name, const int Type=0x34, const uint64_t normalization=0)
 
 Collector (const std::string &filename, std::string name, const std::string &type_description, const uint64_t normalization=0, const int Type=0)
 A description-based collector: records of a user-defined C struct layout.
 
size_t record_size () const
 
void addRecord (const double weight, const void *data)
 Store one record of the collector's compound type, accumulating its weight.
 
void addReadout (const uint8_t Ring, const uint8_t FEN, const double tof, const double weight, const void *data)
 
template<class ... Args>
void addParameter (Args &&... args)
 
void setEFU (const std::string &address, int port)
 Write optional EFU destination attributes onto this collector group. Only writes if address is non-empty and port > 0; silently ignores already-set attributes.
 

Detailed Description

Definition at line 369 of file CollectorClass.h.

Constructor & Destructor Documentation

◆ Collector() [1/2]

Collector::Collector ( const std::string &  filename,
std::string  name,
const int  Type = 0x34,
const uint64_t  normalization = 0 
)
inlineexplicit

Definition at line 382 of file CollectorClass.h.

◆ Collector() [2/2]

Collector::Collector ( const std::string &  filename,
std::string  name,
const std::string &  type_description,
const uint64_t  normalization = 0,
const int  Type = 0 
)
inlineexplicit

A description-based collector: records of a user-defined C struct layout.

The description is parsed to an HDF5 compound type and stored records get the same cue-based group layout as the typed collectors. When the description matches one of the canonical readout_type_description() strings the resulting file is EFU-sendable; otherwise it is readable and combinable but skipped by replay.

Parameters
Typethe ESS detector type int (e.g. 0x34 for BIFROST) recorded as the group's detector attribute — the EFU packet-type byte at replay. Pass 0 (or less) for records with no detector identity.

Definition at line 408 of file CollectorClass.h.

References parse_type_description().

◆ ~Collector()

Collector::~Collector ( )
inline

Definition at line 502 of file CollectorClass.h.

Member Function Documentation

◆ addParameter()

template<class ... Args>
void Collector::addParameter ( Args &&...  args)
inline

Definition at line 486 of file CollectorClass.h.

◆ addReadout()

void Collector::addReadout ( const uint8_t  Ring,
const uint8_t  FEN,
const double  tof,
const double  weight,
const void *  data 
)
inline

Definition at line 447 of file CollectorClass.h.

◆ addRecord()

void Collector::addRecord ( const double  weight,
const void *  data 
)
inline

Store one record of the collector's compound type, accumulating its weight.

Parameters
weightthe rate-weight of this record, accumulated into the point weight
datapointer to record_size() bytes laid out per the collector's datatype

Definition at line 434 of file CollectorClass.h.

◆ record_size()

size_t Collector::record_size ( ) const
inline

Definition at line 428 of file CollectorClass.h.

◆ setEFU()

void Collector::setEFU ( const std::string &  address,
int  port 
)
inline

Write optional EFU destination attributes onto this collector group. Only writes if address is non-empty and port > 0; silently ignores already-set attributes.

Definition at line 492 of file CollectorClass.h.


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