ATLAS Offline Software
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
pool::DbSession Class Reference

Db objects: class DbSession. More...

#include <DbSession.h>

Inheritance diagram for pool::DbSession:
Collaboration diagram for pool::DbSession:

Public Member Functions

 DbSession ()
 Constructor. More...
 
 DbSession (const DbSession &copy)
 Copy constructor. More...
 
 DbSession (DbSessionObj *session)
 Object constructor. More...
 
virtual ~DbSession ()
 Standard destructor. More...
 
DbSessionoperator= (const DbSession &copy)
 Assignment operator
More...
 
DbSessionoperator= (const int)
 Assignment operator. More...
 
int refCount () const
 Access reference counter. More...
 
DbDomainObjfind (const DbType &type)
 Find domain object in session (by technology type) More...
 
DbStatus add (DbDomainObj *dom)
 Add domain to session. More...
 
DbStatus remove (const DbDomainObj *dom)
 Find domain in session. More...
 
DbStatus open ()
 Open the session in a given mode. More...
 
DbStatus close ()
 Close the session. More...
 
IOODatabasedb (const DbType &typ)
 Allow access to the Database implementation. More...
 
T * operator-> ()
 Dereference operator. More...
 
const T * operator-> () const
 
bool operator! () const
 Validity check through operator NOT. More...
 
const T * ptr () const
 Access to underlying object. More...
 
T * ptr ()
 
bool isValid () const
 Validity check (Objy like) More...
 
const DbTypetype () const
 Inquire storage type of the handle. More...
 

Protected Types

typedef T _DataType
 Data type definition. More...
 
typedef DbHandleBase< _DataTypeBase
 Data type definition. More...
 

Protected Member Functions

void setType (const DbType &typ)
 Set handle type. More...
 
void setPtr (T *ptr)
 Set data pointer. More...
 

Protected Attributes

T * m_ptr
 Data member: Object pointer. Sub-classes need access on re-assignment. More...
 
DbType m_type
 Data member: Technology type. Sub-classes need access on re-assignment. More...
 

Private Member Functions

void switchPtr (DbSessionObj *obj)
 Assign transient object properly (including reference counting) More...
 

Friends

class DbSessionObj
 Friend declarations. More...
 

Detailed Description

Db objects: class DbSession.

Description: Handle managing a DbSessionObj, which allows to access domains and Databasees of a given storage type.

Author
M.Frank
Version
1.0

Definition at line 43 of file DbSession.h.

Member Typedef Documentation

◆ _DataType

typedef T pool::DbHandleBase::_DataType
protectedinherited

Data type definition.

Definition at line 37 of file DbHandleBase.h.

◆ Base

typedef DbHandleBase<_DataType> pool::DbHandleBase::Base
protectedinherited

Data type definition.

Definition at line 39 of file DbHandleBase.h.

Constructor & Destructor Documentation

◆ DbSession() [1/3]

pool::DbSession::DbSession ( )

Constructor.

◆ DbSession() [2/3]

pool::DbSession::DbSession ( const DbSession copy)

Copy constructor.

◆ DbSession() [3/3]

pool::DbSession::DbSession ( DbSessionObj session)

Object constructor.

◆ ~DbSession()

virtual pool::DbSession::~DbSession ( )
virtual

Standard destructor.

Member Function Documentation

◆ add()

DbStatus pool::DbSession::add ( DbDomainObj dom)

Add domain to session.

◆ close()

DbStatus pool::DbSession::close ( )

Close the session.

◆ db()

IOODatabase* pool::DbSession::db ( const DbType typ)

Allow access to the Database implementation.

◆ find()

DbDomainObj* pool::DbSession::find ( const DbType type)

Find domain object in session (by technology type)

◆ isValid()

bool pool::DbHandleBase::isValid
inlineinherited

Validity check (Objy like)

Definition at line 64 of file DbHandleBase.h.

64 { return 0 != m_ptr; }

◆ open()

DbStatus pool::DbSession::open ( )

