|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Holds a malloc'd copy of a Names xtc (extent bytes) plus two maps: nameMap (field name to its position in the Names) and shapeMap (field name to its position among the array fields, those with rank > 0). More...
#include <NameIndex.hh>
Public Member Functions | |
| NameIndex () | |
| Construct an empty index with no Names copy. | |
| NameIndex (Names &names) | |
| Copy names (names.extent bytes) with malloc, map each Name's name to its index (nameMap), and map each array field (rank > 0) to its running array index (shapeMap). | |
| NameIndex (const NameIndex &old) | |
| Deep copy: duplicate old's Names copy (if any) and copy both maps. | |
| NameIndex & | operator= (const NameIndex &rhs) |
| Free the current Names copy, deep-copy rhs's (if any) and copy both maps. | |
| ~NameIndex () | |
| Free the Names copy, if any. | |
| IndexMap & | shapeMap () |
| Return the map from array-field name to array index (rank > 0 fields only, in Names order). | |
| IndexMap & | nameMap () |
| Return the map from field name to its index in the Names. | |
| Names & | names () |
| Return the stored Names copy. | |
| bool | exists () |
| Return true if a Names copy is stored. | |
Holds a malloc'd copy of a Names xtc (extent bytes) plus two maps: nameMap (field name to its position in the Names) and shapeMap (field name to its position among the array fields, those with rank > 0).
|
inline |
|
inline |
Copy names (names.extent bytes) with malloc, map each Name's name to its index (nameMap), and map each array field (rank > 0) to its running array index (shapeMap).
Deep copy: duplicate old's Names copy (if any) and copy both maps.
|
inline |
Free the Names copy, if any.
|
inline |
Return the map from field name to its index in the Names.
|
inline |
Return the stored Names copy.
If there is none (default-constructed), prints a message and throws a const char* exception.
Free the current Names copy, deep-copy rhs's (if any) and copy both maps.
Self-assignment is not handled (the copy is freed before it is read).
|
inline |
Return the map from array-field name to array index (rank > 0 fields only, in Names order).