Belle II Software  release-08-01-10
PXDClusterShapeIndexPar Class Reference

The class for PXD cluster shape index payload. More...

#include <PXDClusterShapeIndexPar.h>

Inheritance diagram for PXDClusterShapeIndexPar:
Collaboration diagram for PXDClusterShapeIndexPar:

Public Member Functions

 PXDClusterShapeIndexPar ()
 Default constructor.
 
 ~PXDClusterShapeIndexPar ()
 Destructor.
 
void addShape (const std::string &name, int index)
 Add shape with name and index

 
int getShapeIndex (const std::string &name) const
 Returns shape index from name. More...
 
const std::string & getShapeName (int index) const
 Returns shape name from index. More...
 
const std::map< int, std::string > & getIndexMap () const
 Returns shape index from shape string.
 

Private Member Functions

 ClassDef (PXDClusterShapeIndexPar, 1)
 ClassDef, must be the last term before the closing {}.
 

Private Attributes

std::map< int, std::string > m_shapeIndexMap
 Map of shape names and indexes.
 

Detailed Description

The class for PXD cluster shape index payload.

Definition at line 24 of file PXDClusterShapeIndexPar.h.

Member Function Documentation

◆ getShapeIndex()

int getShapeIndex ( const std::string &  name) const
inline

Returns shape index from name.

Returns -1 for invalid name.

Definition at line 38 of file PXDClusterShapeIndexPar.h.

39  {
40  for (auto it = m_shapeIndexMap.begin(); it != m_shapeIndexMap.end(); ++it)
41  if (it->second == name)
42  return it->first;
43  return -1;
44  }
std::map< int, std::string > m_shapeIndexMap
Map of shape names and indexes.

◆ getShapeName()

const std::string& getShapeName ( int  index) const
inline

Returns shape name from index.

Return 'None' for invalid index

Definition at line 47 of file PXDClusterShapeIndexPar.h.


The documentation for this class was generated from the following file: