|
tdaq-develop-2025-02-12
|
#include <otsdaq/DataManager/DataManager.h>
Classes | |
| struct | Buffer |
Public Member Functions | |
| DataManager (const ConfigurationTree &theXDAQContextConfigTree, const std::string &supervisorConfigurationPath) | |
| virtual void | configure (void) |
| State Machine Methods. | |
| virtual void | halt (void) |
| virtual void | pause (void) |
| virtual void | resume (void) |
| virtual void | start (std::string runNumber) |
| virtual void | stop (void) |
| template<class D , class H > | |
| void | configureBuffer (const std::string &bufferUID) |
| void | registerProducer (const std::string &bufferUID, DataProducerBase *producer) |
| owner of the producer object! More... | |
| void | registerConsumer (const std::string &bufferUID, DataConsumer *consumer) |
| void | unregisterFEProducer (const std::string &bufferID, const std::string &feProducerID) |
| void | dumpStatus (std::ostream *out=(std::ostream *)&(std::cout)) const |
| const std::map< std::string, Buffer > & | getBuffers (void) const |
Public Member Functions inherited from ots::Configurable | |
| Configurable (const ConfigurationTree &theXDAQContextConfigTree, const std::string &theConfigurationPath) | |
| ConfigurationTree | getSelfNode () const |
| const ConfigurationManager * | getConfigurationManager () const |
| const std::string & | getContextUID () const |
| const std::string & | getApplicationUID () const |
| unsigned int | getApplicationLID () const |
| std::string | getContextAddress () const |
| unsigned int | getContextPort () const |
Public Member Functions inherited from ots::VStateMachine | |
| VStateMachine (const std::string &name) | |
| virtual bool | running (void) |
| States. | |
| virtual void | paused (void) |
| virtual void | halted (void) |
| virtual void | configured (void) |
| virtual void | initial (void) |
| virtual void | inError (void) |
| virtual std::string | getStatusProgressDetail (void) |
| Status. More... | |
| void | setTransitionName (const std::string &transitionName) |
| const std::string & | getTransitionName (void) |
| void | setIterationIndex (unsigned int i) |
| void | setSubIterationIndex (unsigned int i) |
| unsigned int | getIterationIndex (void) |
| unsigned int | getSubIterationIndex (void) |
| void | indicateIterationWork (void) |
| void | clearIterationWork (void) |
| bool | getIterationWork (void) |
| void | indicateSubIterationWork (void) |
| void | clearSubIterationWork (void) |
| bool | getSubIterationWork (void) |
Public Attributes | |
| bool | parentSupervisorHasFrontends_ |
Public Attributes inherited from ots::VStateMachine | |
| CoreSupervisorBase * | parentSupervisor_ |
Protected Types | |
| enum | BufferStatus { Initialized , Running } |
Protected Member Functions | |
| void | destroyBuffers (void) |
| void | configureAllBuffers (void) |
| void | startAllBuffers (const std::string &runNumber) |
| void | stopAllBuffers (void) |
| void | resumeAllBuffers (void) |
| void | pauseAllBuffers (void) |
| void | configureBuffer (const std::string &bufferUID) |
| void | startBuffer (const std::string &bufferUID, std::string runNumber) |
| void | stopBuffer (const std::string &bufferUID) |
| void | resumeBuffer (const std::string &bufferUID) |
| void | pauseBuffer (const std::string &bufferUID) |
Protected Attributes | |
| std::map< std::string, Buffer > | buffers_ |
Protected Attributes inherited from ots::Configurable | |
| const ConfigurationTree | theXDAQContextConfigTree_ |
| const std::string | theConfigurationPath_ |
| const std::string | theConfigurationRecordName_ |
Protected Attributes inherited from ots::VStateMachine | |
| std::map< std::string, std::map< unsigned int, std::string > > | iterationAliasMap_ |
| std::map< std::string, std::map< unsigned int, std::string > > | subIterationAliasMap_ |
DataManager This class is the base class that handles a collection of Buffers and associated Data Processor plugins.
Definition at line 25 of file DataManager.h.
|
protected |
pointers of the producers and consumers
Definition at line 764 of file DataManager.cc.
|
protected |
!!!!!Delete all Buffers and all the pointers of the ! producers and consumers
destroyBuffers Stop all Buffers, deletes all pointers, and delete Buffer struct
Definition at line 465 of file DataManager.cc.
| void DataManager::dumpStatus | ( | std::ostream * | out = (std::ostream*)&(std::cout) | ) | const |
void unregisterConsumer (const std::string& bufferID, const std::string& consumerID); void unregisterProducer (const std::string& bufferID, const std::string& producerID);
Definition at line 36 of file DataManager.cc.
| void DataManager::registerConsumer | ( | const std::string & | bufferUID, |
| DataConsumer * | consumer | ||
| ) |
The data manager becomes the owner of the consumer object!
Definition at line 728 of file DataManager.cc.
| void DataManager::registerProducer | ( | const std::string & | bufferUID, |
| DataProducerBase * | producer | ||
| ) |
owner of the producer object!
The data manager becomes the
registerProducer DataManager takes ownership of producer pointer and is now responsible for destructing. Note: in the future, we could pass a shared_ptr, so that source of pointer could share in destructing responsibility.
Definition at line 689 of file DataManager.cc.
| void DataManager::unregisterFEProducer | ( | const std::string & | bufferID, |
| const std::string & | feProducerID | ||
| ) |
============================================================================== void DataManager::eraseBuffer(const std::string& bufferUID) ==============================================================================
bool DataManager::deleteBuffer(const std::string& bufferUID) Note: there should only be one DataBuffer with that consumer registered! void DataManager::unregisterConsumer(const std::string& bufferID, const std::string& consumerID) {CFG_SS; dumpStatus((std::ostream*)&ss); CFG_COUT << ss.str() << E;} {CFG_SS; dumpStatus((std::ostream*)&ss); CFG_COUT << ss.str() < E;} ============================================================================== void DataManager::unregisterProducer(const std::string& bufferID, const std::string& producerID)
Definition at line 641 of file DataManager.cc.
| bool ots::DataManager::parentSupervisorHasFrontends_ |
if parent supervisor has front-ends, then allow no producers... that will be checked later by parent supervisor
Definition at line 99 of file DataManager.h.