Definition of enumeration values for quark flavors.
More...
Definition of enumeration values for quark flavors.
This class defines a set of enumeration values that are used to distinguish between quark flavors. In addition, a declared object of this class is always associated to one quark flavor type (see QuarkFlavor::m_type), so member functions can act on it. E.g.
enum_object.setType(enum_variable);
std::string enum_string_1 = enum_object.toString();
ElemUtils::LoggerManager * getLoggerManager() const
Definition: Partons.cpp:191
static Partons * getInstance()
Share a unique pointer of this class.
Definition: Partons.cpp:27
QuarkFlavor()
Default constructor.
Definition: QuarkFlavor.cpp:10
Type
Definition of enumerate values corresponding to quark flavors.
Definition: QuarkFlavor.h:58
@ UP
Quark flavor up.
Definition: QuarkFlavor.h:60
@ DOWN
Quark flavor down.
Definition: QuarkFlavor.h:61
which gives via Logger:
20-05-2017 12:09:19 [INFO] (example::main) Quark flavor is:
UP
20-05-2017 12:09:19 [INFO] (example::main) Quark flavor is:
DOWN
◆ Type
Definition of enumerate values corresponding to quark flavors.
Enumerator |
---|
UNDEFINED | Undefined type.
|
UP | Quark flavor up.
|
DOWN | Quark flavor down.
|
STRANGE | Quark flavor strange.
|
CHARM | Quark flavor charm.
|
BOTTOM | Quark flavor bottom.
|
TOP | Quark flavor top.
|
◆ QuarkFlavor() [1/3]
PARTONS::QuarkFlavor::QuarkFlavor |
( |
| ) |
|
◆ QuarkFlavor() [2/3]
PARTONS::QuarkFlavor::QuarkFlavor |
( |
const QuarkFlavor & |
other | ) |
|
Copy constructor.
- Parameters
-
other | Object to be copied. |
◆ QuarkFlavor() [3/3]
PARTONS::QuarkFlavor::QuarkFlavor |
( |
Type |
type | ) |
|
Assignment constructor.
- Parameters
-
◆ ~QuarkFlavor()
PARTONS::QuarkFlavor::~QuarkFlavor |
( |
| ) |
|
|
virtual |
◆ fromString()
QuarkFlavor::Type PARTONS::QuarkFlavor::fromString |
( |
const std::string & |
quarkFlavorStr | ) |
|
|
static |
Try to match quark flavor from given string.
- Parameters
-
quarkFlavorStr | String to be matched. |
- Returns
- Matched type or QuarkFlavor::UNDEFINED if unable to match.
◆ getShortName()
std::string PARTONS::QuarkFlavor::getShortName |
( |
| ) |
|
Get short name representation of type being assigned to a declared object of this class.
- Returns
- Short string representation of assigned type, like "u" for QuarkFlavor::UP.
◆ getType()
Get type being assigned to a declared object of this class.
◆ operator Type()
◆ setType()
void PARTONS::QuarkFlavor::setType |
( |
Type |
type | ) |
|
Assign type to a declared object of this class.
◆ toString()
std::string PARTONS::QuarkFlavor::toString |
( |
| ) |
const |
Get string representation of type being assigned to a declared object of this class.
- Returns
- String representation of assigned type, like "UP" for QuarkFlavor::UP.
◆ m_type
Type associated to a declared object of this class.
◆ QUARK_FLAVOR_TYPE_DB_COLUMN_NAME
const std::string PARTONS::QuarkFlavor::QUARK_FLAVOR_TYPE_DB_COLUMN_NAME |
|
static |
Initial value:
Name of table in the database corresponding to this class.
The documentation for this class was generated from the following files: