EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbMultConnector Class Reference

#include <EicRoot/blob/master/dbase/dbInterface/FairDbMultConnector.h>

+ Collaboration diagram for FairDbMultConnector:

Classes

class  BLock
 

Public Types

enum  Status { kFailed, kClosed, kOpen }
 

Public Member Functions

FairDbStatementCreateStatement (UInt_t dbNo) const
 
const FairDbConnectionGetConnection (UInt_t dbNo) const
 Return associated FairDbConnection. FairDbMultConnector retains ownership.
 
FairDbConnectionGetConnection (UInt_t dbNo)
 
string GetDbName (UInt_t dbNo) const
 
Int_t GetDbNo (const string &dbName) const
 
Int_t GetStatus (UInt_t dbNo) const
 
string GetStatusAsString (UInt_t dbNo) const
 
string GetURL (UInt_t dbNo) const
 
Bool_t IsTemporaryTable (const string &tableName, Int_t dbNo) const
 
Int_t AllocateSeqNo (const string &tableName, Int_t requireGlobal=0, Int_t dbNo=0) const
 
Int_t GetAuthorisingDbNo () const
 
UInt_t GetNumDb () const
 
Int_t GetTableDbNo (const string &tableName, Int_t selectDbNo=-1) const
 
Bool_t TableExists (const string &tableName, Int_t selectDbNo=-1) const
 
Int_t CreateTemporaryTable (const string &tableName, const string &tableDescr)
 
void HoldConnections ()
 
void ReleaseConnections ()
 
void SetPermanent (UInt_t dbNo, Bool_t permanent=true)
 
 FairDbMultConnector ()
 
virtual ~FairDbMultConnector ()
 
 FairDbMultConnector (const FairDbMultConnector &conn)
 
void SetAuthorisingEntry (Int_t entry)
 

Private Member Functions

Int_t ReserveNextSeqNo (const string &tableName, Bool_t isGlobal, UInt_t dbNo) const
 

Private Attributes

Int_t fGlobalSeqNoDbNo
 
vector< FairDbConnection * > fConnections
 
std::map< string, Int_t > fTemporaryTables
 

Friends

ostream & operator<< (ostream &s, const FairDbMultConnector &cascader)
 

Detailed Description

Definition at line 21 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 21 of file FairDbMultConnector.h

Member Enumeration Documentation

Enumerator:
kFailed 
kClosed 
kOpen 

Definition at line 28 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 28 of file FairDbMultConnector.h

Constructor & Destructor Documentation

FairDbMultConnector::FairDbMultConnector ( )
FairDbMultConnector::~FairDbMultConnector ( )
virtual

Definition at line 129 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 129 of file FairDbMultConnector.cxx

References fConnections, and GetNumDb().

+ Here is the call graph for this function:

FairDbMultConnector::FairDbMultConnector ( const FairDbMultConnector conn)

Definition at line 116 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 116 of file FairDbMultConnector.cxx

Member Function Documentation

Int_t FairDbMultConnector::AllocateSeqNo ( const string &  tableName,
Int_t  requireGlobal = 0,
Int_t  dbNo = 0 
) const

Definition at line 160 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 160 of file FairDbMultConnector.cxx

References fGlobalSeqNoDbNo, IsTemporaryTable(), and ReserveNextSeqNo().

Referenced by FairDbConfigStream::Write(), and FairDbLogEntry::Write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FairDbStatement * FairDbMultConnector::CreateStatement ( UInt_t  dbNo) const

Definition at line 186 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 186 of file FairDbMultConnector.cxx

References fConnections, GetStatus(), kFailed, and FairDbStatement::PrintExceptions().

Referenced by CreateTemporaryTable(), FairDbProxy::FindTimeBoundaries(), FairDbProxy::QueryAllValidities(), FairDbProxy::QuerySeqNo(), FairDbProxy::QuerySeqNos(), FairDbProxy::QueryValidity(), FairDbProxy::RemoveSeqNo(), FairDbProxy::ReplaceInsertDate(), FairDbProxy::ReplaceSeqNo(), FairDbProxy::ReplaceSeqNoOracle(), and ReserveNextSeqNo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t FairDbMultConnector::CreateTemporaryTable ( const string &  tableName,
const string &  tableDescr 
)
Int_t FairDbMultConnector::GetAuthorisingDbNo ( ) const
inline

Definition at line 55 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 55 of file FairDbMultConnector.h

References fGlobalSeqNoDbNo.

const FairDbConnection * FairDbMultConnector::GetConnection ( UInt_t  dbNo) const

Return associated FairDbConnection. FairDbMultConnector retains ownership.

Definition at line 276 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 276 of file FairDbMultConnector.cxx

References fConnections, GetStatus(), and kFailed.

Referenced by CreateTemporaryTable(), GetTableDbNo(), FairDbProxy::ReplaceSeqNo(), and FairDbProxy::StoreMetaData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FairDbConnection * FairDbMultConnector::GetConnection ( UInt_t  dbNo)

Definition at line 285 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 285 of file FairDbMultConnector.cxx

References fConnections, GetStatus(), and kFailed.

+ Here is the call graph for this function:

string FairDbMultConnector::GetDbName ( UInt_t  dbNo) const

Definition at line 293 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 293 of file FairDbMultConnector.cxx

