|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
XtcIterator subclass that records each Names xtc it visits into a NamesLookup, descending into Parent xtcs. More...
#include <NamesIter.hh>
Inherits XtcData::XtcIterator.
Inherited by XtcData::ConfigIter.
Public Types | |
| enum | { Stop , Continue } |
| Return values of process(). More... | |
Public Member Functions | |
| 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*). | |
| virtual int | process (XtcData::Xtc *xtc, const void *bufEnd) |
| Handle one child xtc: iterate into TypeId::Parent xtcs and store a NameIndex built from each TypeId::Names xtc under its NamesId; ignore other types. | |
| 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. | |
XtcIterator subclass that records each Names xtc it visits into a NamesLookup, descending into Parent xtcs.
Return values of process().
XtcIterator::iterate() stops when process() returns 0 (Stop).
| Enumerator | |
|---|---|
| Stop | Value 0: stop iterating. |
| Continue | Value 1: keep iterating. |
|
inline |
Construct an iterator rooted at xtc; bufEnd is passed to XtcIterator as the end-of-buffer bound (may be null).
|
inline |
Default constructor; the XtcIterator root is not set, so use iterate(Xtc*, const void*).
|
inline |
Return a reference to the NamesLookup filled by process().
|
virtual |
Handle one child xtc: iterate into TypeId::Parent xtcs and store a NameIndex built from each TypeId::Names xtc under its NamesId; ignore other types.
If a NamesId is already present it prints a message and throws a const char* exception.
Implements XtcData::XtcIterator.
Reimplemented in XtcData::ConfigIter.