1 #ifndef _ots_ConfigurationInterface_h_
2 #define _ots_ConfigurationInterface_h_
7 #include "otsdaq/Macros/CoutMacros.h"
9 #include "otsdaq/PluginMakers/MakeTable.h"
10 #include "otsdaq/TableCore/TableBase.h"
11 #include "otsdaq/TableCore/TableGroupKey.h"
12 #include "otsdaq/TableCore/TableVersion.h"
13 #include "otsdaq/TableCore/TableView.h"
19 class ConfigurationHandlerBase;
32 static bool isVersionTrackingEnabled (
void);
33 static void setVersionTrackingEnabled (
bool setValue);
35 static const std::string GROUP_METADATA_TABLE_NAME;
38 #include "otsdaq/ConfigurationInterface/ConfigurationInterface.icc"
39 virtual std::set<std::string > getAllTableNames (
void)
const { __SS__; __THROW__(ss.str() +
"ConfigurationInterface::... Must only call getAllTableNames in a mode with this functionality implemented (e.g. DatabaseConfigurationInterface)."); }
40 virtual std::set<TableVersion> getVersions (
const TableBase* configuration)
const = 0;
41 const bool& getMode (
void)
const {
return theMode_; }
45 virtual std::set<std::string > getAllTableGroupNames (
const std::string& =
"")
const { __SS__; __THROW__(ss.str() +
"ConfigurationInterface::... Must only call getAllTableGroupNames in a mode with this functionality implemented (e.g. DatabaseConfigurationInterface)."); }
46 virtual std::set<TableGroupKey> getKeys (
const std::string& )
const { __SS__; __THROW__(ss.str() +
"ConfigurationInterface::... Must only call getKeys in a mode with this functionality implemented (e.g. DatabaseConfigurationInterface)."); }
52 virtual std::map<std::string ,
53 TableVersion > getTableGroupMembers (std::string
const& ,
bool =
false)
const { __SS__; __THROW__(ss.str() +
"ConfigurationInterface::... Must only call getTableGroupMembers in a mode with this functionality implemented (e.g. DatabaseConfigurationInterface)."); }
54 virtual void saveTableGroup (std::map<std::string /*name*/,TableVersion /*version*/>
const& , std::string
const& )
const { __SS__; __THROW__(ss.str() +
"ConfigurationInterface::... Must only call saveTableGroup in a mode with this functionality implemented (e.g. DatabaseConfigurationInterface)."); }
62 virtual TableGroupKey findLatestGroupKey (
const std::string& )
const { __SS__; __THROW__(ss.str() +
"ConfigurationInterface::... Must only call findLatestGroupKey in a mode with this functionality implemented (e.g. DatabaseConfigurationInterface)."); }
64 virtual void saveActiveVersion (
const TableBase* configuration,
bool overwrite =
false)
const = 0;
67 ConfigurationHandlerBase* theConfigurationHandler_;
72 static bool theVersionTrackingEnabled_;