8 #ifndef _Belle2_Enum_hh
9 #define _Belle2_Enum_hh
22 const static Enum UNKNOWN;
28 Enum(
int id,
const std::string& label)
29 : m_id(
id), m_label(label) {}
31 m_id(e.m_id), m_label(e.m_label) {}
32 Enum() : m_id(UNKNOWN.m_id),
33 m_label(UNKNOWN.m_label) {}
36 int getId()
const {
return m_id; }
37 const char* getLabel()
const {
return m_label.c_str(); }
38 const std::string& getLabelString()
const {
return m_label; }
41 bool operator==(
const Enum& e)
const;
42 bool operator!=(
const Enum& e)
const;
43 const Enum& operator=(
const Enum& e);
44 bool operator==(
const std::string& label)
const;
45 bool operator!=(
const std::string& label)
const;
53 inline bool Enum::operator==(
const Enum& e)
const
55 return (m_id == e.m_id);
57 inline bool Enum::operator!=(
const Enum& e)
const
59 return (m_id != e.m_id);
61 inline const Enum& Enum::operator=(
const Enum& e)
67 inline bool Enum::operator==(
const std::string& label)
const
69 return m_label == label;
71 inline bool Enum::operator!=(
const std::string& label)
const
73 return m_label != label;
bool operator==(const DecayNode &node1, const DecayNode &node2)
Compare two Decay Nodes: They are equal if All daughter decay nodes are equal or one of the daughter ...
bool operator!=(const DecayNode &node1, const DecayNode &node2)
Not equal: See operator==.
Abstract base class for different kinds of events.