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

#include <workspace.hpp>

+ Inheritance diagram for daq::dpm::DaqWorkspaceImpl:

Public Member Functions

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

Detailed Description

Definition at line 259 of file workspace.hpp.

Constructor & Destructor Documentation

◆ DaqWorkspaceImpl()

daq::dpm::DaqWorkspaceImpl::DaqWorkspaceImpl ( std::filesystem::path  root,
std::filesystem::path  result 
)

Construct providing absolute path to DAQ workspace root.

Definition at line 224 of file workspace.cpp.

Member Function Documentation

◆ Exists()

auto daq::dpm::DaqWorkspaceImpl::Exists ( std::filesystem::path const &  path,
std::filesystem::file_type  type = std::filesystem::file_type::regular 
) const -> bool
inlineoverridevirtual
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.

Implements daq::dpm::DaqWorkspace.

Definition at line 283 of file workspace.hpp.

◆ GetPath()

auto daq::dpm::DaqWorkspaceImpl::GetPath ( ) const -> std::filesystem::path
inlineoverridevirtual
Returns
Absolute path to workspace.

Implements daq::dpm::DaqWorkspace.

Definition at line 269 of file workspace.hpp.

◆ GetResultPath()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 273 of file workspace.hpp.

◆ GetSourceLookupPath()

auto daq::dpm::DaqWorkspaceImpl::GetSourceLookupPath ( ) const -> std::filesystem::path
overridevirtual

Implements daq::dpm::DaqWorkspace.

Definition at line 260 of file workspace.cpp.

◆ GetSourcesPath()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 236 of file workspace.cpp.

◆ GetSpecificationPath()

auto daq::dpm::DaqWorkspaceImpl::GetSpecificationPath ( ) const -> std::filesystem::path
overridevirtual

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

Implements daq::dpm::DaqWorkspace.

Definition at line 303 of file workspace.cpp.

◆ LoadSourceLookup()

auto daq::dpm::DaqWorkspaceImpl::LoadSourceLookup ( ) const -> SourceResolver::Mapping
overridevirtual

Implements daq::dpm::DaqWorkspace.

Definition at line 283 of file workspace.cpp.

◆ LoadSpecification()

auto daq::dpm::DaqWorkspaceImpl::LoadSpecification ( ) const -> json::DpSpec
overridevirtual

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

Implements daq::dpm::DaqWorkspace.

Definition at line 307 of file workspace.cpp.

◆ LoadStatus()

auto daq::dpm::DaqWorkspaceImpl::LoadStatus ( ) const -> Status
overridevirtual

Implements daq::dpm::DaqWorkspace.

Definition at line 240 of file workspace.cpp.

◆ MakeHardLink()

auto daq::dpm::DaqWorkspaceImpl::MakeHardLink ( std::filesystem::path const &  target,
std::filesystem::path const &  link 
) const -> std::error_code
overridevirtual

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.

Implements daq::dpm::DaqWorkspace.

Definition at line 269 of file workspace.cpp.

◆ MakeResultSymlink()

void daq::dpm::DaqWorkspaceImpl::MakeResultSymlink ( std::filesystem::path const &  result) const
overridevirtual

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.

Implements daq::dpm::DaqWorkspace.

Definition at line 264 of file workspace.cpp.

◆ MakeSymlink()

auto daq::dpm::DaqWorkspaceImpl::MakeSymlink ( std::filesystem::path const &  target,
std::filesystem::path const &  link 
) const -> std::error_code
overridevirtual

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.

Implements daq::dpm::DaqWorkspace.

Definition at line 276 of file workspace.cpp.

◆ StoreSourceLookup()

void daq::dpm::DaqWorkspaceImpl::StoreSourceLookup ( SourceResolver::Mapping const &  status) const
overridevirtual

Implements daq::dpm::DaqWorkspace.

Definition at line 293 of file workspace.cpp.

◆ StoreSpecification()

void daq::dpm::DaqWorkspaceImpl::StoreSpecification ( std::string const &  specification) const
overridevirtual

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

Implements daq::dpm::DaqWorkspace.

Definition at line 319 of file workspace.cpp.

◆ StoreStatus()

void daq::dpm::DaqWorkspaceImpl::StoreStatus ( Status const &  status) const
overridevirtual

Implements daq::dpm::DaqWorkspace.

Definition at line 250 of file workspace.cpp.


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