ifw-daq 3.1.0
IFW Data Acquisition modules
Loading...
Searching...
No Matches
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.
 
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.
 
auto MakeHardLink (std::filesystem::path const &target, std::filesystem::path const &link) const -> std::error_code override
 Create hard link at to target
 
auto MakeSymlink (std::filesystem::path const &target, std::filesystem::path const &link) const -> std::error_code override
 Create symbolic link at to target
 
auto Exists (std::filesystem::path const &path, std::filesystem::file_type type=std::filesystem::file_type::regular) const -> bool override
 
auto GetLogsPath () const -> std::filesystem::path override
 Get path relative to root of the directory containing log files.
 
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()
 
auto LoadSpecification () const -> json::DpSpec override
 Get file name of the data product specification stored in StoreSpecification()
 
void StoreSpecification (std::string const &specification) const override
 Get file name of the data product specification stored in StoreSpecification()
 
- Public Member Functions inherited from daq::dpm::DaqWorkspace
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.
 
virtual auto MakeHardLink (std::filesystem::path const &target, std::filesystem::path const &link) const -> std::error_code=0
 Create hard link at to target
 
virtual auto MakeSymlink (std::filesystem::path const &target, std::filesystem::path const &link) const -> std::error_code=0
 Create symbolic link at to target
 
virtual auto GetLogsPath () const -> std::filesystem::path=0
 Get path relative to root of the directory containing log files.
 

Detailed Description

Definition at line 263 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 229 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 287 of file workspace.hpp.

◆ GetLogsPath()

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

Get path relative to root of the directory containing log files.

Implements daq::dpm::DaqWorkspace.

Definition at line 332 of file workspace.cpp.

◆ GetPath()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 273 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 277 of file workspace.hpp.

◆ GetSourceLookupPath()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 265 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 241 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 308 of file workspace.cpp.

◆ LoadSourceLookup()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 288 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 312 of file workspace.cpp.

◆ LoadStatus()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 245 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 274 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 269 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 281 of file workspace.cpp.

◆ StoreSourceLookup()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 298 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 324 of file workspace.cpp.

◆ StoreStatus()

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

Implements daq::dpm::DaqWorkspace.

Definition at line 255 of file workspace.cpp.


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