|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Description of one data field: an Alg, a name (char[MaxNameSize]), a DataType and a rank. More...
#include <ShapesData.hh>
Public Types | |
| enum | DataType { UINT8 , UINT16 , UINT32 , UINT64 , INT8 , INT16 , INT32 , INT64 , FLOAT , DOUBLE , CHARSTR , ENUMVAL , ENUMDICT } |
| Element type of a field. More... | |
Public Member Functions | |
| Name (const char *name, DataType type, int rank=0) | |
| Field with the given name, type and rank, and an empty Alg ("", 0, 0, 0). | |
| Name (const char *name, DataType type, int rank, Alg &alg) | |
| Field with the given name, type, rank and alg. | |
| Name (const char *name, Alg &alg) | |
| Field with the given name and alg, type UINT8 and rank 1. | |
| const char * | name () |
| Return the field name. | |
| DataType | type () |
| Return the DataType. | |
| uint32_t | rank () |
| Return the rank. | |
| Alg & | alg () |
| Return a reference to the Alg. | |
| const char * | str_type () |
| Return the DataType as a string (e.g. | |
Static Public Member Functions | |
| static int | get_element_size (DataType type) |
| Return the element size in bytes for type from the table in ShapesData.cc; type is not range-checked. | |
Description of one data field: an Alg, a name (char[MaxNameSize]), a DataType and a rank.
A Names xtc stores an array of these after its header.
Element type of a field.
Name::get_element_size() maps each value to a byte size using a table in ShapesData.cc.
Field with the given name, type and rank, and an empty Alg ("", 0, 0, 0).
Aborts with a message if rank >= MaxRank, if strlen(name) >= MaxNameSize, or if name has a character other than letters, digits, '_', '.' or ':'.
Field with the given name, type, rank and alg.
Aborts with a message if rank >= MaxRank, if strlen(name) >= MaxNameSize, or if name has a character other than letters, digits, '_', '.' or ':'.
Field with the given name and alg, type UINT8 and rank 1.
Aborts with a message if strlen(name) >= MaxNameSize or if name has a character other than letters, digits, '_', '.' or ':'.
Return the element size in bytes for type from the table in ShapesData.cc; type is not range-checked.
|
inline |
Return the rank.
Return the DataType as a string (e.g.
"UINT8"), or nullptr for a value outside the enum.
|
inline |
Return the DataType.