![]() |
ATLAS Offline Software
|
#include <src/DbContainerObj.h>
Public Types | |
| typedef DbAccessObj< DbObject *, DbObjectHolder > | Base |
| Type definitions. More... | |
| typedef std::map< DbObject *, DbObjectHolder * > | Keys |
| typedef Keys::iterator | iterator |
| typedef Keys::const_iterator | const_iterator |
Public Member Functions | |
| DbContainerObj (DbDatabase &dbH, const std::string &nam, const DbType &dbtyp, DbAccessMode mod) | |
| Standard constructor of a container object using the Database handle as a clustering hint. More... | |
| virtual | ~DbContainerObj () |
| Standard destructor. More... | |
| const IDbContainer * | info () const |
| Access to internals. More... | |
| IDbContainer * | info () |
| const DbTypeInfo * | objectShape (const Guid &nam) |
| Retrieve persistent type information by name. More... | |
| DbDatabase & | database () |
| Handle to Database (CONST) More... | |
| const Token * | token () const |
| Access the token of the container object. More... | |
| bool | isOpen () const |
| Flag if container was opened. More... | |
| bool | isReadOnly () const |
| Check if database is in read-only mode. More... | |
| void | cancelTransaction () |
| Cancel transaction flag. More... | |
| uint64_t | size () |
| Size of the Database container (=# of objects) More... | |
| DbStatus | open (const DbTypeInfo *typ) |
| Open the container. More... | |
| DbStatus | checkAccess () |
| Check if we can access the container. More... | |
| DbStatus | close () |
| Close the container. More... | |
| DbStatus | retire () |
| Retire the container. More... | |
| DbStatus | transAct (Transaction::Action) |
| Execute Database Transaction Action. More... | |
| DbStatus | setOption (const DbOption &opt) |
| Pass options to the implementation. More... | |
| DbStatus | getOption (DbOption &refOpt) |
| Access options. More... | |
| DbStatus | store (const void *object, DbContainer &cntH, ShapeH shape) |
| Store object in location. More... | |
| DbStatus | allocate (DbContainer &cntH, const void *object, ShapeH shape, Token::OID_t &oid) |
| In place allocation of object location. More... | |
| DbStatus | load (void **ptr, ShapeH shape, const Token::OID_t &linkH, Token::OID_t &oid, bool any_next) |
| Select object in the container identified by its handle. More... | |
| DbStatus | select (DbSelect &sel) |
| Perform selection. The statement belongs to the container afterwards. More... | |
| DbStatus | fetch (DbSelect &sel) |
| Fetch next object address of the selection to set token. More... | |
| const std::string & | name () const |
| Access the instance name. More... | |
| void | setName (const std::string &n) |
| Access the instance name. More... | |
| DbAccessMode | mode () const |
| Access mode. More... | |
| void | setMode (DbAccessMode m) |
| Set Access mode. More... | |
| const DbType & | type () const |
| const IOODatabase * | db () const |
| Allow access to the Database implementation. More... | |
| IOODatabase * | db () |
| int | refCount () const |
| Access reference counter. More... | |
| int | addRef () const |
| Add reference count. More... | |
| int | release () const |
| Remove reference count. More... | |
| DbStatus | clearEntries () |
| Object cleanup: remove all entries. More... | |
| const DbObjectHolder * | find (const DbObject * &key) const |
| Find object by key (CONST) More... | |
| DbObjectHolder * | find (const DbObject * &key) |
| Find object by key. More... | |
| DbStatus | add (const DbObject * &key, DbObjectHolder *val) |
| Add entry to container. More... | |
| DbStatus | remove (const DbObjectHolder *val) |
| Remove entry from container. More... | |
| iterator | begin () |
| const_iterator | begin () const |
| iterator | end () |
| const_iterator | end () const |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. More... | |
| MsgStream & | msg () const |
| The standard message stream. More... | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. More... | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. More... | |
Private Member Functions | |
| bool | hasAccess () |
| Check database access. More... | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. More... | |
Private Attributes | |
| IDbContainer * | m_info |
| Pointer to interface of the technology dependent part. More... | |
| const Token * | m_tokH |
| Container token. More... | |
| DbDatabase | m_dbH |
| Handle to hosting Database. More... | |
| bool | m_isOpen |
| Flag indication DbStatus of technology dependent container. More... | |
| std::atomic< int > | m_refCount |
| Reference counter. More... | |
| DbAccessMode | m_mode |
| Access mode. More... | |
| std::string | m_name |
| Name of the instance. More... | |
| DbType | m_type |
| Database type. More... | |
| Keys | m_keys |
| Key entry buffer. More... | |
| IOODatabase * | m_pool |
| Pointer to specific pool implementation. More... | |
| std::string | m_nm |
| Message source name. More... | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels) More... | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. More... | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. More... | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging) More... | |
Description:
Implementation independent part of a container object objects.
There is a ring of protection around the object. The object can only be accessed through its handle, the technology dependent code and the DbDatabaseObj object hosting the container. This should ensure proper reference counting and inhibit non existing references flying around.
Definition at line 50 of file DbContainerObj.h.
|
inherited |
Type definitions.
Definition at line 50 of file DbAccessObj.h.
|
inherited |
Definition at line 53 of file DbAccessObj.h.
|
inherited |
Definition at line 52 of file DbAccessObj.h.
|
inherited |
Definition at line 51 of file DbAccessObj.h.
| pool::DbContainerObj::DbContainerObj | ( | DbDatabase & | dbH, |
| const std::string & | nam, | ||
| const DbType & | dbtyp, | ||
| DbAccessMode | mod | ||
| ) |
Standard constructor of a container object using the Database handle as a clustering hint.
| dbH | [IN] Valid handle to database object |
| nam | [IN] Name of the container to be opened. |
| dbtyp | [IN] Database type (including minor type) |
| mod | [IN] Access mode. |
|
virtual |
Standard destructor.
|
inlineinherited |
|
inlineinherited |
| DbStatus pool::DbContainerObj::allocate | ( | DbContainer & | cntH, |
| const void * | object, | ||
| ShapeH | shape, | ||
| Token::OID_t & | oid | ||
| ) |
In place allocation of object location.
|
inlineinherited |
Definition at line 163 of file DbAccessObj.h.
|
inlineinherited |
Definition at line 164 of file DbAccessObj.h.
|
inline |
| DbStatus pool::DbContainerObj::checkAccess | ( | ) |
Check if we can access the container.
|
inlineinherited |
| DbStatus pool::DbContainerObj::close | ( | ) |
Close the container.
|
inline |
|
inlineinherited |
Definition at line 87 of file DbAccessObj.h.
|
inlineinherited |
|
inlineinherited |
Definition at line 165 of file DbAccessObj.h.
|
inlineinherited |
Definition at line 166 of file DbAccessObj.h.
Fetch next object address of the selection to set token.
|
inlineinherited |
|
inlineinherited |
Find object by key (CONST)
Definition at line 132 of file DbAccessObj.h.
|
private |
Check database access.
|
inline |
Definition at line 80 of file DbContainerObj.h.
|
inline |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
|
inline |
|
inline |
| DbStatus pool::DbContainerObj::load | ( | void ** | ptr, |
| ShapeH | shape, | ||
| const Token::OID_t & | linkH, | ||
| Token::OID_t & | oid, | ||
| bool | any_next | ||
| ) |
Select object in the container identified by its handle.
|
inlineinherited |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 163 of file AthMessaging.h.
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 178 of file AthMessaging.h.
|
inlineinherited |
Test the output level.
| lvl | The message level to test against |
| true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
|
inlineinherited |
| const DbTypeInfo* pool::DbContainerObj::objectShape | ( | const Guid & | nam | ) |
Retrieve persistent type information by name.
| DbStatus pool::DbContainerObj::open | ( | const DbTypeInfo * | typ | ) |
Open the container.
|
inlineinherited |
|
inlineinherited |
Remove reference count.
Definition at line 103 of file DbAccessObj.h.
|
inlineinherited |
| DbStatus pool::DbContainerObj::retire | ( | ) |
Retire the container.
Perform selection. The statement belongs to the container afterwards.
|
inherited |
Change the current logging level.
Use this rather than msg().setLevel() for proper operation with MT.
Definition at line 28 of file AthMessaging.cxx.
|
inlineinherited |
|
inlineinherited |
Pass options to the implementation.
| uint64_t pool::DbContainerObj::size | ( | ) |
Size of the Database container (=# of objects)
| DbStatus pool::DbContainerObj::store | ( | const void * | object, |
| DbContainer & | cntH, | ||
| ShapeH | shape | ||
| ) |
Store object in location.
| DbStatus pool::DbContainerObj::transAct | ( | Transaction::Action | ) |
Execute Database Transaction Action.
|
inlineinherited |
Definition at line 84 of file DbAccessObj.h.
|
mutableprivateinherited |
Messaging initialized (initMessaging)
Definition at line 141 of file AthMessaging.h.
|
private |
Handle to hosting Database.
Definition at line 57 of file DbContainerObj.h.
|
mutableprivateinherited |
MessageSvc pointer.
Definition at line 135 of file AthMessaging.h.
|
private |
Pointer to interface of the technology dependent part.
Definition at line 53 of file DbContainerObj.h.
|
private |
Flag indication DbStatus of technology dependent container.
Definition at line 59 of file DbContainerObj.h.
|
privateinherited |
Key entry buffer.
Definition at line 64 of file DbAccessObj.h.
|
mutableprivateinherited |
Current logging level.
Definition at line 138 of file AthMessaging.h.
|
privateinherited |
Access mode.
Definition at line 58 of file DbAccessObj.h.
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
|
privateinherited |
Name of the instance.
Definition at line 60 of file DbAccessObj.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
privateinherited |
Pointer to specific pool implementation.
Definition at line 66 of file DbAccessObj.h.
|
mutableprivateinherited |
Reference counter.
Definition at line 56 of file DbAccessObj.h.
Container token.
Definition at line 55 of file DbContainerObj.h.
|
privateinherited |
Database type.
Definition at line 62 of file DbAccessObj.h.
1.8.18