ATLAS Offline Software
Loading...
Searching...
No Matches
DbStorageTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef STORAGESVC_DBSTORAGETOOL_H
6#define STORAGESVC_DBSTORAGETOOL_H
7
10
11class ITechFactory;
12class DbOption;
13
29{
30 private:
32 std::string m_name;
41
42 public:
44 explicit DbStorageTool(const std::string& type, const std::string& name, const IInterface* parent);
45
47 virtual ~DbStorageTool();
48
49 DbStorageTool (const DbStorageTool&) = delete;
51
53 virtual const std::string& name() const override final { return m_name; }
54
56
67 virtual StatusCode write( FileDescriptor& refDB,
68 const std::string& refCont,
69 int technology,
70 const void* object,
71 const RootType type,
72 Token*& refpTok) override final;
73
75
82 virtual StatusCode read( FileDescriptor& refDB,
83 const Token& persToken,
84 void** object) override final;
85
87
92 virtual std::string getContName(FileDescriptor& refDB,
93 Token& persToken) const override final;
94
96
107 virtual StatusCode getShape( FileDescriptor& refDB,
108 const Guid& objType,
109 const DbTypeInfo*& tinfo) override final;
110
112
117 virtual const DbTypeInfo* createShape( const Guid& typeID ) override final;
118
120
135 virtual StatusCode startSession(Io::IoFlag mode, int tech, int ageLimit = -1) override final;
136
138
145 virtual StatusCode endSession() override final
146 { return m_domH.close(); }
147
149
163 virtual StatusCode connect(Io::IoFlag mode, FileDescriptor& refDB) override final;
164
166
179 virtual StatusCode disconnect( FileDescriptor& refDB) override final;
180
182
188 virtual StatusCode openMode( FileDescriptor& refDB,
189 Io::IoFlag& mode ) override final;
190
191
193
205 virtual StatusCode endTransaction( FileDescriptor& refDB,
206 Transaction::Action typ) override final;
207
209
219 virtual StatusCode getDomainOption(DbOption& opt) override final
220 { return m_domH.getOption(opt); }
221
223
233 virtual StatusCode setDomainOption(const DbOption& opt) override final
234 { return m_domH.setOption(opt); }
235
236 private:
239
240};
241
242#endif
TTypeAdapter RootType
Definition RootType.h:211
Description:
Definition DbDomain.h:33
Description: Definition an option to be supplied to database objects.
Definition DbOption.h:22
virtual StatusCode getDomainOption(DbOption &opt) override final
Access options for a given database domain.
virtual StatusCode getShape(FileDescriptor &refDB, const Guid &objType, const DbTypeInfo *&tinfo) override final
Retrieve persistent tinfo from Storage manager.
virtual StatusCode openMode(FileDescriptor &refDB, Io::IoFlag &mode) override final
Query the access mode of a Database unit.
virtual StatusCode startSession(Io::IoFlag mode, int tech, int ageLimit=-1) override final
Start a new Database Session.
ITechFactory * m_techFactory
Loaded StorageSvc implementation type (for m_type).
DbStorageTool(const DbStorageTool &)=delete
virtual std::string getContName(FileDescriptor &refDB, Token &persToken) const override final
Get container name for object.
virtual StatusCode disconnect(FileDescriptor &refDB) override final
Disconnect from a logical Database unit.
virtual StatusCode connect(Io::IoFlag mode, FileDescriptor &refDB) override final
Connect to a logical Database unit.
virtual StatusCode setDomainOption(const DbOption &opt) override final
Set options for a given database domain.
virtual ~DbStorageTool()
Standard destructor.
virtual StatusCode endSession() override final
End the Database session.
virtual StatusCode endTransaction(FileDescriptor &refDB, Transaction::Action typ) override final
End/Finish an existing Transaction sequence.
ITechFactory * getTechFactory()
Access technology implementations.
virtual StatusCode write(FileDescriptor &refDB, const std::string &refCont, int technology, const void *object, const RootType type, Token *&refpTok) override final
Register object for write.
virtual StatusCode read(FileDescriptor &refDB, const Token &persToken, void **object) override final
Read a persistent object from the medium.
DbStorageTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor for a Gaudi component.
std::string m_name
Service Name.
virtual const std::string & name() const override final
Retrieve the name of this tool.
DbType m_type
Technology type.
int m_ageLimit
Property: AgeLimit indicating the maximal allowed age of files.
virtual const DbTypeInfo * createShape(const Guid &typeID) override final
Create a Shape representation based on a ShapeID.
DbStorageTool & operator=(const DbStorageTool &)=delete
DbDomain m_domH
Database domain handle.
Definition of class DbTypeInfo.
Definition DbTypeInfo.h:31
Keeps information about storage technology.
Definition DbType.h:15
Description:
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
The IStorageTool interface is able to handle user request for.
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:22