|
HIPO
4.3.0
High Performance Output data format for experimental physics
|
Low-level data structure representing a HIPO structure. More...
#include <bank.h>
Inheritance diagram for hipo::structure:Public Member Functions | |
| structure () | |
| Default constructor. Sets the structure address to nullptr. More... | |
| structure (int size) | |
| structure (int __group, int __item, std::string &str) | |
| Construct a structure from a group, item, and string payload. More... | |
| virtual | ~structure ()=default |
| bool | allocate (int size) |
| int | getSize () const noexcept |
| int | getHeaderSize () const noexcept |
| int | getDataSize () const noexcept |
| int | getType () const |
| int | getGroup () const |
| int | getItem () const |
| void | init (const char *buffer, int size) |
| void | initNoCopy (const char *buffer, int size) |
| const char * | getAddress () |
| virtual void | show () const |
| Display the structure contents to standard output. More... | |
| void | setSize (int size) |
| void | setHeaderSize (int size) |
| void | setDataSize (int size) |
| int | getIntAt (int index) const noexcept |
| int16_t | getShortAt (int index) const noexcept |
| int8_t | getByteAt (int index) const noexcept |
| float | getFloatAt (int index) const noexcept |
| double | getDoubleAt (int index) const noexcept |
| long | getLongAt (int index) const noexcept |
| std::string | getStringAt (int index) |
| void | putIntAt (int index, int value) |
| void | putShortAt (int index, int16_t value) |
| void | putByteAt (int index, int8_t value) |
| void | putFloatAt (int index, float value) |
| void | putDoubleAt (int index, double value) |
| void | putLongAt (int index, int64_t value) |
| void | putStringAt (int index, std::string &str) |
| virtual void | notify () |
| Called when the structure is updated (e.g., after reading an event). More... | |
Protected Member Functions | |
| void | initStructureBySize (int __group, int __item, int __type, int __size) |
| Initialize the structure buffer with the given group, item, type, and data size. More... | |
| std::vector< char > & | getStructureBuffer () |
| int | getStructureBufferSize () |
Protected Attributes | |
| int | dataOffset = 8 |
Friends | |
| class | tuple |
| class | event |
Low-level data structure representing a HIPO structure.
A structure stores binary data with an 8-byte header containing group, item, type, and size information, followed by the payload data.
|
inline |
|
inline |
| hipo::structure::structure | ( | int | __group, |
| int | __item, | ||
| std::string & | str | ||
| ) |
|
virtualdefault |
| bool hipo::structure::allocate | ( | int | size | ) |
| const char * hipo::structure::getAddress | ( | ) |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| int hipo::structure::getGroup | ( | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
| int hipo::structure::getItem | ( | ) | const |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| std::string hipo::structure::getStringAt | ( | int | index | ) |
|
inlineprotected |
|
inlineprotected |
| int hipo::structure::getType | ( | ) | const |
| void hipo::structure::init | ( | const char * | buffer, |
| int | size | ||
| ) |
| void hipo::structure::initNoCopy | ( | const char * | buffer, |
| int | size | ||
| ) |
|
protected |
|
inlinevirtual |
Called when the structure is updated (e.g., after reading an event).
Reimplemented in hipo::bank.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void hipo::structure::putStringAt | ( | int | index, |
| std::string & | str | ||
| ) |
| void hipo::structure::setDataSize | ( | int | size | ) |
| void hipo::structure::setHeaderSize | ( | int | size | ) |
| void hipo::structure::setSize | ( | int | size | ) |
|
virtual |
Display the structure contents to standard output.
Reimplemented in hipo::bank.