|
ATLAS Offline Software
|
Go to the documentation of this file.
12 #ifndef POOL_DBDATABASE_H
13 #define POOL_DBDATABASE_H
43 typedef const class Shape *
ShapeH;
56 typedef std::pair<std::string, std::string>
Parameter;
73 if ( &
copy !=
this ) {
89 const std::string&
name()
const;
93 const std::string&
logon()
const;
122 const std::string& pfn,
123 const std::string& fid,
194 #endif // POOL_DBDatabase_H
DbStatus param(const std::string &nam, std::string &val)
Retrieve existing parameter by name.
DbStatus params(Parameters &vals)
Retrieve all parameters.
std::string cntName(Token &token)
Retrieve container name from link container (using token oid, rather than contID)
DbStatus addParam(const std::string &nam, const std::string &val)
Add a persistent parameter to the file.
const IDbDatabase * info() const
bool exist(DbDomain &domH, const std::string &nam) const
Check for existence of Database within domain.
const std::string & name() const
Access to db name (FID)
DbStatus shapes(std::vector< const DbTypeInfo * > &shaps)
Allow access to all known shapes used by the database.
DbStatus getLink(const Token::OID_t &oid, Token *pTok)
Expand OID into a full Token, based on the Links table.
DbStatus remove(const DbContainerObj *cnt)
Find domain in session.
DbStatus transAct(Transaction::Action action)
Commit/Rollback Database Transaction.
DbDatabase(const DbDatabase &cp)
Copy constructor.
IDbDatabase * info()
Let the implementation access the internals.
const DbTypeInfo * objectShape(const Guid &nam)
Retrieve persistent type information by name.
DbStatus setOption(const DbOption &refOpt)
Set options.
long long int size()
Access the size of the database: May be undefined for some technologies.
DbStatus open(DbDomain &domH, const std::string &pfn, const std::string &fid, DbAccessMode mode=pool::READ)
Open Database using given domain.
DbDatabase(const DbType &typ=POOL_StorageType)
Constructor with initializing arguments.
virtual ~DbDatabase()
Standard destructor.
const Token * cntToken(const std::string &cntName)
Access local container token (if container exists)
DbDatabase & operator=(const DbDatabase ©)
Assignment (copy) operator.
This class provides a token that identifies in a unique way objects on the persistent storage.
void switchPtr(DbDatabaseObj *obj)
Assign transient object properly (including reference counting)
const DbTypeInfo * objectShape(const RootType &typeH)
Retrieve persistent type information by class handle.
DbStatus associations(std::vector< const Token * > &assocs)
Allow access to all known associations between containers.
const DbTypeInfo * contShape(const std::string &nam)
Retrieve persistent type information by container.
DbStatus retire()
End database access, but still leave database accessible.
const class Shape * ShapeH
DbStatus add(const std::string &name, DbContainerObj *cnt)
Add domain to session.
bool isOpen() const
Check if the database was opened.
DbStatus reopen(DbAccessMode mode=pool::READ)
Re-open database with changing access permissions.
int age() const
Access age value.
void setName(const std::string &nam)
Set db name (FID) after opening in case opening happened by PFN.
const DbDomain & containedIn() const
Access to domain object.
DbType m_type
Data member: Technology type. Sub-classes need access on re-assignment.
const Token * token() const
Access the token of the database object.
std::pair< std::string, std::string > Parameter
Parameter definition.
DbContainerObj * find(const std::string &nam)
Select container object in Database.
DbStatus containers(std::vector< IDbContainer * > &conts, bool intern=false)
const DbContainerObj * find(const std::string &nam) const
Select container object in Database.
DbAccessMode openMode() const
Access to access mode member.
const IOODatabase * db() const
int refCount() const
Access reference counter.
DbStatus close()
Close Database.
DbStatus makeLink(Token *pToken, Token::OID_t &linkH)
Add association link to link container.
DbDatabase(DbDatabaseObj *obj)
Constructor.
DbStatus getOption(DbOption &refOpt)
Access options.
void setAge(int value)
Update database age.
DbStatus containers(std::vector< const Token * > &conts, bool intern=false)
Allow access to all known containers.
std::vector< Parameter > Parameters
Parameter container definition.
int nParam()
Retrieve the number of user parameters.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
DbStatus read(const Token &token, ShapeH shape, void **object)
read an object referenced by the token
DbStatus addShape(const DbTypeInfo *pShape)
Add persistent shape to the Database.
DbDatabase & operator=(const int)
Assignment operator to reset handle using 0.
IOODatabase * db()
Allow access to the Database implementation.
const std::string & logon() const
Access to db logon string.
This file contains the class definition for the Token class (migrated from POOL).