|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Abstract iterator over the child xtcs of a root Xtc. More...
#include <XtcIterator.hh>
Inherited by XtcData::DataIter, XtcData::NamesIter, and XtcData::XtcUpdateIter.
Public Member Functions | |
| 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. | |
| virtual int | process (Xtc *xtc, const void *bufEnd)=0 |
| Called by iterate() for each child xtc; return 0 to stop iterating, nonzero to continue. | |
| 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. | |
Abstract iterator over the child xtcs of a root Xtc.
iterate() calls process() once per direct child and stops when it returns 0. It does not descend into children by itself; subclasses call iterate(child, bufEnd) from process() to do that.
Store root and bufEnd for use by iterate().
|
inline |
Default constructor; root and bufEnd are left uninitialized (use iterate(Xtc*, const void*)).
|
inlinevirtual |
Virtual destructor; does nothing.
|
inline |
Call iterate(root, bufEnd) with the values given to the constructor.
Call process() on each child xtc in root's payload, in order, until process() returns 0 or the payload is used up.
Returns at once if root's damage has the Damage::Corrupted bit set. Prints a message and calls abort() if a child starts at or past a non-null bufEnd or has extent < sizeof(Xtc).
Called by iterate() for each child xtc; return 0 to stop iterating, nonzero to continue.
Pure virtual.
Implemented in XtcData::ConfigIter, XtcData::DataIter, XtcData::NamesIter, and XtcData::XtcUpdateIter.
|
inline |
Return the root xtc given to the constructor.