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, 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)
Definition: Exception.cc:10
void ora::PoolMainTable::drop ( )
virtual

Implements ora::IDatabaseTable.

Definition at line 68 of file PoolDatabaseSchema.cc.

References python.IdGenerator::schema.

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.

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 BeamSplash_cfg::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

Implements ora::IDatabaseTable.

Definition at line 52 of file PoolDatabaseSchema.cc.

Referenced by Vispa.Views.PropertyView.Property::valueChanged().

52  {
53  return tableName();
54 }
static std::string tableName()
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 electronTools.AddElectronUserIsolation::__call__(), photonTools.AddPhotonUserIsolation::__call__(), metTools.AddTcMET::__call__(), muonTools.AddMuonUserIsolation::__call__(), editorTools.UserCodeTool::__call__(), HiCoreTools.RestrictInputToAOD::__call__(), coreTools.RestrictInputToAOD::__call__(), trackTools.MakeAODTrackCandidates::__call__(), cmsswVersionTools.Run52xOn51xTrigger::__call__(), editorTools.ChangeSource::__call__(), metTools.AddPfMET::__call__(), HiCoreTools.RemoveMCMatching::__call__(), coreTools.RunOnData::__call__(), trackTools.MakePATTrackCandidates::__call__(), trigTools.SwitchOnTrigger::__call__(), cmsswVersionTools.PickRelValInputFiles::__call__(), coreTools.RemoveMCMatching::__call__(), HiCoreTools.RemoveAllPATObjectsBut::__call__(), jetTools.RunBTagging::__call__(), HiCoreTools.RemoveSpecificPATObjects::__call__(), trigTools.SwitchOnTriggerStandAlone::__call__(), coreTools.RemoveAllPATObjectsBut::__call__(), trackTools.MakeTrackCandidates::__call__(), coreTools.RemoveSpecificPATObjects::__call__(), HiCoreTools.RemoveCleaning::__call__(), trigTools.SwitchOnTriggerMatching::__call__(), HiCoreTools.AddCleaning::__call__(), coreTools.RemoveCleaning::__call__(), tauTools.AddTauCollection::__call__(), trigTools.SwitchOnTriggerMatchingStandAlone::__call__(), coreTools.AddCleaning::__call__(), jetTools.AddJetCollection::__call__(), trigTools.SwitchOnTriggerMatchEmbedding::__call__(), trigTools.RemoveCleaningFromTriggerMatching::__call__(), jetTools.SwitchJetCollection::__call__(), jetTools.AddJetID::__call__(), metUncertaintyTools.RunMEtUncertainties::__call__(), jetTools.SetTagInfos::__call__(), and jetTools.SwitchJetCorrLevels::__call__().

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

Definition at line 27 of file PoolDatabaseSchema.cc.

27  {
28  static 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.

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