|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #ifndef POOL_DBDATABASEOBJ_H
16 #define POOL_DBDATABASEOBJ_H 1
54 typedef std::pair<std::string, std::string>
Parameter;
60 typedef std::map<std::string, std::string>
ParamMap;
62 typedef std::map< Guid , DbToken* >
LinkMap;
66 typedef std::map< Guid , const DbTypeInfo* >
ShapeMap;
68 typedef std::map< long long int , int >
IndexMap;
111 const std::string& pfn,
112 const std::string& fid,
186 #endif // POOL_DBDATABASEOBJ_H
DbStatus associations(std::vector< const Token * > &conts)
Allow access to all known associations between containers.
const DbTypeInfo * contShape(const std::string &nam)
Retrieve persistent type information by container.
DbStatus transAct(Transaction::Action action)
Execute Database Transaction action.
DbStatus read(const Token &token, ShapeH shape, void **object)
read an object referenced by the token
DbStatus addShape(const DbTypeInfo *pType)
Add persistent type to the Database.
DbStatus shapes(std::vector< const DbTypeInfo * > &shaps)
Allow access to all known shapes used by the database.
IDbDatabase * info()
Access to technology dependent implementation.
const Token * token() const
Access the token of the database object.
ShapeMap m_shapeMap
Map containing all shapes.
DbDomain m_dom
Handle to domain.
DbStatus getLink(const Token::OID_t &oid, Token *pTok)
Expand OID into a full Token, based on the Links table.
IndexMap m_indexMap
Map containing all index.
const std::string & logon() const
Access to the logon string.
DbStatus reopen(DbAccessMode mode)
Re-open database with changing access permissions.
void setAge(int value)
Update database age.
DbStatus param(const std::string &nam, std::string &val)
Retrieve existing parameter by name.
std::map< std::string, std::string > ParamMap
Parameter map definition.
DbStatus setOption(const DbOption &refOpt)
Set options.
Token * m_token
Token describing the object.
int age() const
Access age value.
This class provides a token that identifies in a unique way objects on the persistent storage.
DbStatus makeLink(Token *pToken, Token::OID_t &refLink)
Add association link to link container.
IDbDatabase * m_info
Technology dependent implementation block.
const DbTypeInfo * objectShape(const TypeH &classH)
Retrieve persistent type information by class handle.
const class Shape * ShapeH
DbStatus addParam(const std::string &nam, const std::string &val)
Add a persistent parameter to the file.
std::map< Guid, const DbTypeInfo * > ShapeMap
Definition of map with shape elements.
std::map< long long int, int > IndexMap
Definition of map with index elements.
DbTypeInfo * m_string_t
Internal string representation type.
DbContainer m_shapes
Handle to shapes container.
DbAccessMode mode() const
Access mode.
DbStatus containers(std::vector< const Token * > &conts, bool intern)
Allow access to all known containers.
LinkVector m_linkVec
Random access array containing all links.
std::string cntName(Token &token)
Retrieve container name from link container (using token oid, rather than contID)
DbContainer m_links
Handle to link container.
std::vector< Parameter > Parameters
Database parameter container definition.
DbStatus retire()
End database access, but still leave database accessible.
DbStatus open()
Open Database object.
int nParam()
Retrieve the number of user parameters.
DbDatabaseObj(DbDomain &dom, const std::string &pfn, const std::string &fid, DbAccessMode mode=pool::READ)
Standard constructor of a Database obejct.
DbStatus close()
Close database object.
DbContainer m_params
Handle to the parameter container.
std::vector< DbContainerObj > Containers
Collection of retired database containers.
const DbTypeInfo * objectShape(const Guid &nam)
Retrieve persistent type information by shape identifier.
DbStatus getOption(DbOption &refOpt)
Access options.
const IDbDatabase * info() const
RootType TypeH
Reflection class identifier.
DbAccessObj< std::string, DbContainerObj > Base
Base class convenience typdef.
LinkMap m_linkMap
Map containing all links.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
DbStatus containers(std::vector< IDbContainer * > &conts, bool intern)
DbStatus cleanup()
Perform cleanup of internal data structures.
int m_fileAge
File age counter.
std::map< Guid, DbToken * > LinkMap
Definition of map with link elements.
const DbDomain & domain() const
std::vector< DbToken * > LinkVector
Definition of array with link elements.
Containers m_retiredConts
Collection of retired database containers.
bool updatesPending() const
Check for pending updates.
std::map< TypeH, const DbTypeInfo * > m_classMap
Map with all cached mappings between known reflection classes.
ParamMap m_paramMap
Map with all cached file properties.
This file contains the class definition for the Guid class (migrated from POOL).
const Token * cntToken(const std::string &cntName)
Access local container token (if container exists)
long long int size()
Access the size of the database: May be undefined for some technologies.
virtual ~DbDatabaseObj()
Standard Destructor.
DbStatus params(std::vector< std::pair< std::string, std::string > > &vals)
Retrieve all parameters.
std::string m_logon
Physical Database login.
DbDomain & domain()
Access to domain handle (CONST)
std::pair< std::string, std::string > Parameter
Database parameter definition.