tdaq-develop-2025-02-12
ots::DatabaseConfigurationInterface Class Reference
Inheritance diagram for ots::DatabaseConfigurationInterface:
ots::ConfigurationInterface

Public Types

using table_version_map_t = std::map< std::string, TableVersion >
 
- Public Types inherited from ots::ConfigurationInterface
enum class  CONFIGURATION_MODE { DO_NOT_CREATE , XML_FILE , ARTDAQ_DATABASE }
 

Public Member Functions

void fill (TableBase *table, TableVersion version) const override
 read table from database More...
 
void saveActiveVersion (const TableBase *table, bool overwrite=false) const override
 write table to database
 
TableVersion findLatestVersion (const TableBase *table) const noexcept override
 find the latest table version by table type More...
 
std::set< std::string > getAllTableNames (void) const override
 returns a list of all table names More...
 
std::set< TableVersiongetVersions (const TableBase *table) const noexcept override
 find all table versions by table type More...
 
std::set< std::string > getAllTableGroupNames (std::string const &filterString="") const override
 find all table groups in database More...
 
std::set< TableGroupKeygetKeys (const std::string &groupName) const override
 find all configuration groups in database
 
TableGroupKey findLatestGroupKey (const std::string &groupName) const noexcept override
 
table_version_map_t getTableGroupMembers (std::string const &tableGroup, bool includeMetaDataTable=false) const override
 return the contents of a table group More...
 
void saveTableGroup (table_version_map_t const &memberMap, std::string const &tableGroup) const override
 create a new table group from the contents map More...
 
std::pair< std::string, TableVersionsaveCustomJSON (const std::string &JSON, const std::string &documentNameToSave) const override
 
std::string loadCustomJSON (const std::string &documentNameToLoad, TableVersion documentVersionToLoad) const override
 
- Public Member Functions inherited from ots::ConfigurationInterface
TableVersion saveNewVersion (TableBase *configuration, TableVersion temporaryVersion, TableVersion newVersion=TableVersion())
 
virtual void saveTableGroup (std::map< std::string, TableVersion > const &, std::string const &) const
 

Public Attributes

bool IS_FILESYSTEM_DB = true
 

Additional Inherited Members

- Static Public Member Functions inherited from ots::ConfigurationInterface
static ConfigurationInterfacegetInstance (CONFIGURATION_MODE mode=CONFIGURATION_MODE::DO_NOT_CREATE)
 
static bool isVersionTrackingEnabled (void)
 
static void setVersionTrackingEnabled (bool setValue)
 
static const CONFIGURATION_MODE & getMode (void)
 
- Static Public Attributes inherited from ots::ConfigurationInterface
static const std::string GROUP_METADATA_TABLE_NAME
 
- Protected Member Functions inherited from ots::ConfigurationInterface
 ConfigurationInterface (void)
 Protected constructor.
 
- Protected Attributes inherited from ots::ConfigurationInterface
ConfigurationHandlerBase * theConfigurationHandler_
 

Detailed Description

Definition at line 17 of file Database_configInterface.h.

Member Function Documentation

◆ fill()

void DatabaseConfigurationInterface::fill ( TableBase table,
TableVersion  version 
) const
overridevirtual

read table from database

read table from database version = -1 means latest version

Implements ots::ConfigurationInterface.

Definition at line 91 of file Database_configInterface.cc.

◆ findLatestGroupKey()

TableGroupKey DatabaseConfigurationInterface::findLatestGroupKey ( const std::string &  groupName) const
overridevirtualnoexcept

find the latest configuration group key by group name if not found, return invalid

Reimplemented from ots::ConfigurationInterface.

Definition at line 301 of file Database_configInterface.cc.

◆ findLatestVersion()

TableVersion DatabaseConfigurationInterface::findLatestVersion ( const TableBase table) const
overridevirtualnoexcept

find the latest table version by table type

find the latest configuration version by configuration type

Implements ots::ConfigurationInterface.

Definition at line 161 of file Database_configInterface.cc.

◆ getAllTableGroupNames()

std::set< std::string > DatabaseConfigurationInterface::getAllTableGroupNames ( std::string const &  filterString = "") const
overridevirtual

find all table groups in database

find all configuration groups in database

Reimplemented from ots::ConfigurationInterface.

Definition at line 257 of file Database_configInterface.cc.

◆ getAllTableNames()

std::set< std::string > DatabaseConfigurationInterface::getAllTableNames ( void  ) const
overridevirtual

returns a list of all table names

returns a list of all configuration names

Reimplemented from ots::ConfigurationInterface.

Definition at line 224 of file Database_configInterface.cc.

◆ getTableGroupMembers()

table_version_map_t DatabaseConfigurationInterface::getTableGroupMembers ( std::string const &  tableGroup,
bool  includeMetaDataTable = false 
) const
overridevirtual

return the contents of a table group

return the contents of a configuration group

Reimplemented from ots::ConfigurationInterface.

Definition at line 327 of file Database_configInterface.cc.

◆ getVersions()

std::set< TableVersion > DatabaseConfigurationInterface::getVersions ( const TableBase table) const
overridevirtualnoexcept

find all table versions by table type

find all configuration versions by configuration type

Implements ots::ConfigurationInterface.

Definition at line 181 of file Database_configInterface.cc.

◆ saveTableGroup()

void DatabaseConfigurationInterface::saveTableGroup ( table_version_map_t const &  memberMap,
std::string const &  tableGroup 
) const
override

create a new table group from the contents map

create a new configuration group from the contents map

Definition at line 576 of file Database_configInterface.cc.


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