ifw-daq  3.0.1
IFW Data Acquisition modules
Public Member Functions | List of all members
daq::dpm::DaqWorkspace Class Referenceabstract

Interface to per-DAQ workpace. More...

#include <workspace.hpp>

+ Inheritance diagram for daq::dpm::DaqWorkspace:

Public Member Functions

virtual ~DaqWorkspace ()
 
virtual auto GetPath () const -> std::filesystem::path=0
 
virtual auto GetSourcesPath () const -> std::filesystem::path=0
 
virtual auto Exists (std::filesystem::path const &path, std::filesystem::file_type type=std::filesystem::file_type::regular) const -> bool=0
 
virtual auto GetResultPath () const -> std::filesystem::path=0
 
virtual void MakeResultSymlink (std::filesystem::path const &result) const =0
 Create symlink to result file. More...
 
virtual auto MakeHardLink (std::filesystem::path const &target, std::filesystem::path const &link) const -> std::error_code=0
 Create hard link at to target More...
 
virtual auto MakeSymlink (std::filesystem::path const &target, std::filesystem::path const &link) const -> std::error_code=0
 Create symbolic link at to target More...
 
Load/store DAQ status
virtual auto LoadStatus () const -> Status=0
 
virtual void StoreStatus (Status const &status) const =0
 
Load/store DAQ sources
virtual auto GetSourceLookupPath () const -> std::filesystem::path=0
 
virtual auto LoadSourceLookup () const -> SourceResolver::Mapping=0
 
virtual void StoreSourceLookup (SourceResolver::Mapping const &status) const =0
 
Load/store Data Product specification.
virtual auto GetSpecificationPath () const -> std::filesystem::path=0
 Get file name of the data product specification stored in StoreSpecification() More...
 
virtual auto LoadSpecification () const -> json::DpSpec=0
 Get file name of the data product specification stored in StoreSpecification() More...
 
virtual void StoreSpecification (std::string const &specification) const =0
 Get file name of the data product specification stored in StoreSpecification() More...
 

Detailed Description

Interface to per-DAQ workpace.

Definition at line 27 of file workspace.hpp.

Constructor & Destructor Documentation

◆ ~DaqWorkspace()

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

Definition at line 29 of file workspace.hpp.

Member Function Documentation

◆ Exists()

virtual auto daq::dpm::DaqWorkspace::Exists ( std::filesystem::path const &  path,
std::filesystem::file_type  type = std::filesystem::file_type::regular 
) const -> bool
pure virtual
Returns
true if file exists, false otherwise
Parameters
pathAbsolute or if relative, relative to workspace root GetPath().
typeSpecifies the expected type.
Returns
true if path exist, and if the file type matches type.
false otherwise.

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ GetPath()

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

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ GetResultPath()

virtual auto daq::dpm::DaqWorkspace::GetResultPath ( ) const -> std::filesystem::path
pure virtual
Returns
Root directory where the (unique) data product results should be written.

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ GetSourceLookupPath()

virtual auto daq::dpm::DaqWorkspace::GetSourceLookupPath ( ) const -> std::filesystem::path
pure virtual

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ GetSourcesPath()

virtual auto daq::dpm::DaqWorkspace::GetSourcesPath ( ) const -> std::filesystem::path
pure virtual
Returns
path relative to root containing source files.

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ GetSpecificationPath()

virtual auto daq::dpm::DaqWorkspace::GetSpecificationPath ( ) const -> std::filesystem::path
pure virtual

Get file name of the data product specification stored in StoreSpecification()

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ LoadSourceLookup()

virtual auto daq::dpm::DaqWorkspace::LoadSourceLookup ( ) const -> SourceResolver::Mapping
pure virtual

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ LoadSpecification()

virtual auto daq::dpm::DaqWorkspace::LoadSpecification ( ) const -> json::DpSpec
pure virtual

Get file name of the data product specification stored in StoreSpecification()

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ LoadStatus()

virtual auto daq::dpm::DaqWorkspace::LoadStatus ( ) const -> Status
pure virtual

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ MakeHardLink()

virtual auto daq::dpm::DaqWorkspace::MakeHardLink ( std::filesystem::path const &  target,
std::filesystem::path const &  link 
) const -> std::error_code
pure virtual

Create hard link at to target

Note
This only affects the DaqWorkspace if the provided paths are located therein.
Parameters
targethard link source path. This path must exist.
linkhard link to create.

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ MakeResultSymlink()

virtual void daq::dpm::DaqWorkspace::MakeResultSymlink ( std::filesystem::path const &  result) const
pure virtual

Create symlink to result file.

Used to create relative symlink to the data product file. The symlink is created with name result in the DAQ workspace.

Parameters
resultAbsolute path to data product file result.

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ MakeSymlink()

virtual auto daq::dpm::DaqWorkspace::MakeSymlink ( std::filesystem::path const &  target,
std::filesystem::path const &  link 
) const -> std::error_code
pure virtual

Create symbolic link at to target

Note
This only affects the DaqWorkspace if the provided paths are located therein.
Parameters
targetsymlink source path. This path must exist.
linksymlink to create.

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ StoreSourceLookup()

virtual void daq::dpm::DaqWorkspace::StoreSourceLookup ( SourceResolver::Mapping const &  status) const
pure virtual

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ StoreSpecification()

virtual void daq::dpm::DaqWorkspace::StoreSpecification ( std::string const &  specification) const
pure virtual

Get file name of the data product specification stored in StoreSpecification()

Implemented in daq::dpm::DaqWorkspaceImpl.

◆ StoreStatus()

virtual void daq::dpm::DaqWorkspace::StoreStatus ( Status const &  status) const
pure virtual

Implemented in daq::dpm::DaqWorkspaceImpl.


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