ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
Public Member Functions | List of all members
daq::dpm::Scheduler Class Referenceabstract

Schedules asynchronous activities that results in merged Data Product and delivery. More...

#include <scheduler.hpp>

+ Inheritance diagram for daq::dpm::Scheduler:

Public Member Functions

virtual ~Scheduler ()
 
virtual void Start ()=0
 Start/stop operations. More...
 
virtual void Stop ()=0
 
virtual std::string QueueDaq (std::string const &dp_spec)=0
 Queues DAQ for processing. More...
 
virtual void AbortDaq (std::string const &id)=0
 Abort merging DAQ identified by id. More...
 
virtual bool IsQueued (std::string const &id) const noexcept=0
 Queries if DAQ with ID has been queued before in the current workspace. More...
 
virtual Status GetDaqStatus (std::string const &id) const =0
 Queries current DAQ status, possibly from last recorded status in workspace. More...
 
virtual std::vector< std::string > GetQueue () const noexcept=0
 Queries current DAQ queue. More...
 
using StatusSignal = boost::signals2::signal< void(Status const &)>
 Signals. More...
 
virtual boost::signals2::connection ConnectStatus (StatusSignal::slot_type const &slot)=0
 Signals. More...
 

Detailed Description

Schedules asynchronous activities that results in merged Data Product and delivery.

Internally it maintains a prioritized queue of DAQs that should be merged.

Main responsibilities:

Outside the scope of Scheduler:

TBD/notes:

Definition at line 274 of file scheduler.hpp.

Member Typedef Documentation

◆ StatusSignal

using daq::dpm::Scheduler::StatusSignal = boost::signals2::signal<void(Status const&)>

Signals.

Definition at line 340 of file scheduler.hpp.

Constructor & Destructor Documentation

◆ ~Scheduler()

virtual daq::dpm::Scheduler::~Scheduler ( )
inlinevirtual

Definition at line 276 of file scheduler.hpp.

Member Function Documentation

◆ AbortDaq()

virtual void daq::dpm::Scheduler::AbortDaq ( std::string const &  id)
pure virtual

Abort merging DAQ identified by id.

Note
Workspace related to this will be purged.
Parameters
idDAQ id.
Exceptions
std::invalid_argumentif DAQ is unknown.

Implemented in daq::dpm::SchedulerImpl.

◆ ConnectStatus()

virtual boost::signals2::connection daq::dpm::Scheduler::ConnectStatus ( StatusSignal::slot_type const &  slot)
pure virtual

Signals.

Implemented in daq::dpm::SchedulerImpl.

◆ GetDaqStatus()

virtual Status daq::dpm::Scheduler::GetDaqStatus ( std::string const &  id) const
pure virtual

Queries current DAQ status, possibly from last recorded status in workspace.

Parameters
idDAQ id.
Returns
Merge status of id.
Exceptions
std::invalid_argumentif DAQ is not known.

Implemented in daq::dpm::SchedulerImpl.

◆ GetQueue()

virtual std::vector<std::string> daq::dpm::Scheduler::GetQueue ( ) const
pure virtualnoexcept

Queries current DAQ queue.

Returns
list of DAQs pending or already started to be merged.

Implemented in daq::dpm::SchedulerImpl.

◆ IsQueued()

virtual bool daq::dpm::Scheduler::IsQueued ( std::string const &  id) const
pure virtualnoexcept

Queries if DAQ with ID has been queued before in the current workspace.

Parameters
idDAQ id.
Returns
true if DAQ is in the merge queue, false otherwise.
Exceptions
std::invalid_argumentif DAQ is not known.

Implemented in daq::dpm::SchedulerImpl.

◆ QueueDaq()

virtual std::string daq::dpm::Scheduler::QueueDaq ( std::string const &  dp_spec)
pure virtual

Queues DAQ for processing.

Note
Scheduler is responsible for creating unique local names for input files.
Parameters
dp_specJSON encoded Data Product Specification. If parsing fails a std::invalid_argument will be thrown.
Returns
DAQ id on success.
Exceptions
std::invalid_argumentif dp_spec is invalid or is already queued.

Implemented in daq::dpm::SchedulerImpl.

◆ Start()

virtual void daq::dpm::Scheduler::Start ( )
pure virtual

Start/stop operations.

This assumes the implementation has an internal scheduler that it uses.

Implemented in daq::dpm::SchedulerImpl.

◆ Stop()

virtual void daq::dpm::Scheduler::Stop ( )
pure virtual

Implemented in daq::dpm::SchedulerImpl.


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