CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
cond::persistency::TableDescription< Types > Class Template Reference

#include <DbCore.h>

Public Member Functions

template<typename... ColumnTypes>
void createIndex (const std::string &name)
 
const coral::TableDescription & get ()
 
template<typename Column , typename ReferencedColumn >
void setForeignKey (const std::string &name)
 
template<typename... ColumnTypes>
void setPrimaryKey ()
 
template<typename... ColumnTypes>
void setUniqueConstraint (const std::string &name)
 
 TableDescription (const char *name)
 

Private Member Functions

template<int n>
void _makeList (std::vector< std::string > &)
 
template<int n, typename Arg1 , typename... Args>
void _makeList (std::vector< std::string > &columnNames)
 
template<int n>
void addColumn (coral::TableDescription &)
 
template<int n, typename Arg1 , typename... Args>
void addColumn (coral::TableDescription &tableDescription)
 
template<int , typename Col1 , typename... Cols>
void checkColumns ()
 
template<int >
void checkColumns ()
 
template<typename... ColumnTypes>
std::vector< std::string > makeList ()
 

Private Attributes

coral::TableDescription m_description
 

Detailed Description

template<typename... Types>
class cond::persistency::TableDescription< Types >

Definition at line 286 of file DbCore.h.

Constructor & Destructor Documentation

◆ TableDescription()

template<typename... Types>
cond::persistency::TableDescription< Types >::TableDescription ( const char *  name)
inlineexplicit

Member Function Documentation

◆ _makeList() [1/2]

template<typename... Types>
template<int n>
void cond::persistency::TableDescription< Types >::_makeList ( std::vector< std::string > &  )
inlineprivate

◆ _makeList() [2/2]

template<typename... Types>
template<int n, typename Arg1 , typename... Args>
void cond::persistency::TableDescription< Types >::_makeList ( std::vector< std::string > &  columnNames)
inlineprivate

Definition at line 345 of file DbCore.h.

345  {
346  columnNames.push_back(Arg1::name);
347  _makeList<n + 1, Args...>(columnNames);
348  }

References cond::persistency::TableDescription< Types >::_makeList(), dqmiodumpmetadata::n, and Skims_PA_cff::name.

◆ addColumn() [1/2]

template<typename... Types>
template<int n>
void cond::persistency::TableDescription< Types >::addColumn ( coral::TableDescription< Types > &  )
inlineprivate

◆ addColumn() [2/2]

template<typename... Types>
template<int n, typename Arg1 , typename... Args>
void cond::persistency::TableDescription< Types >::addColumn ( coral::TableDescription< Types > &  tableDescription)
inlineprivate

◆ checkColumns() [1/2]

template<typename... Types>
template<int , typename Col1 , typename... Cols>
void cond::persistency::TableDescription< Types >::checkColumns ( )
inlineprivate

Definition at line 299 of file DbCore.h.

299  {
300  static_assert(is_same_any<Col1, Types...>(), "Specified Column has not been found in the table.");
301  checkColumns<0, Cols...>();
302  }

Referenced by cond::persistency::TableDescription< Types >::createIndex(), cond::persistency::TableDescription< Types >::setPrimaryKey(), and cond::persistency::TableDescription< Types >::setUniqueConstraint().

◆ checkColumns() [2/2]

template<typename... Types>
template<int >
void cond::persistency::TableDescription< Types >::checkColumns ( )
inlineprivate

Definition at line 305 of file DbCore.h.

305 {}

◆ createIndex()

template<typename... Types>
template<typename... ColumnTypes>
void cond::persistency::TableDescription< Types >::createIndex ( const std::string &  name)
inline

Definition at line 327 of file DbCore.h.

327  {
328  checkColumns<0, ColumnTypes...>();
329  m_description.createIndex(name, makeList<ColumnTypes...>());
330  }

References cond::persistency::TableDescription< Types >::checkColumns(), cond::persistency::TableDescription< Types >::m_description, and Skims_PA_cff::name.

◆ get()

template<typename... Types>
const coral::TableDescription& cond::persistency::TableDescription< Types >::get ( )
inline

Definition at line 338 of file DbCore.h.

338 { return m_description; }

References cond::persistency::TableDescription< Types >::m_description.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), data_sources.json_list::as_dicts(), data_sources.json_list::as_table(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), cond::persistency::GLOBAL_TAG::Table::create(), cond::persistency::RUN_INFO::Table::create(), cond::persistency::GLOBAL_TAG_MAP::Table::create(), cond::persistency::PAYLOAD::Table::create(), cond::persistency::IOV::Table::create(), cond::persistency::TAG_AUTHORIZATION::Table::create(), cond::persistency::TAG_LOG::Table::create(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), data_sources.json_list::first(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), data_sources.json_list::indices(), data_sources.json_list::last(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

◆ makeList()

template<typename... Types>
template<typename... ColumnTypes>
std::vector<std::string> cond::persistency::TableDescription< Types >::makeList ( )
inlineprivate

Definition at line 351 of file DbCore.h.

351  {
352  std::vector<std::string> columnList;
353  _makeList<0, ColumnTypes...>(columnList);
354  return columnList;
355  }

References cond::persistency::TableDescription< Types >::_makeList().

◆ setForeignKey()

template<typename... Types>
template<typename Column , typename ReferencedColumn >
void cond::persistency::TableDescription< Types >::setForeignKey ( const std::string &  name)
inline

◆ setPrimaryKey()

template<typename... Types>
template<typename... ColumnTypes>
void cond::persistency::TableDescription< Types >::setPrimaryKey ( )
inline

◆ setUniqueConstraint()

template<typename... Types>
template<typename... ColumnTypes>
void cond::persistency::TableDescription< Types >::setUniqueConstraint ( const std::string &  name)
inline

Definition at line 321 of file DbCore.h.

321  {
322  checkColumns<0, ColumnTypes...>();
323  m_description.setUniqueConstraint(makeList<ColumnTypes...>(), name);
324  }

References cond::persistency::TableDescription< Types >::checkColumns(), cond::persistency::TableDescription< Types >::m_description, and Skims_PA_cff::name.

Member Data Documentation

◆ m_description

template<typename... Types>
coral::TableDescription cond::persistency::TableDescription< Types >::m_description
private
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
HLT_Fake1_cff.tableName
tableName
Definition: HLT_Fake1_cff.py:10
cond::persistency::TableDescription::m_description
coral::TableDescription m_description
Definition: DbCore.h:358
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Types
Definition: Types.py:1
cond::persistency::TableDescription::_makeList
void _makeList(std::vector< std::string > &)
Definition: DbCore.h:342
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cond::persistency::TableDescription::checkColumns
void checkColumns()
Definition: DbCore.h:299
cond::persistency::TableDescription::addColumn
void addColumn(coral::TableDescription &)
Definition: DbCore.h:289
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443