|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <group_metadata.hpp>
Public Member Functions | |
| void | generate_metadata_file (std::filesystem::path dest) override |
| Generaete metadata file to dest. | |
| void | load_metadata_from_meta_file (std::filesystem::path src) override |
| Load metadata file from src. | |
| std::string | export_to_string () override |
| Export metadata to string (json format) | |
| void | from_string (const std::string &) override |
| Import metadata from string (json format) | |
| status_type::e_status | get_group_status () const |
| Return a status of the group transfer based on the status of his transfers, The highest status in priority order is returned. | |
| GroupMetadata (std::string group_id, std::string source, const IPFormat &source_ip, protocol_type::e_protocol_type protocol, const nlohmann::json &protocol_options=nlohmann::json(), const std::vector< std::shared_ptr< TransferMetadata > > &transfers_meta=std::vector< std::shared_ptr< TransferMetadata > >()) | |
| Constructor. | |
| GroupMetadata (const std::filesystem::path &src, bool is_path=true) | |
| Load from file constructor. | |
| virtual | ~GroupMetadata ()=default |
| bool | operator== (MetadataAbstract const &other) const override |
| Operator ==. | |
| bool | operator< (MetadataAbstract const &other) const override |
| Operator <. | |
| void | set_group_id (std::string transfer_id) |
| void | set_protocol (protocol_type::e_protocol_type protocol) |
| void | set_transfers_meta (std::vector< std::shared_ptr< TransferMetadata > > files_meta) |
| void | set_protocol_options (nlohmann::json protocol_options) |
| void | set_source_id (std::string source_id) |
| void | set_expected_files (std::set< std::string > expected_files) |
| TransferMetadata & | add_file (std::shared_ptr< TransferMetadata > meta) |
| void | add_expected_file (const std::filesystem::path &file) |
| std::string | get_group_id () const |
| protocol_type::e_protocol_type | get_protocol () const |
| std::vector< std::shared_ptr< TransferMetadata > > & | get_transfers_meta () |
| const std::vector< std::shared_ptr< TransferMetadata > > & | get_transfers_meta () const |
| TransferMetadata & | get_transfer_meta_from_file_path (const std::string &file_path) |
| const std::set< std::string > & | get_expected_files () const |
| nlohmann::json | get_protocol_options () const |
| std::string | get_source_id () const |
| IPFormat | get_source_ip () const |
| std::string | to_string () const |
Public Member Functions inherited from dunedaq::snbmodules::MetadataAbstract | |
| virtual | ~MetadataAbstract ()=default |
Static Public Attributes | |
| static const std::string | m_file_extension = ".gmetadata" |
Private Attributes | |
| std::string | m_group_id |
| Unique identifier for the transfer. | |
| protocol_type::e_protocol_type | m_protocol |
| Protocol used for the transfer, every files in the transfer must use the same protocol. | |
| nlohmann::json | m_protocol_options |
| Specific options for the selected protocol. | |
| std::vector< std::shared_ptr< TransferMetadata > > | m_transfers_meta |
| Set of files to transfer. | |
| std::set< std::string > | m_expected_files |
| Set of expected files metadata to add later. | |
| std::string | m_source_id |
| Get source id. | |
| IPFormat | m_source_ip |
| Get source ip. | |
Definition at line 25 of file group_metadata.hpp.
|
inline |
Constructor.
| protocol | |
| transfers_meta | |
| transfer_id |
Definition at line 54 of file group_metadata.hpp.
|
inlineexplicit |
Load from file constructor.
Definition at line 72 of file group_metadata.hpp.
|
virtualdefault |
|
inline |
Definition at line 115 of file group_metadata.hpp.
| TransferMetadata & dunedaq::snbmodules::GroupMetadata::add_file | ( | std::shared_ptr< TransferMetadata > | meta | ) |
Definition at line 36 of file group_metadata.cpp.
|
overridevirtual |
Export metadata to string (json format)
Implements dunedaq::snbmodules::MetadataAbstract.
Definition at line 65 of file group_metadata.cpp.
|
overridevirtual |
Import metadata from string (json format)
Implements dunedaq::snbmodules::MetadataAbstract.
Definition at line 84 of file group_metadata.cpp.
|
overridevirtual |
Generaete metadata file to dest.
| dest |
Implements dunedaq::snbmodules::MetadataAbstract.
Definition at line 115 of file group_metadata.cpp.
|
inline |
Definition at line 140 of file group_metadata.hpp.
|
inline |
Definition at line 135 of file group_metadata.hpp.
|
inline |
Return a status of the group transfer based on the status of his transfers, The highest status in priority order is returned.
Definition at line 39 of file group_metadata.hpp.
|
inline |
Definition at line 136 of file group_metadata.hpp.
|
inline |
Definition at line 141 of file group_metadata.hpp.
|
inline |
Definition at line 142 of file group_metadata.hpp.
|
inline |
Definition at line 143 of file group_metadata.hpp.
| TransferMetadata & dunedaq::snbmodules::GroupMetadata::get_transfer_meta_from_file_path | ( | const std::string & | file_path | ) |
Definition at line 24 of file group_metadata.cpp.
|
inline |
Definition at line 137 of file group_metadata.hpp.
|
inline |
Definition at line 138 of file group_metadata.hpp.
|
overridevirtual |
Load metadata file from src.
| src |
Implements dunedaq::snbmodules::MetadataAbstract.
Definition at line 126 of file group_metadata.cpp.
|
inlineoverridevirtual |
Operator <.
| other | Other GroupMetadata to compare |
Implements dunedaq::snbmodules::MetadataAbstract.
Definition at line 95 of file group_metadata.hpp.
|
inlineoverridevirtual |
Operator ==.
| other | Other GroupMetadata to compare |
Implements dunedaq::snbmodules::MetadataAbstract.
Definition at line 86 of file group_metadata.hpp.
|
inline |
Definition at line 113 of file group_metadata.hpp.
|
inline |
Definition at line 102 of file group_metadata.hpp.
|
inline |
Definition at line 103 of file group_metadata.hpp.
|
inline |
Definition at line 108 of file group_metadata.hpp.
|
inline |
Definition at line 112 of file group_metadata.hpp.
|
inline |
Definition at line 104 of file group_metadata.hpp.
| std::string dunedaq::snbmodules::GroupMetadata::to_string | ( | ) | const |
Definition at line 145 of file group_metadata.cpp.
|
private |
Set of expected files metadata to add later.
Definition at line 160 of file group_metadata.hpp.
|
static |
Definition at line 29 of file group_metadata.hpp.
|
private |
Unique identifier for the transfer.
Definition at line 148 of file group_metadata.hpp.
|
private |
Protocol used for the transfer, every files in the transfer must use the same protocol.
Definition at line 151 of file group_metadata.hpp.
|
private |
Specific options for the selected protocol.
Definition at line 154 of file group_metadata.hpp.
|
private |
Get source id.
Definition at line 163 of file group_metadata.hpp.
|
private |
Get source ip.
Definition at line 166 of file group_metadata.hpp.
|
private |
Set of files to transfer.
Definition at line 157 of file group_metadata.hpp.