QualityControl  1.5.1
O2 Data Quality Control Framework
o2::quality_control::core::QualityObject Class Reference

Encapsulation of a Quality into a TObject that can be streamed and stored. More...

#include <QualityObject.h>

Inheritance diagram for o2::quality_control::core::QualityObject:
Collaboration diagram for o2::quality_control::core::QualityObject:

Public Member Functions

 QualityObject ()
 Default constructor.
 
 QualityObject (Quality quality, std::string checkName, std::string detectorName="DET", std::string policyName="", std::vector< std::string > inputs={}, std::vector< std::string > monitorObjectsNames={}, std::map< std::string, std::string > metadata={})
 
 ~QualityObject () override
 Destructor.
 
 QualityObject (const QualityObject &other)=default
 Copy constructor.
 
 QualityObject (QualityObject &&other)=default
 Move constructor.
 
QualityObjectoperator= (const QualityObject &other)=default
 Copy assignment operator.
 
QualityObjectoperator= (QualityObject &&other)=default
 Move assignment operator.
 
std::string getName () const
 Return the name of the check. More...
 
const char * GetName () const override
 Return the name of the check. More...
 
void updateQuality (Quality quality)
 Get the quality of this object. More...
 
Quality getQuality () const
 
void setInputs (std::vector< std::string > inputs)
 
std::vector< std::string > getInputs () const
 
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.
 
const std::string getMetadata (std::string key)
 Get a metadata. More...
 
std::string getPath () const
 Build the path to this object. Build the path to this object as it will appear in the GUI. If the QO was generated by the policy OnEachSeparately, it appends <task_name>/<mo_name> at the end. More...
 
const std::string & getDetectorName () const
 
void setDetectorName (const std::string &detectorName)
 
void setQuality (const Quality &quality)
 
const std::string & getCheckName () const
 
const std::string & getPolicyName () const
 
const std::vector< std::string > getMonitorObjectsNames () const
 

Friends

std::ostream & operator<< (std::ostream &out, const QualityObject &q)
 

Detailed Description

Encapsulation of a Quality into a TObject that can be streamed and stored.

Author
Barthelemy von Haller

Member Function Documentation

const std::string o2::quality_control::core::QualityObject::getMetadata ( std::string  key)

Get a metadata.

Returns
the value corresponding to the key if it was found.
Exceptions
ObjectNotFoundErrorin case the key is not found.
std::string o2::quality_control::core::QualityObject::getName ( ) const

Return the name of the check.

Returns
The name of the check.
Deprecated:
Prefer getCheckName()
const char * o2::quality_control::core::QualityObject::GetName ( ) const
override

Return the name of the check.

Returns
The name of the check.
Deprecated:
Prefer getCheckName()
std::string o2::quality_control::core::QualityObject::getPath ( ) const

Build the path to this object. Build the path to this object as it will appear in the GUI. If the QO was generated by the policy OnEachSeparately, it appends <task_name>/<mo_name> at the end.

Returns
A string containing the path.
void o2::quality_control::core::QualityObject::setInputs ( std::vector< std::string >  inputs)
inline

Use o2::framework::DataSpecUtils::describe(input) to get string

void o2::quality_control::core::QualityObject::updateQuality ( Quality  quality)

Get the quality of this object.

The method returns the lowest quality met amongst all the checks listed in mChecks. If there are no checks, the method returns Quality::Null.

Returns
the quality of the object

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