QualityControl
1.5.1
O2 Data Quality Control Framework
|
Keeps the list of encapsulated objects to publish and does the actual publication. More...
#include <ObjectsManager.h>
Public Member Functions | |
ObjectsManager (std::string taskName, std::string detectorName, std::string consulUrl, int parallelTaskID=0, bool noDiscovery=false) | |
void | startPublishing (TObject *obj) |
void | stopPublishing (TObject *obj) |
void | stopPublishing (const std::string &objectName) |
bool | isBeingPublished (const std::string &name) |
MonitorObject * | getMonitorObject (std::string objectName) |
MonitorObjectCollection * | getNonOwningArray () const |
void | addMetadata (const std::string &objectName, const std::string &key, const std::string &value) |
Add metadata to a MonitorObject. Add a metadata pair to a MonitorObject. This is propagated to the database. More... | |
void | setDefaultDrawOptions (const std::string &objectName, const std::string &options) |
Set default draw options for this object. If possible, the object will be drawn with these options (in the ROOT sense). See for example https://root.cern/doc/master/classTHistPainter.html#HP01 E.g. manager->setDefaultDRawOptions("histo1", "colz");. More... | |
void | setDefaultDrawOptions (TObject *obj, const std::string &options) |
void | setDisplayHint (const std::string &objectName, const std::string &hints) |
Indicate how to display this object. A number of options can be set on a canvas to influence the way the object is displayed. For drawOptions, use setDefaultDrawOptions, for others such as logarithmic scale or grid, use this method. Currently supported by QCG: logx, logy, logz, gridx, gridy, gridz. More... | |
void | setDisplayHint (TObject *obj, const std::string &hints) |
size_t | getNumberPublishedObjects () |
MonitorObject * | getMonitorObject (size_t index) |
void | updateServiceDiscovery () |
Update the list of objects stored in the Service Discovery. Update the list of objects stored in the Service Discovery. | |
void | removeAllFromServiceDiscovery () |
Remove all objects from the ServiceDiscovery. Remove all objects from the ServiceDiscovery even though they still might be published by the task. This is typically used at End of Activity. | |
Static Public Attributes | |
static const std::string | gDrawOptionsKey = "drawOptions" |
static const std::string | gDisplayHintsKey = "displayHints" |
Keeps the list of encapsulated objects to publish and does the actual publication.
Keeps a list of the objects to publish, encapsulates them and does the actual publication. Tasks set/get properties of the MonitorObjects via this class.
o2::quality_control::core::ObjectsManager::ObjectsManager | ( | std::string | taskName, |
std::string | detectorName, | ||
std::string | consulUrl, | ||
int | parallelTaskID = 0 , |
||
bool | noDiscovery = false |
||
) |
Constructor
taskName | Task name |
detectorName | Detector 3-letter code |
consulUrl | Consul URL, for the service discovery |
parallelTaskID | ID of a parallel Task, use 0 if there is only one. |
noDiscovery | If true disables the use of ServiceDiscovery |
void o2::quality_control::core::ObjectsManager::addMetadata | ( | const std::string & | objectName, |
const std::string & | key, | ||
const std::string & | value | ||
) |
Add metadata to a MonitorObject. Add a metadata pair to a MonitorObject. This is propagated to the database.
objectName | Name of the MonitorObject. |
key | Key of the metadata. |
value | Value of the metadata. |
ObjectNotFoundError | if object is not found. |
MonitorObject * o2::quality_control::core::ObjectsManager::getMonitorObject | ( | std::string | objectName | ) |
Returns the published MonitorObject specified by its name
objectName | The name of the object to find. |
ObjectNotFoundError | if the object is not found. |
MonitorObject * o2::quality_control::core::ObjectsManager::getMonitorObject | ( | size_t | index | ) |
Returns the published MonitorObject specified by its name
index |
ObjectNotFoundError | if the object is not found. |
size_t o2::quality_control::core::ObjectsManager::getNumberPublishedObjects | ( | ) |
Get the number of objects that have been published.
bool o2::quality_control::core::ObjectsManager::isBeingPublished | ( | const std::string & | name | ) |
Check whether an object is already being published
objectName |
void o2::quality_control::core::ObjectsManager::setDefaultDrawOptions | ( | const std::string & | objectName, |
const std::string & | options | ||
) |
Set default draw options for this object. If possible, the object will be drawn with these options (in the ROOT sense). See for example https://root.cern/doc/master/classTHistPainter.html#HP01 E.g. manager->setDefaultDRawOptions("histo1", "colz");.
objectName | Name of the object affected by these drawOptions. |
options | The list of options, space separated. |
ObjectNotFoundError | if object is not found. |
void o2::quality_control::core::ObjectsManager::setDefaultDrawOptions | ( | TObject * | obj, |
const std::string & | options | ||
) |
void o2::quality_control::core::ObjectsManager::setDisplayHint | ( | const std::string & | objectName, |
const std::string & | hints | ||
) |
Indicate how to display this object. A number of options can be set on a canvas to influence the way the object is displayed. For drawOptions, use setDefaultDrawOptions, for others such as logarithmic scale or grid, use this method. Currently supported by QCG: logx, logy, logz, gridx, gridy, gridz.
objectName | Name of the object affected by these drawOptions. |
options | The list of hints, space separated. |
ObjectNotFoundError | if object is not found. |
void o2::quality_control::core::ObjectsManager::setDisplayHint | ( | TObject * | obj, |
const std::string & | hints | ||
) |
void o2::quality_control::core::ObjectsManager::startPublishing | ( | TObject * | obj | ) |
Start publishing the object obj, i.e. it will be pushed forward in the workflow at regular intervals. The ownership remains to the caller.
obj | The object to publish. |
DuplicateObjectError |
void o2::quality_control::core::ObjectsManager::stopPublishing | ( | TObject * | obj | ) |
Stop publishing this object
obj |
ObjectNotFoundError | if object is not found. |
void o2::quality_control::core::ObjectsManager::stopPublishing | ( | const std::string & | objectName | ) |
Stop publishing this object
obj |
ObjectNotFoundError | if object is not found. |