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

Interface to interact with DPM workspace. More...

#include <workspace.hpp>

+ Inheritance diagram for daq::dpm::Workspace:

Public Member Functions

virtual ~Workspace ()
 
virtual auto GetPath () const -> std::filesystem::path=0
 
virtual auto InitializeDaq (std::string const &daq_id) -> std::unique_ptr< DaqWorkspace >=0
 Initializes new DAQ Workspace. More...
 
virtual auto LoadDaq (std::string const &daq_id) -> std::unique_ptr< DaqWorkspace >=0
 Loads a previously initialized DAQ workspace. More...
 
virtual auto ArchiveDaq (std::string const &daq_id) -> std::filesystem::path=0
 Archives specified DAQ witout deleting any files, typically by moving it to a specific location in the workspace. More...
 
virtual void RemoveDaq (std::string const &daq_id)=0
 Removes workspace and all containing files for DAQ without archiving it. More...
 
virtual auto EnumerateDaqs () const -> std::vector< std::string >=0
 Enumerates in-progress DAQs by querying file system rather than relying on the queue file. More...
 
virtual auto QueryStorageStatus () const -> std::filesystem::space_info=0
 Queries available storage for workspace. More...
 
Load/store DAQ queue
virtual auto LoadQueue () const -> std::vector< std::string >=0
 
virtual void StoreQueue (std::vector< std::string > const &queue) const =0
 

Detailed Description

Interface to interact with DPM workspace.

The DPM workspace allows:

Definition at line 98 of file workspace.hpp.

Constructor & Destructor Documentation

◆ ~Workspace()

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

Definition at line 100 of file workspace.hpp.

Member Function Documentation

◆ ArchiveDaq()

virtual auto daq::dpm::Workspace::ArchiveDaq ( std::string const &  daq_id) -> std::filesystem::path
pure virtual

Archives specified DAQ witout deleting any files, typically by moving it to a specific location in the workspace.

Note
Once archived OCM/DPM the ID is essentially reusable. This means that archiving duplicate IDs must be foreseen.
Returns
Absolute path to the relocated daq workspace directory.

Implemented in daq::dpm::WorkspaceImpl.

◆ EnumerateDaqs()

virtual auto daq::dpm::Workspace::EnumerateDaqs ( ) const -> std::vector< std::string >
pure virtual

Enumerates in-progress DAQs by querying file system rather than relying on the queue file.

Returns
vector of data acquisition ids (or more accurately the directory).

Implemented in daq::dpm::WorkspaceImpl.

◆ GetPath()

virtual auto daq::dpm::Workspace::GetPath ( ) const -> std::filesystem::path
pure virtual
Returns
Absolute path to workspace.

Implemented in daq::dpm::WorkspaceImpl.

◆ InitializeDaq()

virtual auto daq::dpm::Workspace::InitializeDaq ( std::string const &  daq_id) -> std::unique_ptr< DaqWorkspace >
pure virtual

Initializes new DAQ Workspace.

Creates a private workspace for DAQ merging.

If workspace creation fails rollback of changes to filesystem will be attempted (deleting files and directories just created).

Note
This does not imply that DAQ is scheduled for merging, only that the workspace is initialized to an empty state.
Parameters
daq_idData Acquisition Id.

Implemented in daq::dpm::WorkspaceImpl.

◆ LoadDaq()

virtual auto daq::dpm::Workspace::LoadDaq ( std::string const &  daq_id) -> std::unique_ptr< DaqWorkspace >
pure virtual

Loads a previously initialized DAQ workspace.

Parameters
daq_idData Acquisition Id.

Implemented in daq::dpm::WorkspaceImpl.

◆ LoadQueue()

virtual auto daq::dpm::Workspace::LoadQueue ( ) const -> std::vector< std::string >
pure virtual

Implemented in daq::dpm::WorkspaceImpl.

◆ QueryStorageStatus()

virtual auto daq::dpm::Workspace::QueryStorageStatus ( ) const -> std::filesystem::space_info
pure virtual

Queries available storage for workspace.

@thread_safe

Implemented in daq::dpm::WorkspaceImpl.

◆ RemoveDaq()

virtual void daq::dpm::Workspace::RemoveDaq ( std::string const &  daq_id)
pure virtual

Removes workspace and all containing files for DAQ without archiving it.

Workspace is e.g. removed either if user aborts a Data Acquisition or to roll back failed initialization of a workspace.

Parameters
daq_idData Acquisition id.

Implemented in daq::dpm::WorkspaceImpl.

◆ StoreQueue()

virtual void daq::dpm::Workspace::StoreQueue ( std::vector< std::string > const &  queue) const
pure virtual

Implemented in daq::dpm::WorkspaceImpl.


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