QualityControl
1.5.1
O2 Data Quality Control Framework
|
#include <UpdatePolicyManager.h>
Public Member Functions | |
void | updateGlobalRevision () |
Update the global revision number. More... | |
void | updateActorRevision (const std::string &actorName, RevisionType revision) |
Update the revision number associated with an actor. More... | |
void | updateActorRevision (std::string actorName) |
void | updateObjectRevision (std::string objectName, RevisionType revision) |
Update the revision number associated with an object. More... | |
void | updateObjectRevision (std::string objectName) |
void | addPolicy (std::string actorName, std::string policyType, std::vector< std::string > objectNames, bool allObjects, bool policyHelper) |
bool | isReady (const std::string &actorName) |
The UpdatePolicyManager is in charge of instantiating and keeping track of policies.
Naming:
caller
(e.g. CheckRunner or AggregatorRunner) holds an instance of the UpdatePolicyManager and drives it.policy
determines whether something is ready to be done or not. It is a function returning a boolean.actor
(e.g. Check or Aggregator) is in charge of executing something when a policy is fulfilled. There can be several actors for a caller. The actor is not aware of the UpdatePolicyManager.objects
are received by the caller. They are processed by the actors and their status (e.g. freshly received) is used by some policies.The following policies are available:
A typical caller code looks like this:
void o2::quality_control::checker::UpdatePolicyManager::addPolicy | ( | std::string | actorName, |
std::string | policyType, | ||
std::vector< std::string > | objectNames, | ||
bool | allObjects, | ||
bool | policyHelper | ||
) |
Add a policy for the given actor.
actorName | |
policyType | One of the policy names: OnAll, OnAnyNonZero, OnEachSeparately, OnAny |
objectNames | |
allObjects | |
policyHelper |
Run check if all MOs are updated
Return true if any declared MOs were updated Guarantee that all declared MOs are available
Return true if any declared object were updated. This is the same behaviour as OnAny.
Return true if any MOs were updated. Inner policy - used for "MOs": "all"
Might return true even if MO is not used in Check
Default behaviour
Run check if any declared MOs are updated Does not guarantee to contain all declared MOs
bool o2::quality_control::checker::UpdatePolicyManager::isReady | ( | const std::string & | actorName | ) |
Checks whether the given actor is ready or not.
actorName |
void o2::quality_control::checker::UpdatePolicyManager::updateActorRevision | ( | const std::string & | actorName, |
RevisionType | revision | ||
) |
Update the revision number associated with an actor.
This function is typically called after the actor has been triggered based on its policy and its work is done.
actorName | |
revision |
void o2::quality_control::checker::UpdatePolicyManager::updateGlobalRevision | ( | ) |
Update the global revision number.
This function function should be called at the end of a processing loop (typically the run() method).
void o2::quality_control::checker::UpdatePolicyManager::updateObjectRevision | ( | std::string | objectName, |
RevisionType | revision | ||
) |
Update the revision number associated with an object.
This function is typically called after a new object has been received.
objectName | |
revision |