CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions
ora::PoolMainTable Class Reference

#include <PoolDatabaseSchema.h>

Inheritance diagram for ora::PoolMainTable:
ora::IMainTable ora::IDatabaseTable

Public Member Functions

void create ()
 
void drop ()
 
bool exists ()
 
bool getParameters (std::map< std::string, std::string > &destination)
 
std::string name ()
 
 PoolMainTable (coral::ISchema &dbSchema)
 
std::string schemaVersion ()
 
void setParameter (const std::string &paramName, const std::string &paramValue)
 
virtual ~PoolMainTable ()
 
- Public Member Functions inherited from ora::IMainTable
 IMainTable (coral::ISchema &schema)
 
virtual ~IMainTable ()
 
- Public Member Functions inherited from ora::IDatabaseTable
 IDatabaseTable (coral::ISchema &schema)
 
coral::ISchema & schema ()
 
virtual void setAccessPermission (const std::string &principal, bool forWrite)
 
virtual ~IDatabaseTable ()
 

Static Public Member Functions

static std::string tableName ()
 
static std::string version ()
 
- Static Public Member Functions inherited from ora::IMainTable
static std::string userSchemaVersionParameterName ()
 
static std::string versionParameterName ()
 

Detailed Description

Definition at line 48 of file PoolDatabaseSchema.h.

Constructor & Destructor Documentation

ora::PoolMainTable::PoolMainTable ( coral::ISchema &  dbSchema)
explicit

Definition at line 32 of file PoolDatabaseSchema.cc.

32  :
33  IMainTable( dbSchema ){
34 }
IMainTable(coral::ISchema &schema)
ora::PoolMainTable::~PoolMainTable ( )
virtual

Definition at line 36 of file PoolDatabaseSchema.cc.

36  {
37 }

Member Function Documentation

void ora::PoolMainTable::create ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 60 of file PoolDatabaseSchema.cc.

References python.IdGenerator::schema, HLT_25ns14e33_v1_cff::tableName, and ora::throwException().

60  {
61  if( schema().existsTable( tableName() )){
62  throwException( "POOL database main table already exists in this schema.",
63  "PoolMainTable::create");
64  }
65  throwException( "POOL database cannot be created.","PoolMainTable::create");
66 }
static std::string tableName()
coral::ISchema & schema()
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
Definition: Exception.cc:10
void ora::PoolMainTable::drop ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 68 of file PoolDatabaseSchema.cc.

References python.IdGenerator::schema, and HLT_25ns14e33_v1_cff::tableName.

68  {
69  schema().dropIfExistsTable( tableName() );
70 }
static std::string tableName()
coral::ISchema & schema()
bool ora::PoolMainTable::exists ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 56 of file PoolDatabaseSchema.cc.

References python.IdGenerator::schema, and HLT_25ns14e33_v1_cff::tableName.

Referenced by ora::PoolDatabaseSchema::existsMainTable().

56  {
57  return schema().existsTable( tableName() );
58 }
static std::string tableName()
coral::ISchema & schema()
bool ora::PoolMainTable::getParameters ( std::map< std::string, std::string > &  destination)
virtual

Implements ora::IMainTable.

Definition at line 43 of file PoolDatabaseSchema.cc.

References relval_steps::version, and ora::IMainTable::versionParameterName().

43  {
44  dest.insert(std::make_pair( IMainTable::versionParameterName(), version() ) );
45  return true;
46 }
static std::string versionParameterName()
static std::string version()
std::string ora::PoolMainTable::name ( )
virtual
std::string ora::PoolMainTable::schemaVersion ( )
virtual

Implements ora::IMainTable.

Definition at line 48 of file PoolDatabaseSchema.cc.

References ora::poolSchemaVersion().

48  {
49  return poolSchemaVersion();
50 }
std::string poolSchemaVersion()
void ora::PoolMainTable::setParameter ( const std::string &  paramName,
const std::string &  paramValue 
)
virtual

Implements ora::IMainTable.

Definition at line 39 of file PoolDatabaseSchema.cc.

Referenced by editorTools.UserCodeTool::__call__(), HiCoreTools.RestrictInputToAOD::__call__(), coreTools.RunOnData::__call__(), trackTools.MakeAODTrackCandidates::__call__(), runJetUncertainties.RunJetUncertainties::__call__(), metTools.AddMETCollection::__call__(), editorTools.ChangeSource::__call__(), HiCoreTools.RemoveMCMatching::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), jetTools.AddJetCollection::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), runType1CaloMEtUncertainties.RunType1CaloMEtUncertainties::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), trackTools.MakeTrackCandidates::__call__(), runMVAMEtUncertainties.RunMVAMEtUncertainties::__call__(), tauTools.AddTauCollection::__call__(), jmeUncertaintyTools.JetMEtUncertaintyTools::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.RemoveCleaning::__call__(), runType1PFMEtUncertainties.RunType1PFMEtUncertainties::__call__(), HiCoreTools.AddCleaning::__call__(), runNoPileUpMEtUncertainties.RunNoPileUpMEtUncertainties::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.AddJetID::__call__(), and jetTools.SetTagInfos::__call__().

40  {
41 }
std::string ora::PoolMainTable::tableName ( )
static

Definition at line 27 of file PoolDatabaseSchema.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

27  {
28  static const std::string s_name("POOL_RSS_DB");
29  return s_name;
30 }
std::string ora::PoolMainTable::version ( )
static

Definition at line 22 of file PoolDatabaseSchema.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

22  {
23  static const std::string s_version("POOL");
24  return s_version;
25 }