ATLAS Offline Software
Loading...
Searching...
No Matches
IPoolSvc.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 POOLSVC_IPOOLSVC_H
6#define POOLSVC_IPOOLSVC_H
7
12
13#include "GaudiKernel/IService.h"
14#include "GaudiKernel/IFileMgr.h"
15
17
18#include <string>
19
20namespace coral {
21 class Context;
22}
23namespace pool {
24 class DbType;
25 class ISession;
26}
27
28class Placement;
29class Token;
30
31
35class IPoolSvc : virtual public IService {
36
37public: // static members
40
41public: // Non-static members
44
49 virtual Token* registerForWrite(const Placement* placement,
50 const void* obj,
51 const RootType& classDesc) = 0;
52
56 virtual void setObjPtr(void*& obj, const Token* token) = 0;
57
60 virtual unsigned int getOutputContext(const std::string& label) = 0;
61
65 virtual unsigned int getInputContext(const std::string& label, unsigned int maxFile = 0) = 0;
66
68 virtual std::map<std::string, unsigned int> getInputContextMap() const = 0;
69
71 virtual unsigned int getInputContextMapSize() const = 0;
72
74 virtual pool::ISession* getInputContextSession(unsigned int contextId) const = 0;
75
78 virtual void setShareMode(bool shareCat) = 0;
79
81 virtual void startCatalog() = 0;
82
84 virtual void commitCatalog() = 0;
85
90 virtual void lookupBestPfn(const std::string& token, std::string& pfn, std::string& type) const = 0;
91
95 virtual void renamePfn(const std::string& pf, const std::string& newpf) = 0;
96
102 virtual StatusCode connectCollection(const std::string& connection,
103 const std::string& collectionName,
104 const pool::DbType& collectionType,
105 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
106
111 virtual
112 StatusCode checkCollection(const std::string& connection,
113 unsigned int contextId,
114 bool noContainer) const = 0;
115
120 virtual Token* getToken(const std::string& connection,
121 const std::string& collection,
122 const unsigned long ientry) const = 0;
123
125 virtual StatusCode connect(Io::IoFlag type,
126 unsigned int contextId = IPoolSvc::kInputStream) = 0;
127
130 virtual StatusCode commit(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
131
134 virtual StatusCode commitAndHold(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
135
138 virtual StatusCode disconnect(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
139
143 virtual StatusCode disconnectDb(const std::string& connection,
144 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
145
147 virtual StatusCode getAttribute(const std::string& optName,
148 std::string& data,
149 long tech,
150 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
151
153 virtual StatusCode getAttribute(const std::string& optName,
154 std::string& data,
155 long tech,
156 const std::string& dbName,
157 const std::string& contName = "",
158 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
159
161 virtual StatusCode setAttribute(const std::string& optName,
162 const std::string& data,
163 long tech,
164 unsigned int contextId = IPoolSvc::kOutputStream) const = 0;
165
167 virtual StatusCode setAttribute(const std::string& optName,
168 const std::string& data,
169 long tech,
170 const std::string& dbName,
171 const std::string& contName = "",
172 unsigned int contextId = IPoolSvc::kOutputStream) const = 0;
173
174};
175
176#endif
TTypeAdapter RootType
Definition RootType.h:211
This class provides the interface to the APR persistency software.
Definition IPoolSvc.h:35
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const =0
Disconnect PersistencySvc associated with a stream.
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0)=0
virtual StatusCode connect(Io::IoFlag type, unsigned int contextId=IPoolSvc::kInputStream)=0
Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmod...
virtual void lookupBestPfn(const std::string &token, std::string &pfn, std::string &type) const =0
DeclareInterfaceID(IPoolSvc, 1, 0)
Declare interface ID.
virtual pool::ISession * getInputContextSession(unsigned int contextId) const =0
virtual unsigned int getInputContextMapSize() const =0
virtual StatusCode setAttribute(const std::string &optName, const std::string &data, long tech, const std::string &dbName, const std::string &contName="", unsigned int contextId=IPoolSvc::kOutputStream) const =0
Set POOL attributes - db/file, container/collection.
virtual void commitCatalog()=0
PoolStream
Stream to distinguish the POOL Stream instances.
Definition IPoolSvc.h:39
@ kOutputStream
Definition IPoolSvc.h:39
@ kInputStream
Definition IPoolSvc.h:39
virtual StatusCode checkCollection(const std::string &connection, unsigned int contextId, bool noContainer) const =0
virtual Token * registerForWrite(const Placement *placement, const void *obj, const RootType &classDesc)=0
virtual StatusCode getAttribute(const std::string &optName, std::string &data, long tech, const std::string &dbName, const std::string &contName="", unsigned int contextId=IPoolSvc::kInputStream) const =0
Get POOL attributes - db/file, container/collection.
virtual void renamePfn(const std::string &pf, const std::string &newpf)=0
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const =0
Disconnect single Database.
virtual std::map< std::string, unsigned int > getInputContextMap() const =0
virtual void startCatalog()=0
virtual Token * getToken(const std::string &connection, const std::string &collection, const unsigned long ientry) const =0
virtual StatusCode connectCollection(const std::string &connection, const std::string &collectionName, const pool::DbType &collectionType, unsigned int contextId=IPoolSvc::kInputStream) const =0
virtual StatusCode getAttribute(const std::string &optName, std::string &data, long tech, unsigned int contextId=IPoolSvc::kInputStream) const =0
Get POOL attributes - domain.
virtual unsigned int getOutputContext(const std::string &label)=0
virtual StatusCode setAttribute(const std::string &optName, const std::string &data, long tech, unsigned int contextId=IPoolSvc::kOutputStream) const =0
Set POOL attributes - domain.
virtual StatusCode commitAndHold(unsigned int contextId=IPoolSvc::kInputStream) const =0
Commit data for a given stream and hold buffer.
virtual void setObjPtr(void *&obj, const Token *token)=0
virtual StatusCode commit(unsigned int contextId=IPoolSvc::kInputStream) const =0
Commit data for a given stream and flush buffer.
virtual void setShareMode(bool shareCat)=0
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition Placement.h:20
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:22
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
Definition ISession.h:37
std::string label(const std::string &format, int i)
Definition label.h:19
Framework include files.
Definition libname.h:15