|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
NamesIter subclass that, besides Names, keeps pointers to ShapesData xtcs keyed by the low 8 bits (NamesId::namesId()) of their NamesId. More...
#include <ConfigIter.hh>
Inherits XtcData::NamesIter.
Public Types | |
| enum | CTOR_TYPE { CTOR_DEFAULT , CTOR_REGULAR } |
| Records which constructor built the object. More... | |
Public Types inherited from XtcData::NamesIter | |
| enum | { Stop , Continue } |
| Return values of process(). More... | |
Public Member Functions | |
| ConfigIter (XtcData::Xtc *xtc, const void *bufEnd) | |
| Construct rooted at xtc and immediately call iterate(); bufEnd bounds the buffer (may be null). | |
| ConfigIter () | |
| Default constructor; nothing is iterated and constructor_type() returns CTOR_DEFAULT. | |
| ~ConfigIter () | |
| Delete the DescData objects created by desc_shape() and desc_value(). | |
| virtual int | process (XtcData::Xtc *xtc, const void *bufEnd) |
| Iterate into TypeId::Parent xtcs, store a NameIndex for each TypeId::Names xtc in namesLookup() (a duplicate NamesId overwrites, no error), and store each TypeId::ShapesData pointer under NamesId::namesId(). | |
| ShapesData & | shape () |
| Return the ShapesData stored under namesId 0. | |
| ShapesData & | value () |
| Return the ShapesData stored under namesId 1. | |
| ShapesData & | getShape (unsigned idx) |
| Return the ShapesData stored under namesId idx. | |
| DescData & | desc_shape () |
| Delete any previous result, then build and return a new DescData from shape() and the NameIndex that namesLookup() holds for its NamesId. | |
| DescData & | desc_value () |
| Print a debug line ("YYY ==> ConfigIter::desc_value") to stdout, delete any previous result, then build and return a new DescData from value() and its NameIndex in namesLookup(). | |
| ConfigIter (const ConfigIter &)=delete | |
| Copy construction is disabled. | |
| ConfigIter & | operator= (const ConfigIter &)=delete |
| Copy assignment is disabled. | |
| bool | default_constructor () const |
| Return true if the object was built by ConfigIter(). | |
| bool | regular_constructor () const |
| Return true if the object was built by ConfigIter(Xtc*, const void*). | |
| CTOR_TYPE | constructor_type () const |
| Return the CTOR_TYPE recorded by the constructor. | |
Public Member Functions inherited from XtcData::NamesIter | |
| NamesIter (XtcData::Xtc *xtc, const void *bufEnd) | |
| Construct an iterator rooted at xtc; bufEnd is passed to XtcIterator as the end-of-buffer bound (may be null). | |
| NamesIter () | |
| Default constructor; the XtcIterator root is not set, so use iterate(Xtc*, const void*). | |
| NamesLookup & | namesLookup () |
| Return a reference to the NamesLookup filled by process(). | |
Public Member Functions inherited from XtcData::XtcIterator | |
| XtcIterator (Xtc *root, const void *bufEnd) | |
| Store root and bufEnd for use by iterate(). | |
| XtcIterator () | |
| Default constructor; root and bufEnd are left uninitialized (use iterate(Xtc*, const void*)). | |
| virtual | ~XtcIterator () |
| Virtual destructor; does nothing. | |
| void | iterate () |
| Call iterate(root, bufEnd) with the values given to the constructor. | |
| void | iterate (Xtc *, const void *bufEnd) |
| Call process() on each child xtc in root's payload, in order, until process() returns 0 or the payload is used up. | |
| const Xtc * | root () const |
| Return the root xtc given to the constructor. | |
NamesIter subclass that, besides Names, keeps pointers to ShapesData xtcs keyed by the low 8 bits (NamesId::namesId()) of their NamesId.
The header comment says it gives access to configuration info from the first datagram of an xtc2 file.
Records which constructor built the object.
| Enumerator | |
|---|---|
| CTOR_DEFAULT | Set by ConfigIter(). |
| CTOR_REGULAR | Set by ConfigIter(Xtc*, const void*). |
|
inline |
Construct rooted at xtc and immediately call iterate(); bufEnd bounds the buffer (may be null).
|
inline |
Default constructor; nothing is iterated and constructor_type() returns CTOR_DEFAULT.
| XtcData::ConfigIter::~ConfigIter | ( | ) |
Delete the DescData objects created by desc_shape() and desc_value().
|
delete |
Copy construction is disabled.
|
inline |
Return the CTOR_TYPE recorded by the constructor.
|
inline |
Return true if the object was built by ConfigIter().
| DescData & XtcData::ConfigIter::desc_shape | ( | ) |
Delete any previous result, then build and return a new DescData from shape() and the NameIndex that namesLookup() holds for its NamesId.
The object is owned by this ConfigIter and freed by the next call or the destructor.
| DescData & XtcData::ConfigIter::desc_value | ( | ) |
Print a debug line ("YYY ==> ConfigIter::desc_value") to stdout, delete any previous result, then build and return a new DescData from value() and its NameIndex in namesLookup().
The object is owned by this ConfigIter and freed by the next call or the destructor.
|
inline |
Return the ShapesData stored under namesId idx.
No check is made: a missing entry yields a null pointer that is dereferenced.
|
delete |
Copy assignment is disabled.
|
virtual |
Iterate into TypeId::Parent xtcs, store a NameIndex for each TypeId::Names xtc in namesLookup() (a duplicate NamesId overwrites, no error), and store each TypeId::ShapesData pointer under NamesId::namesId().
Reimplemented from XtcData::NamesIter.
|
inline |
Return true if the object was built by ConfigIter(Xtc*, const void*).
|
inline |
Return the ShapesData stored under namesId 0.
No check is made: a missing entry yields a null pointer that is dereferenced.
|
inline |
Return the ShapesData stored under namesId 1.
No check is made: a missing entry yields a null pointer that is dereferenced.