Belle II Software  release-05-02-19
RelationVectorBase Class Reference

base class for RelationVector<T> More...

#include <RelationVector.h>

Collaboration diagram for RelationVectorBase:

Public Member Functions

 RelationVectorBase ()
 Construct empty set.
 
 RelationVectorBase (const std::string &name, int index, const std::vector< Belle2::RelationEntry > &relations, const std::vector< std::string > &names)
 Constructor. More...
 

Protected Member Functions

void add (const RelationVectorBase &other)
 add another list of relations. More...
 
void apply (int index, const std::function< void(std::vector< unsigned int > &, std::vector< float > &, size_t)> &f)
 apply function to the relation associated with the RelationEntry at given index.
 

Protected Attributes

std::string m_name
 entry name of array containing object these relations belong to.
 
int m_index { -1}
 index of object these relations belong to.
 
std::vector< RelationEntrym_relations
 The vector of relation entries.
 
std::vector< std::string > m_relationNames
 Names of associated relations.
 

Friends

class DataStore
 

Detailed Description

base class for RelationVector<T>

Definition at line 34 of file RelationVector.h.

Constructor & Destructor Documentation

◆ RelationVectorBase()

RelationVectorBase ( const std::string &  name,
int  index,
const std::vector< Belle2::RelationEntry > &  relations,
const std::vector< std::string > &  names 
)
inline

Constructor.


Definition at line 40 of file RelationVector.h.

Member Function Documentation

◆ add()

void add ( const RelationVectorBase other)
protected

add another list of relations.

(internal use)

Definition at line 52 of file RelationVector.cc.

53 {
54  if ((other.m_name != m_name) or (other.m_index != m_index))
55  B2FATAL("Trying to add RelationVectorBase for " << m_name << m_index << " and " << other.m_name << other.m_index << "!");
56 
57  m_relations.insert(m_relations.end(), other.m_relations.begin(), other.m_relations.end());
58  if (!other.m_relations.empty())
59  m_relationNames.insert(m_relationNames.end(), other.m_relationNames.begin(), other.m_relationNames.end());
60 }

The documentation for this class was generated from the following files:
Belle2::RelationVectorBase::m_index
int m_index
index of object these relations belong to.
Definition: RelationVector.h:51
Belle2::RelationVectorBase::m_relationNames
std::vector< std::string > m_relationNames
Names of associated relations.
Definition: RelationVector.h:53
Belle2::RelationVectorBase::m_name
std::string m_name
entry name of array containing object these relations belong to.
Definition: RelationVector.h:50
Belle2::RelationVectorBase::m_relations
std::vector< RelationEntry > m_relations
The vector of relation entries.
Definition: RelationVector.h:52