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

Public Types

enum class  CONFIGURATION_MODE { DO_NOT_CREATE , XML_FILE , ARTDAQ_DATABASE }
 

Public Member Functions

virtual std::set< std::string > getAllTableNames (void) const
 
virtual std::set< TableVersiongetVersions (const TableBase *configuration) const =0
 
TableVersion saveNewVersion (TableBase *configuration, TableVersion temporaryVersion, TableVersion newVersion=TableVersion())
 
virtual std::set< std::string > getAllTableGroupNames (const std::string &="") const
 group handling
 
virtual std::set< TableGroupKeygetKeys (const std::string &) const
 
virtual std::map< std::string, TableVersiongetTableGroupMembers (std::string const &, bool=false) const
 
virtual void saveTableGroup (std::map< std::string, TableVersion > const &, std::string const &) const
 
virtual std::pair< std::string, TableVersionsaveCustomJSON (const std::string &JSON, const std::string &documentNameToSave) const
 
virtual std::string loadCustomJSON (const std::string &documentNameToLoad, TableVersion documentVersionToLoad) const
 
virtual TableGroupKey findLatestGroupKey (const std::string &) const
 otsdaq_database_migrate and otsdaq_import_system_aliases to compile
 
virtual TableVersion findLatestVersion (const TableBase *configuration) const =0
 return INVALID if no existing versions
 
virtual void saveActiveVersion (const TableBase *configuration, bool overwrite=false) const =0
 

Static Public Member Functions

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

static const std::string GROUP_METADATA_TABLE_NAME
 

Protected Member Functions

 ConfigurationInterface (void)
 Protected constructor.
 
virtual void fill (TableBase *configuration, TableVersion version) const =0
 

Protected Attributes

ConfigurationHandlerBase * theConfigurationHandler_
 

Friends

class ConfigurationManagerRW
 because need access to latestVersion() call for group metadata
 
class ConfigurationManager
 because need access to fill() call for group metadata
 

Detailed Description

Definition at line 22 of file ConfigurationInterface.h.

Member Function Documentation

◆ getAllTableNames()

virtual std::set<std::string > ots::ConfigurationInterface::getAllTableNames ( void  ) const
inlinevirtual

table handling define ConfigurationInterface::get() source code

Reimplemented in ots::DatabaseConfigurationInterface.

Definition at line 47 of file ConfigurationInterface.h.

◆ getTableGroupMembers()

virtual std::map<std::string , TableVersion > ots::ConfigurationInterface::getTableGroupMembers ( std::string const &  ,
bool  = false 
) const
inlinevirtual

Caution: getTableGroupMembers must be carefully used.. the table versions are as initially defined for table versions aliases, i.e. not converted according to the metadata groupAliases!

Reimplemented in ots::DatabaseConfigurationInterface.

Definition at line 61 of file ConfigurationInterface.h.

◆ saveNewVersion()

TableVersion ConfigurationInterface::saveNewVersion ( TableBase table,
TableVersion  temporaryVersion,
TableVersion  newVersion = TableVersion() 
)

saveNewVersion If newVersion is 0, then save the temporaryVersion as the next positive version number, save using the interface, and return the new version number If newVersion is non 0, attempt to save as given newVersion number, else throw exception. return TableVersion::INVALID on failure

Definition at line 82 of file ConfigurationInterface.cc.

Member Data Documentation

◆ GROUP_METADATA_TABLE_NAME

const std::string ConfigurationInterface::GROUP_METADATA_TABLE_NAME
static
Initial value:
=
"TableGroupMetadata"

Definition at line 43 of file ConfigurationInterface.h.


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