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 const std::map<std::string, unsigned int>& getInputContextMap() const = 0;
69
71 virtual const coral::Context* context() const = 0;
72
75 virtual void loadComponent(const std::string& compName) = 0;
76
79 virtual void setShareMode(bool shareCat) = 0;
80
82 virtual const pool::IFileCatalog* catalog() const = 0;
83
88 virtual void lookupBestPfn(const std::string& token, std::string& pfn, std::string& type) const = 0;
89
93 virtual void renamePfn(const std::string& pf, const std::string& newpf) = 0;
94
100 virtual pool::ICollection* createCollection(const std::string& collectionType,
101 const std::string& connection,
102 const std::string& collectionName,
103 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
104
109 virtual Token* getToken(const std::string& connection,
110 const std::string& collection,
111 const unsigned long ientry) const = 0;
112
115 unsigned int contextId = IPoolSvc::kInputStream) = 0;
116
119 virtual StatusCode commit(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
120
123 virtual StatusCode commitAndHold(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
124
127 virtual StatusCode disconnect(unsigned int contextId = IPoolSvc::kInputStream) const = 0;
128
132 virtual StatusCode disconnectDb(const std::string& connection,
133 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
134
136 virtual long long int getFileSize(const std::string& dbName, long tech, unsigned int contextId) const = 0;
137
139 virtual StatusCode getAttribute(const std::string& optName,
140 std::string& data,
141 long tech,
142 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
143
145 virtual StatusCode getAttribute(const std::string& optName,
146 std::string& data,
147 long tech,
148 const std::string& dbName,
149 const std::string& contName = "",
150 unsigned int contextId = IPoolSvc::kInputStream) const = 0;
151
153 virtual StatusCode setAttribute(const std::string& optName,
154 const std::string& data,
155 long tech,
156 unsigned int contextId = IPoolSvc::kOutputStream) const = 0;
157
159 virtual StatusCode setAttribute(const std::string& optName,
160 const std::string& data,
161 long tech,
162 const std::string& dbName,
163 const std::string& contName = "",
164 unsigned int contextId = IPoolSvc::kOutputStream) const = 0;
165
167 virtual StatusCode setFrontierCache(const std::string& conn) = 0;
168};
169
170#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 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 const 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