Open the session in a given mode.

◆ operator!()

bool pool::DbHandleBase::operator!
inlineinherited

Validity check through operator NOT.

Definition at line 59 of file DbHandleBase.h.

59 { return !isValid(); }

◆ operator->() [1/2]

T* pool::DbHandleBase::operator->
inlineinherited

Dereference operator.

Definition at line 56 of file DbHandleBase.h.

56 { return m_ptr; }

◆ operator->() [2/2]

const T* pool::DbHandleBase::operator->
inlineinherited

Definition at line 57 of file DbHandleBase.h.

57 { return m_ptr; }

◆ operator=() [1/2]

DbSession& pool::DbSession::operator= ( const DbSession copy)
inline

Assignment operator

Definition at line 59 of file DbSession.h.

59  {
60  if ( &copy != this ) {
61  switchPtr(copy.m_ptr);
62  }
63  return *this;
64  }

◆ operator=() [2/2]

DbSession& pool::DbSession::operator= ( const int  )
inline

Assignment operator.

Definition at line 66 of file DbSession.h.

66  {
67  switchPtr(0);
68  return *this;
69  }

◆ ptr() [1/2]

T* pool::DbHandleBase::ptr
inlineinherited

Definition at line 62 of file DbHandleBase.h.

62 { return m_ptr; }

◆ ptr() [2/2]

const T* pool::DbHandleBase::ptr
inlineinherited

Access to underlying object.

Definition at line 61 of file DbHandleBase.h.

61 { return m_ptr; }

◆ refCount()

int pool::DbSession::refCount ( ) const

Access reference counter.

◆ remove()

DbStatus pool::DbSession::remove ( const DbDomainObj dom)

Find domain in session.

◆ setPtr()

void pool::DbHandleBase::setPtr ( T *  ptr)
inlineprotectedinherited

Set data pointer.

Definition at line 52 of file DbHandleBase.h.

52 { m_ptr=ptr; }

◆ setType()

void pool::DbHandleBase::setType ( const DbType typ)
inlineprotectedinherited

Set handle type.

Definition at line 50 of file DbHandleBase.h.

50 { m_type=typ; }

◆ switchPtr()

void pool::DbSession::switchPtr ( DbSessionObj obj)
private

Assign transient object properly (including reference counting)

◆ type()

const DbType& pool::DbHandleBase::type
inlineinherited

Inquire storage type of the handle.

Definition at line 66 of file DbHandleBase.h.

66 { return m_type; }

Friends And Related Function Documentation

◆ DbSessionObj

friend class DbSessionObj
friend

Friend declarations.

Definition at line 45 of file DbSession.h.

Member Data Documentation

◆ m_ptr

T* pool::DbHandleBase::m_ptr
protectedinherited

Data member: Object pointer. Sub-classes need access on re-assignment.

Definition at line 41 of file DbHandleBase.h.

◆ m_type

DbType pool::DbHandleBase::m_type
protectedinherited

Data member: Technology type. Sub-classes need access on re-assignment.

Definition at line 43 of file DbHandleBase.h.


The documentation for this class was generated from the following file:
pool::DbSession::switchPtr
void switchPtr(DbSessionObj *obj)
Assign transient object properly (including reference counting)
pool::DbHandleBase< DbSessionObj >::ptr
const T * ptr() const
Access to underlying object.
Definition: DbHandleBase.h:61
pool::DbHandleBase< DbSessionObj >::m_type
DbType m_type
Data member: Technology type. Sub-classes need access on re-assignment.
Definition: DbHandleBase.h:43
pool::DbHandleBase< DbSessionObj >::m_ptr
T * m_ptr
Data member: Object pointer. Sub-classes need access on re-assignment.
Definition: DbHandleBase.h:41
pool::DbHandleBase< DbSessionObj >::isValid
bool isValid() const
Validity check (Objy like)
Definition: DbHandleBase.h:64
calibdata.copy
bool copy
Definition: calibdata.py:27