EventAnalysis
1.3.0
|
Class for ensuring data consistency in a given sequence. More...
#include <SequenceDataChecker.h>
Public Member Functions | |
SequenceDataChecker (AlgoSequence &sequence) | |
Constructor. More... | |
std::vector< DataObjectHandler > | GetAvailableAfterEnd () |
Gets a list of data objects that will be available after the sequence event processing is complete. More... | |
bool | Check () |
Checks for object availability. More... | |
bool | SetPersistenceServiceManager (PersistenceServiceManager &psManager) |
Set the persistence manager. More... | |
Private Attributes | |
observer_ptr< AlgoSequence > | _algoSequence |
observer_ptr< PersistenceServiceManager > | _psManager |
std::vector< DataObjectHandler > | _available |
Class for ensuring data consistency in a given sequence.
This class checks for all the objects needed by the algorithms in a sequence to be actually available, i.e. provided by a data provider or by other algorithms. Nested sequences are automatically managed. A set of objects that are already available at the begin of the sequence (for whatever reason) can be defined with the #SetAvailableOnBegin method. If the data store manager is set with the #SetDataStoreManager method then all the objects provided by the data providers attached to a store will be automatically added to the objects that are available at the begin of the sequence. The Check method ensures that all the algorithms in the sequence or sub-sequences will have all the needed objects available. If the persistence service manager has been set with SetPersistenceServiceManager then Check will perform the availability check also for objects booked for persistence.
EA::SequenceDataChecker::SequenceDataChecker | ( | AlgoSequence & | sequence | ) |
Constructor.
Builds the data manager for a given sequence of algorithms.
sequence | The algorithm sequence. |
bool EA::SequenceDataChecker::Check | ( | ) |
Checks for object availability.
This method checks if all the objects required by algorithms in the sequence (and eventually by the persistence services if the related manager has been set with SetPersistenceServiceManager) are actually available at process time, either provided by some preceding algorithm or by a data provider (if the data store manager has been set with #SetDataStoreManager). If optional objects are missing then a warning message will be printed but no error will be raised. If an object is missing but has available alternative objects then warning message will be printed but no error will be raised.
std::vector< DataObjectHandler > EA::SequenceDataChecker::GetAvailableAfterEnd | ( | ) |
Gets a list of data objects that will be available after the sequence event processing is complete.
The returned list contains all the objects provided by the data providers. If Check has already been called when this method is called then also objects produced by algorithms will be in the returned list.
bool EA::SequenceDataChecker::SetPersistenceServiceManager | ( | PersistenceServiceManager & | psManager | ) |
Set the persistence manager.
If this method is called then a subsequent call to Check will ensure that all the objects booked for persistence are available at the end of the processing pipeline. Template persistences will be ignored since the availability check for their needed objects will be done through the #PersistenceAlgo objects containing them.
psManager | The data store manager |
|
private |
|
private |
|
private |