lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
Loading...
Searching...
No Matches
DescData.hh File Reference

Declares DescData (reads fields of a ShapesData using its NameIndex) and the writers DescribedData and CreateData, plus the DESC_* helper macros. More...

#include "xtcdata/xtc/Array.hh"
#include "xtcdata/xtc/ShapesData.hh"
#include "xtcdata/xtc/Xtc.hh"
#include "xtcdata/xtc/VarDef.hh"
#include "xtcdata/xtc/NamesLookup.hh"
#include "xtcdata/xtc/NameIndex.hh"
#include <string>
#include <type_traits>

Classes

class  XtcData::DescData
 Reader for a ShapesData: combines it with the NameIndex of its Names to compute the byte offset of each field in the Data payload. More...
 
class  XtcData::DescribedData
 Writer that appends a ShapesData with an empty Data child; the caller writes the payload at data() and then records its length with set_data_length(). More...
 
class  XtcData::CreateData
 Writer that builds a ShapesData field by field: the constructor appends the ShapesData, a Shapes child with room for numArrays() Shape entries, and an empty Data child. More...
 

Namespaces

namespace  XtcData
 Namespace of the XTC data-format classes (Xtc, Dgram, TypeId, Src, NamesId, ShapesData, DescData, iterators, ...).
 

Macros

#define _unused(x)   ((void)(x))
 Cast x to void to silence unused-variable warnings.
 
#define DESC_FOR_METHOD(oDescData, itero, names_map, method)    XtcData::DescData oDescData(itero.method(), names_map[itero.method().namesId()])
 Declare a local XtcData::DescData named oDescData built from itero.method() and names_map[itero.method().namesId()].
 
#define DESC_SHAPE(oDescData, itero, names_map)   DESC_FOR_METHOD(oDescData, itero, names_map, shape)
 DESC_FOR_METHOD with method shape: declare oDescData from itero.shape().
 
#define DESC_VALUE(oDescData, itero, names_map)   DESC_FOR_METHOD(oDescData, itero, names_map, value)
 DESC_FOR_METHOD with method value: declare oDescData from itero.value().
 

Detailed Description

Declares DescData (reads fields of a ShapesData using its NameIndex) and the writers DescribedData and CreateData, plus the DESC_* helper macros.

Macro Definition Documentation

◆ _unused

#define _unused (   x)    ((void)(x))

Cast x to void to silence unused-variable warnings.

◆ DESC_FOR_METHOD

#define DESC_FOR_METHOD (   oDescData,
  itero,
  names_map,
  method 
)     XtcData::DescData oDescData(itero.method(), names_map[itero.method().namesId()])

Declare a local XtcData::DescData named oDescData built from itero.method() and names_map[itero.method().namesId()].

◆ DESC_SHAPE

#define DESC_SHAPE (   oDescData,
  itero,
  names_map 
)    DESC_FOR_METHOD(oDescData, itero, names_map, shape)

DESC_FOR_METHOD with method shape: declare oDescData from itero.shape().

◆ DESC_VALUE

#define DESC_VALUE (   oDescData,
  itero,
  names_map 
)    DESC_FOR_METHOD(oDescData, itero, names_map, value)

DESC_FOR_METHOD with method value: declare oDescData from itero.value().