|
gdata
|
Owns one frame header and the list of payloads accumulated for that frame. More...
#include <gFrameDataCollection.h>
Public Member Functions | |
| GFrameDataCollection (GFrameHeader *header, std::shared_ptr< GLogger > logger) | |
| Construct a frame data collection. | |
| ~GFrameDataCollection () | |
| Destructor. | |
| void | addIntegralPayload (std::vector< int > payload) const |
| Add one integral payload to this frame. | |
| void | addEvent (int evn) |
| Placeholder for adding event-level information into the frame. | |
| bool | shouldWriteFrame () const |
| Placeholder decision hook indicating whether this frame should be emitted. | |
| const GFrameHeader * | getHeader () const |
| Returns the owned frame header. | |
| const std::vector< GIntegralPayload * > * | getIntegralPayload () const |
| Returns the stored payload pointers. | |
| long int | getFrameID () const |
| Convenience getter for the frame ID. | |
Definition at line 48 of file gFrameDataCollection.h.
|
inline |
Ownership:
header is adopted by this object and deleted in the destructorInternal storage:
| header | Frame header pointer. Ownership is transferred to this object. |
| logger | Logger instance used for diagnostics. |
Definition at line 64 of file gFrameDataCollection.h.
|
inline |
Deletes in the following order:
Definition at line 84 of file gFrameDataCollection.h.
| void GFrameDataCollection::addEvent | ( | int | evn | ) |
Intended future usage:
| evn | Event number. |
|
inline |
The payload is passed as a vector to support a generic packed interface, typically used when data come from external buffers or electronics emulators.
Expected layout, size must be exactly 5:
On success:
On failure:
| payload | Packed payload vector with exactly five integer entries. |
Definition at line 115 of file gFrameDataCollection.h.
|
inline |
Equivalent to calling getFrameID() on the owned header.
Definition at line 193 of file gFrameDataCollection.h.
|
inline |
The returned pointer remains valid as long as this GFrameDataCollection exists. The header is owned by this object and must not be deleted by the caller.
Definition at line 170 of file gFrameDataCollection.h.
|
inline |
The returned pointers:
Definition at line 183 of file gFrameDataCollection.h.
| bool GFrameDataCollection::shouldWriteFrame | ( | ) | const |
Intended future usage:
true if the frame should be written.