ATLAS Offline Software
Loading...
Searching...
No Matches
IPoolSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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"
17
18#include <string>
19
20// Forward declarations
21namespace pool {
22 class IFileCatalog;
23}
24namespace coral {
25 class Context;
26}
27class Placement;
28class StatusCode;
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 const coral::Context* context() const = 0;
75
78 virtual void loadComponent(const std::string& compName) = 0;
79
82 virtual void setShareMode(bool shareCat) = 0;
83
85 virtual const pool::IFileCatalog* catalog() const = 0;
86
91 virtual void lookupBestPfn(const std::string& token, std::string& pfn, std::string& type) const = 0;
92
96 virtual void renamePfn(const std::string& pf, const std::string& newpf) = 0;
97
103 virtual pool::ICollection* createCollection(const std::string& collectionType,
104 const std::string& connection,
105 const std::string& collectionName,
106 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
107
112 virtual Token* getToken(const std::string& connection,
113 const std::string& collection,
114 const unsigned long ientry) const = 0;
115
118 unsigned int contextId = IPoolSvc::kInputStream) = 0;
119
122 virtual StatusCode commit(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
123
126 virtual StatusCode commitAndHold(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
127
130 virtual StatusCode disconnect(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
131
135 virtual StatusCode disconnectDb(const std::string& connection,
136 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
137
139 virtual long long int getFileSize(const std::string& dbName, long tech, unsigned int contextId) const = 0;
140
142 virtual StatusCode getAttribute(const std::string& optName,
143 std::string& data,
144 long tech,
145 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
146
148 virtual StatusCode getAttribute(const std::string& optName,
149 std::string& data,
150 long tech,
151 const std::string& dbName,
152 const std::string& contName = "",
153 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
154
156 virtual StatusCode setAttribute(const std::string& optName,
157 const std::string& data,
158 long tech,
159 unsigned int contextId = IPoolSvc::kOutputStream) const = 0;
160
162 virtual StatusCode setAttribute(const std::string& optName,
163 const std::string& data,
164 long tech,
165 const std::string& dbName,
166 const std::string& contName = "",
167 unsigned int contextId = IPoolSvc::kOutputStream) const = 0;
168
170 virtual StatusCode setFrontierCache(const std::string& conn) = 0;
171};
172
173#endif
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
TTypeAdapter RootType
Definition RootType.h:211
This class provides the interface to the LCG POOL 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 void lookupBestPfn(const std::string &token, std::string &pfn, std::string &type) const =0
DeclareInterfaceID(IPoolSvc, 1, 0)
Declare interface ID.
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 const coral::Context * context() const =0
PoolStream
Stream to distinguish the POOL Stream instances.
Definition IPoolSvc.h:39
@ kOutputStream
Definition IPoolSvc.h:39
@ kInputStream
Definition IPoolSvc.h:39
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 StatusCode setFrontierCache(const std::string &conn)=0
Setup Frontier cache for given logical or physical connection name.
virtual std::map< std::string, unsigned int > getInputContextMap() const =0
virtual StatusCode connect(pool::ITransaction::Type type, unsigned int contextId=IPoolSvc::kInputStream)=0
Connect to a logical database unit; PersistencySvc is chosen according to transaction type (accessmod...
virtual Token * getToken(const std::string &connection, const std::string &collection, const unsigned long ientry) const =0
virtual pool::ICollection * createCollection(const std::string &collectionType, const std::string &connection, const std::string &collectionName, unsigned int contextId=IPoolSvc::kInputStream) const =0
virtual void loadComponent(const std::string &compName)=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 const pool::IFileCatalog * catalog() const =0
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 long long int getFileSize(const std::string &dbName, long tech, unsigned int contextId) const =0
Get POOL FileSize attribute for database without logging a message.
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:19
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
An interface to a storage technology specific collection of event references and attributes.
Definition ICollection.h:23
Type
Transaction type enumeration.
std::string label(const std::string &format, int i)
Definition label.h:19
pool namespace
Definition libname.h:15