References fConnections, and GetNumDb().

Referenced by GetDbNo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t FairDbMultConnector::GetDbNo ( const string &  dbName) const

Definition at line 305 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 305 of file FairDbMultConnector.cxx

References fConnections, GetDbName(), and GetNumDb().

+ Here is the call graph for this function:

UInt_t FairDbMultConnector::GetNumDb ( ) const
inline

Definition at line 56 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 56 of file FairDbMultConnector.h

References fConnections.

Referenced by FairParTSQLIo::check(), FairDbTableProxyRegistry::Config(), GetDbName(), GetDbNo(), FairDbProxy::GetNumDb(), GetStatus(), GetURL(), operator<<(), FairParTSQLIo::print(), FairDbProxy::StoreMetaData(), and ~FairDbMultConnector().

+ Here is the caller graph for this function:

Int_t FairDbMultConnector::GetStatus ( UInt_t  dbNo) const
inline

Definition at line 40 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 40 of file FairDbMultConnector.h

References fConnections, GetNumDb(), kClosed, kFailed, and kOpen.

Referenced by FairParTSQLIo::check(), CreateStatement(), GetConnection(), and GetStatusAsString().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbMultConnector::GetStatusAsString ( UInt_t  dbNo) const

Definition at line 317 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 317 of file FairDbMultConnector.cxx

References GetStatus(), kClosed, and kOpen.

Referenced by FairParTSQLIo::disconnect(), and operator<<().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Int_t FairDbMultConnector::GetTableDbNo ( const string &  tableName,
Int_t  selectDbNo = -1 
) const

Definition at line 332 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 332 of file FairDbMultConnector.cxx

References fConnections, GetConnection(), and FairDbConnection::TableExists().

Referenced by FairDbSqlValPacket::SetMetaData(), and TableExists().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

string FairDbMultConnector::GetURL ( UInt_t  dbNo) const
inline

Definition at line 45 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 45 of file FairDbMultConnector.h

References fConnections, and GetNumDb().

Referenced by operator<<(), and FairDbLogEntry::SetServerName().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbMultConnector::HoldConnections ( )

Definition at line 351 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 351 of file FairDbMultConnector.cxx

References fConnections.

Bool_t FairDbMultConnector::IsTemporaryTable ( const string &  tableName,
Int_t  dbNo 
) const

Definition at line 359 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 359 of file FairDbMultConnector.cxx

References fTemporaryTables.

Referenced by AllocateSeqNo(), and ReserveNextSeqNo().

+ Here is the caller graph for this function:

void FairDbMultConnector::ReleaseConnections ( )

Definition at line 422 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 422 of file FairDbMultConnector.cxx

References fConnections.

Referenced by FairDbConnectionMaintainer::~FairDbConnectionMaintainer().

+ Here is the caller graph for this function:

Int_t FairDbMultConnector::ReserveNextSeqNo ( const string &  tableName,
Bool_t  isGlobal,
UInt_t  dbNo 
) const
private

Definition at line 430 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 430 of file FairDbMultConnector.cxx

References FairDbString::c_str(), FairDbString::Clear(), CreateStatement(), FairDbStatement::ExecuteQuery(), FairDbStatement::ExecuteUpdate(), FairDbMultConnector::BLock::IsBLocked(), IsTemporaryTable(), FairDb::kMAXLOCALSEQNO, FairDbStatement::PrintExceptions(), and TableExists().

Referenced by AllocateSeqNo().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbMultConnector::SetAuthorisingEntry ( Int_t  entry)
inline

Definition at line 73 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 73 of file FairDbMultConnector.h

References fGlobalSeqNoDbNo.

void FairDbMultConnector::SetPermanent ( UInt_t  dbNo,
Bool_t  permanent = true 
)

Definition at line 576 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 576 of file FairDbMultConnector.cxx

References fConnections.

Referenced by FairDbTableProxyRegistry::Config().

+ Here is the caller graph for this function:

Bool_t FairDbMultConnector::TableExists ( const string &  tableName,
Int_t  selectDbNo = -1 
) const
inline

Definition at line 58 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 58 of file FairDbMultConnector.h

References GetTableDbNo().

Referenced by FairDbTableProxyRegistry::GetTableProxy(), FairDbSqlValPacket::Recreate(), ReserveNextSeqNo(), and FairDbProxy::TableExists().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Friends And Related Function Documentation

ostream& operator<< ( ostream &  s,
const FairDbMultConnector cascader 
)
friend

Definition at line 142 of file FairDbMultConnector.cxx.

View newest version in sPHENIX GitHub at line 142 of file FairDbMultConnector.cxx

Member Data Documentation

vector<FairDbConnection*> FairDbMultConnector::fConnections
private
Int_t FairDbMultConnector::fGlobalSeqNoDbNo
private

Definition at line 84 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 84 of file FairDbMultConnector.h

Referenced by AllocateSeqNo(), GetAuthorisingDbNo(), operator<<(), and SetAuthorisingEntry().

std::map<string,Int_t> FairDbMultConnector::fTemporaryTables
private

Definition at line 86 of file FairDbMultConnector.h.

View newest version in sPHENIX GitHub at line 86 of file FairDbMultConnector.h

Referenced by CreateTemporaryTable(), and IsTemporaryTable().


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