![]() |
ATLAS Offline Software
|
Description: More...
#include <src/DbContainerObj.h>
Public Member Functions | |
| DbContainerObj (DbDatabase &dbH, const std::string &nam, const DbType &dbtyp, Io::IoFlag mod) | |
| Standard constructor of a container object using the Database handle as a clustering hint. | |
| virtual | ~DbContainerObj () |
| Standard destructor. | |
| const ITechContainer * | info () const |
| Access to internals. | |
| ITechContainer * | info () |
| const DbTypeInfo * | objectShape (const Guid &nam) |
| Retrieve persistent type information by name. | |
| DbDatabase & | database () |
| Handle to Database (CONST). | |
| const Token * | token () const |
| Access the token of the container object. | |
| bool | isOpen () const |
| Flag if container was opened. | |
| bool | isReadOnly () const |
| Check if database is in read-only mode. | |
| void | cancelTransaction () |
| Cancel transaction flag. | |
| uint64_t | size () |
| Size of the Database container (=# of objects). | |
| StatusCode | open (const DbTypeInfo *typ) |
| Open the container. | |
| StatusCode | checkAccess () |
| Check if we can access the container. | |
| StatusCode | close () |
| Close the container. | |
| StatusCode | retire () |
| Retire the container. | |
| StatusCode | transAct (Transaction::Action) |
| Execute Database Transaction Action. | |
| StatusCode | setOption (const DbOption &opt) |
| Pass options to the implementation. | |
| StatusCode | getOption (DbOption &refOpt) |
| Access options. | |
| StatusCode | store (const void *object, DbContainer &cntH, const DbTypeInfo *tinfo) |
| Store object in location. | |
| StatusCode | allocate (DbContainer &cntH, const void *object, const DbTypeInfo *tinfo, Token::OID_t &oid) |
| In place allocation of object location. | |
| StatusCode | load (void **ptr, const DbTypeInfo *tinfo, const Token::OID_t &linkH, Token::OID_t &oid, bool any_next) |
| Select object in the container identified by its handle. | |
| StatusCode | next (Token::OID_t &linkH) |
| Fetch next object address to set token. | |
| const std::string & | name () const |
| Access the instance name. | |
| void | setName (const std::string &n) |
| Access the instance name. | |
| Io::IoFlag | mode () const |
| Access mode. | |
| void | setMode (Io::IoFlag m) |
| Set Access mode. | |
| const DbType & | type () const |
| const ITechFactory * | techFactory () const |
| Allow access to the Database implementation. | |
| ITechFactory * | techFactory () |
| int | refCount () const |
| Access reference counter. | |
| int | addRef () const |
| Add reference count. | |
| int | release () const |
| Remove reference count. | |
| bool | msgLvl (const MSG::Level lvl) const |
| Test the output level. | |
| MsgStream & | msg () const |
| The standard message stream. | |
| MsgStream & | msg (const MSG::Level lvl) const |
| The standard message stream. | |
| void | setLevel (MSG::Level lvl) |
| Change the current logging level. | |
Private Member Functions | |
| bool | hasAccess () |
| Check database access. | |
| void | initMessaging () const |
| Initialize our message level and MessageSvc. | |
Private Attributes | |
| ITechContainer * | m_info |
| Pointer to interface of the technology dependent part. | |
| const Token * | m_tokH |
| Container token. | |
| DbDatabase | m_dbH |
| Handle to hosting Database. | |
| bool | m_isOpen |
| Flag indication StatusCode of technology dependent container. | |
| std::atomic< int > | m_refCount |
| Reference counter. | |
| Io::IoFlag | m_mode |
| Access mode. | |
| std::string | m_name |
| Name of the instance. | |
| DbType | m_type |
| Database type. | |
| ITechFactory * | m_factory |
| Pointer to specific pool implementation. | |
| std::string | m_nm |
| Message source name. | |
| boost::thread_specific_ptr< MsgStream > | m_msg_tls |
| MsgStream instance (a std::cout like with print-out levels). | |
| std::atomic< IMessageSvc * > | m_imsg { nullptr } |
| MessageSvc pointer. | |
| std::atomic< MSG::Level > | m_lvl { MSG::NIL } |
| Current logging level. | |
| std::atomic_flag m_initialized | ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
| Messaging initialized (initMessaging). | |
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 29 of file DbContainerObj.h.
| DbContainerObj::DbContainerObj | ( | DbDatabase & | dbH, |
| const std::string & | nam, | ||
| const DbType & | dbtyp, | ||
| Io::IoFlag | 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 |
Add reference count.
Definition at line 66 of file DbAccessObj.h.
| StatusCode DbContainerObj::allocate | ( | DbContainer & | cntH, |
| const void * | object, | ||
| const DbTypeInfo * | tinfo, | ||
| Token::OID_t & | oid ) |
In place allocation of object location.
|
inline |
| StatusCode DbContainerObj::checkAccess | ( | ) |
Check if we can access the container.
| StatusCode DbContainerObj::close | ( | ) |
Close the container.
|
inline |
| StatusCode DbContainerObj::getOption | ( | DbOption & | refOpt | ) |
Access options.
|
private |
Check database access.
|
inline |
Definition at line 59 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 |
Flag if container was opened.
Definition at line 67 of file DbContainerObj.h.
|
inline |
| StatusCode DbContainerObj::load | ( | void ** | ptr, |
| const DbTypeInfo * | tinfo, | ||
| 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 167 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 182 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 |
| StatusCode DbContainerObj::next | ( | Token::OID_t & | linkH | ) |
Fetch next object address to set token.
| const DbTypeInfo * DbContainerObj::objectShape | ( | const Guid & | nam | ) |
Retrieve persistent type information by name.
| StatusCode DbContainerObj::open | ( | const DbTypeInfo * | typ | ) |
Open the container.
|
inlineinherited |
|
inlineinherited |
Remove reference count.
Definition at line 78 of file DbAccessObj.h.
| StatusCode DbContainerObj::retire | ( | ) |
Retire the container.
|
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 |
| uint64_t DbContainerObj::size | ( | ) |
Size of the Database container (=# of objects).
| StatusCode DbContainerObj::store | ( | const void * | object, |
| DbContainer & | cntH, | ||
| const DbTypeInfo * | tinfo ) |
Store object in location.
|
inlineinherited |
Definition at line 62 of file DbAccessObj.h.
|
inlineinherited |
| StatusCode DbContainerObj::transAct | ( | Transaction::Action | ) |
Execute Database Transaction Action.
Definition at line 59 of file DbAccessObj.h.
|
mutableprivateinherited |
Messaging initialized (initMessaging).
Definition at line 141 of file AthMessaging.h.
|
private |
Handle to hosting Database.
Definition at line 36 of file DbContainerObj.h.
|
privateinherited |
Pointer to specific pool implementation.
Definition at line 41 of file DbAccessObj.h.
|
mutableprivateinherited |
|
private |
Pointer to interface of the technology dependent part.
Definition at line 32 of file DbContainerObj.h.
|
private |
Flag indication StatusCode of technology dependent container.
Definition at line 38 of file DbContainerObj.h.
|
mutableprivateinherited |
|
privateinherited |
Access mode.
Definition at line 35 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 37 of file DbAccessObj.h.
|
privateinherited |
Message source name.
Definition at line 129 of file AthMessaging.h.
|
mutableprivateinherited |
Reference counter.
Definition at line 33 of file DbAccessObj.h.
Container token.
Definition at line 34 of file DbContainerObj.h.
|
privateinherited |
Database type.
Definition at line 39 of file DbAccessObj.h.