ATLAS Offline Software
|
#include <src/DbDatabaseObj.h>
Public Types | |
typedef std::map< std::string, DbContainerObj * > | Keys |
typedef Keys::iterator | iterator |
typedef Keys::const_iterator | const_iterator |
Public Member Functions | |
DbDatabaseObj (DbDomain &dom, const std::string &pfn, const std::string &fid, DbAccessMode mode=pool::READ) | |
Standard constructor of a Database obejct. More... | |
virtual | ~DbDatabaseObj () |
Standard Destructor. More... | |
const std::string & | logon () const |
Access to the logon string. More... | |
long long int | size () |
Access the size of the database: May be undefined for some technologies. More... | |
IDbDatabase * | info () |
Access to technology dependent implementation. More... | |
const IDbDatabase * | info () const |
DbDomain & | domain () |
Access to domain handle (CONST) More... | |
const DbDomain & | domain () const |
int | age () const |
Access age value. More... | |
const Token * | token () const |
Access the token of the database object. More... | |
DbStatus | open () |
Open Database object. More... | |
DbStatus | reopen (DbAccessMode mode) |
Re-open database with changing access permissions. More... | |
DbStatus | close () |
Close database object. More... | |
DbStatus | retire () |
End database access, but still leave database accessible. More... | |
bool | updatesPending () const |
Check for pending updates. More... | |
DbStatus | transAct (Transaction::Action action) |
Execute Database Transaction action. More... | |
DbStatus | read (const Token &token, ShapeH shape, void **object) |
read an object referenced by the token More... | |
DbStatus | getLink (const Token::OID_t &oid, Token *pTok) |
Expand OID into a full Token, based on the Links table. More... | |
std::string | cntName (Token &token) |
Retrieve container name from link container (using token oid, rather than contID) More... | |
DbStatus | makeLink (Token *pToken, Token::OID_t &refLink) |
Add association link to link container. More... | |
const DbTypeInfo * | objectShape (const TypeH &classH) |
Retrieve persistent type information by class handle. More... | |
const DbTypeInfo * | objectShape (const Guid &nam) |
Retrieve persistent type information by shape identifier. More... | |
const DbTypeInfo * | contShape (const std::string &nam) |
Retrieve persistent type information by container. More... | |
DbStatus | addShape (const DbTypeInfo *pType) |
Add persistent type to the Database. More... | |
const Token * | cntToken (const std::string &cntName) |
Access local container token (if container exists) More... | |
DbStatus | containers (std::vector< const Token * > &conts, bool intern) |
Allow access to all known containers. More... | |
DbStatus | containers (std::vector< IDbContainer * > &conts, bool intern) |
DbStatus | associations (std::vector< const Token * > &conts) |
Allow access to all known associations between containers. More... | |
DbStatus | shapes (std::vector< const DbTypeInfo * > &shaps) |
Allow access to all known shapes used by the database. More... | |
int | nParam () |
Retrieve the number of user parameters. More... | |
DbStatus | addParam (const std::string &nam, const std::string &val) |
Add a persistent parameter to the file. More... | |
DbStatus | param (const std::string &nam, std::string &val) |
Retrieve existing parameter by name. More... | |
DbStatus | params (std::vector< std::pair< std::string, std::string > > &vals) |
Retrieve all parameters. More... | |
DbStatus | setOption (const DbOption &refOpt) |
Set options. More... | |
DbStatus | getOption (DbOption &refOpt) |
Access options. More... | |
void | setAge (int value) |
Update database age. 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 DbContainerObj * | find (const std::string &key) const |
Find object by key (CONST) More... | |
DbContainerObj * | find (const std::string &key) |
Find object by key. More... | |
DbStatus | add (const std::string &key, DbContainerObj *val) |
Add entry to container. More... | |
DbStatus | remove (const DbContainerObj *val) |
Remove entry from container. More... | |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
Private Types | |
typedef RootType | TypeH |
Reflection class identifier. More... | |
typedef std::pair< std::string, std::string > | Parameter |
Database parameter definition. More... | |
typedef std::vector< Parameter > | Parameters |
Database parameter container definition. More... | |
typedef std::vector< DbContainerObj > | Containers |
Collection of retired database containers. More... | |
typedef std::map< std::string, std::string > | ParamMap |
Parameter map definition. More... | |
typedef std::map< Guid, DbToken * > | LinkMap |
Definition of map with link elements. More... | |
typedef std::vector< DbToken * > | LinkVector |
Definition of array with link elements. More... | |
typedef std::map< Guid, const DbTypeInfo * > | ShapeMap |
Definition of map with shape elements. More... | |
typedef std::map< long long int, int > | IndexMap |
Definition of map with index elements. More... | |
typedef DbAccessObj< std::string, DbContainerObj > | Base |
Base class convenience typdef. More... | |
Private Member Functions | |
DbStatus | cleanup () |
Perform cleanup of internal data structures. More... | |
Private Attributes | |
DbDomain | m_dom |
Handle to domain. More... | |
DbContainer | m_links |
Handle to link container. More... | |
DbContainer | m_shapes |
Handle to shapes container. More... | |
DbContainer | m_params |
Handle to the parameter container. More... | |
IDbDatabase * | m_info |
Technology dependent implementation block. More... | |
LinkMap | m_linkMap |
Map containing all links. More... | |
LinkVector | m_linkVec |
Random access array containing all links. More... | |
IndexMap | m_indexMap |
Map containing all index. More... | |
ShapeMap | m_shapeMap |
Map containing all shapes. More... | |
ParamMap | m_paramMap |
Map with all cached file properties. More... | |
std::map< TypeH, const DbTypeInfo * > | m_classMap |
Map with all cached mappings between known reflection classes. More... | |
Containers | m_retiredConts |
Collection of retired database containers. More... | |
DbTypeInfo * | m_string_t |
Internal string representation type. More... | |
std::string | m_logon |
Physical Database login. More... | |
int | m_fileAge |
File age counter. More... | |
Token * | m_token |
Token describing the object. 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... | |
Description:
Implementation independent part of a Database object objects.
Definition at line 49 of file DbDatabaseObj.h.
|
private |
Base class convenience typdef.
Definition at line 70 of file DbDatabaseObj.h.
|
inherited |
Definition at line 53 of file DbAccessObj.h.
|
private |
Collection of retired database containers.
Definition at line 58 of file DbDatabaseObj.h.
|
private |
Definition of map with index elements.
Definition at line 68 of file DbDatabaseObj.h.
|
inherited |
Definition at line 52 of file DbAccessObj.h.
|
inherited |
Definition at line 51 of file DbAccessObj.h.
|
private |
Definition of map with link elements.
Definition at line 62 of file DbDatabaseObj.h.
|
private |
Definition of array with link elements.
Definition at line 64 of file DbDatabaseObj.h.
|
private |
Database parameter definition.
Definition at line 54 of file DbDatabaseObj.h.
|
private |
Database parameter container definition.
Definition at line 56 of file DbDatabaseObj.h.
|
private |
Parameter map definition.
Definition at line 60 of file DbDatabaseObj.h.
|
private |
Definition of map with shape elements.
Definition at line 66 of file DbDatabaseObj.h.
|
private |
Reflection class identifier.
Definition at line 52 of file DbDatabaseObj.h.
pool::DbDatabaseObj::DbDatabaseObj | ( | DbDomain & | dom, |
const std::string & | pfn, | ||
const std::string & | fid, | ||
DbAccessMode | mode = pool::READ |
||
) |
Standard constructor of a Database obejct.
|
virtual |
Standard Destructor.
|
inlineinherited |
Add a persistent parameter to the file.
|
inlineinherited |
DbStatus pool::DbDatabaseObj::addShape | ( | const DbTypeInfo * | pType | ) |
Add persistent type to the Database.
|
inline |
Allow access to all known associations between containers.
|
inlineinherited |
Definition at line 163 of file DbAccessObj.h.
|
inlineinherited |
Definition at line 164 of file DbAccessObj.h.
|
private |
Perform cleanup of internal data structures.
|
inlineinherited |
DbStatus pool::DbDatabaseObj::close | ( | ) |
Close database object.
std::string pool::DbDatabaseObj::cntName | ( | Token & | token | ) |
Retrieve container name from link container (using token oid, rather than contID)
Access local container token (if container exists)
Allow access to all known containers.
DbStatus pool::DbDatabaseObj::containers | ( | std::vector< IDbContainer * > & | conts, |
bool | intern | ||
) |
const DbTypeInfo* pool::DbDatabaseObj::contShape | ( | const std::string & | nam | ) |
Retrieve persistent type information by container.
|
inlineinherited |
Definition at line 87 of file DbAccessObj.h.
|
inlineinherited |
|
inline |
Definition at line 125 of file DbDatabaseObj.h.
|
inlineinherited |
Definition at line 165 of file DbAccessObj.h.
|
inlineinherited |
Definition at line 166 of file DbAccessObj.h.
|
inlineinherited |
|
inlineinherited |
Find object by key (CONST)
Definition at line 132 of file DbAccessObj.h.
DbStatus pool::DbDatabaseObj::getLink | ( | const Token::OID_t & | oid, |
Token * | pTok | ||
) |
Expand OID into a full Token, based on the Links table.
|
inline |
|
inline |
Definition at line 122 of file DbDatabaseObj.h.
|
inline |
DbStatus pool::DbDatabaseObj::makeLink | ( | Token * | pToken, |
Token::OID_t & | refLink | ||
) |
Add association link to link container.
|
inlineinherited |
|
inlineinherited |
int pool::DbDatabaseObj::nParam | ( | ) |
Retrieve the number of user parameters.
const DbTypeInfo* pool::DbDatabaseObj::objectShape | ( | const Guid & | nam | ) |
Retrieve persistent type information by shape identifier.
const DbTypeInfo* pool::DbDatabaseObj::objectShape | ( | const TypeH & | classH | ) |
Retrieve persistent type information by class handle.
DbStatus pool::DbDatabaseObj::open | ( | ) |
Open Database object.
Retrieve existing parameter by name.
DbStatus pool::DbDatabaseObj::params | ( | std::vector< std::pair< std::string, std::string > > & | vals | ) |
Retrieve all parameters.
read an object referenced by the token
|
inlineinherited |
|
inlineinherited |
Remove reference count.
Definition at line 103 of file DbAccessObj.h.
|
inlineinherited |
DbStatus pool::DbDatabaseObj::reopen | ( | DbAccessMode | mode | ) |
Re-open database with changing access permissions.
DbStatus pool::DbDatabaseObj::retire | ( | ) |
End database access, but still leave database accessible.
void pool::DbDatabaseObj::setAge | ( | int | value | ) |
Update database age.
|
inlineinherited |
|
inlineinherited |
DbStatus pool::DbDatabaseObj::shapes | ( | std::vector< const DbTypeInfo * > & | shaps | ) |
Allow access to all known shapes used by the database.
long long int pool::DbDatabaseObj::size | ( | ) |
Access the size of the database: May be undefined for some technologies.
DbStatus pool::DbDatabaseObj::transAct | ( | Transaction::Action | action | ) |
Execute Database Transaction action.
|
inlineinherited |
Definition at line 84 of file DbAccessObj.h.
bool pool::DbDatabaseObj::updatesPending | ( | ) | const |
Check for pending updates.
|
private |
Map with all cached mappings between known reflection classes.
Definition at line 93 of file DbDatabaseObj.h.
|
private |
Handle to domain.
Definition at line 73 of file DbDatabaseObj.h.
|
private |
File age counter.
Definition at line 101 of file DbDatabaseObj.h.
|
private |
Map containing all index.
Definition at line 87 of file DbDatabaseObj.h.
|
private |
Technology dependent implementation block.
Definition at line 81 of file DbDatabaseObj.h.
|
privateinherited |
Key entry buffer.
Definition at line 64 of file DbAccessObj.h.
|
private |
Map containing all links.
Definition at line 83 of file DbDatabaseObj.h.
|
private |
Handle to link container.
Definition at line 75 of file DbDatabaseObj.h.
|
private |
Random access array containing all links.
Definition at line 85 of file DbDatabaseObj.h.
|
private |
Physical Database login.
Definition at line 99 of file DbDatabaseObj.h.
|
privateinherited |
Access mode.
Definition at line 58 of file DbAccessObj.h.
|
privateinherited |
Name of the instance.
Definition at line 60 of file DbAccessObj.h.
|
private |
Map with all cached file properties.
Definition at line 91 of file DbDatabaseObj.h.
|
private |
Handle to the parameter container.
Definition at line 79 of file DbDatabaseObj.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.
|
private |
Collection of retired database containers.
Definition at line 95 of file DbDatabaseObj.h.
|
private |
Map containing all shapes.
Definition at line 89 of file DbDatabaseObj.h.
|
private |
Handle to shapes container.
Definition at line 77 of file DbDatabaseObj.h.
|
private |
Internal string representation type.
Definition at line 97 of file DbDatabaseObj.h.
|
private |
Token describing the object.
Definition at line 103 of file DbDatabaseObj.h.
|
privateinherited |
Database type.
Definition at line 62 of file DbAccessObj.h.