Class representing the quality of a MonitorObject.
More...
#include <Quality.h>
|
| Quality (unsigned int level=Quality::NullLevel, std::string name="") |
| Default constructor.
|
|
virtual | ~Quality ()=default |
| Destructor.
|
|
| Quality (const Quality &q) |
|
| Quality (Quality &&other)=default |
| Move constructor.
|
|
Quality & | operator= (const Quality &other)=default |
| Copy assignment operator.
|
|
Quality & | operator= (Quality &&other)=default |
| Move assignment operator.
|
|
unsigned int | getLevel () const |
|
const std::string & | getName () const |
|
bool | isWorseThan (const Quality &quality) const |
| Checks whether this quality object is worse than another one. If compared to Null it returns false. More...
|
|
bool | isBetterThan (const Quality &quality) const |
| Checks whether this quality object is better than another one. If compared to Null it returns false. More...
|
|
void | addMetadata (std::string key, std::string value) |
| Add key value pair that will end up in the database Add a metadata (key value pair) to the QualityObject. It will be stored in the database. If the key already exists the value will be updated.
|
|
void | addMetadata (std::map< std::string, std::string > pairs) |
| Add key value pairs that will end up in the database as metadata of the object Add all the key-value pairs in the map to the MonitorObject. It will be stored in the database as metadata. If a key already exists the value will NOT be updated.
|
|
void | updateMetadata (std::string key, std::string value) |
| Update the value of metadata. If the key does not exist it will ignore it.
|
|
const std::map< std::string, std::string > & | getMetadataMap () const |
| Get the full map of user's metadata.
|
|
void | overwriteMetadata (std::map< std::string, std::string > pairs) |
| Overwrite the existing metadata.
|
|
const std::string | getMetadata (std::string key) |
| Get a metadata. More...
|
|
|
static const Quality | Null |
|
static const Quality | Good |
|
static const Quality | Medium |
|
static const Quality | Bad |
|
static const unsigned int | NullLevel |
|
|
bool | operator== (const Quality &lhs, const Quality &rhs) |
|
bool | operator!= (const Quality &lhs, const Quality &rhs) |
|
std::ostream & | operator<< (std::ostream &out, const Quality &q) |
|
Class representing the quality of a MonitorObject.
- Author
- Barthelemy von Haller
const std::string o2::quality_control::core::Quality::getMetadata |
( |
std::string |
key | ) |
|
Get a metadata.
- Returns
- the value corresponding to the key if it was found.
- Exceptions
-
ObjectNotFoundError | in case the key is not found. |
bool o2::quality_control::core::Quality::isBetterThan |
( |
const Quality & |
quality | ) |
const |
|
inline |
Checks whether this quality object is better than another one. If compared to Null it returns false.
- Parameters
-
- Returns
- true if it is better, false otherwise or if compared to Quality::Null.
bool o2::quality_control::core::Quality::isWorseThan |
( |
const Quality & |
quality | ) |
const |
|
inline |
Checks whether this quality object is worse than another one. If compared to Null it returns false.
- Parameters
-
- Returns
- true if it is worse, false otherwise or if compared to Quality::Null.
The documentation for this class was generated from the following file: