ATLAS Offline Software
IPoolSvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef POOLSVC_IPOOLSVC_H
6 #define POOLSVC_IPOOLSVC_H
7 
13 #include "GaudiKernel/IService.h"
16 #include "DataModelRoot/RootType.h"
17 
18 #include <string>
19 
20 // Forward declarations
21 namespace pool {
22  class IFileCatalog;
23 }
24 namespace coral {
25  class Context;
26 }
27 class Placement;
28 class StatusCode;
29 class Token;
30 
31 
35 class IPoolSvc : virtual public IService {
36 
37 public: // static members
40 
41 public: // 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
IPoolSvc::registerForWrite
virtual Token * registerForWrite(const Placement *placement, const void *obj, const RootType &classDesc)=0
IPoolSvc::getInputContextMap
virtual const std::map< std::string, unsigned int > & getInputContextMap() const =0
IPoolSvc::kOutputStream
@ kOutputStream
Definition: IPoolSvc.h:39
IPoolSvc::DeclareInterfaceID
DeclareInterfaceID(IPoolSvc, 1, 0)
Declare interface ID.
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
AddEmptyComponent.compName
compName
Definition: AddEmptyComponent.py:32
Placement
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition: Placement.h:19
IPoolSvc
This class provides the interface to the LCG POOL persistency software.
Definition: IPoolSvc.h:35
checkCorrelInHIST.conn
conn
Definition: checkCorrelInHIST.py:25
IPoolSvc::getToken
virtual Token * getToken(const std::string &connection, const std::string &collection, const unsigned long ientry) const =0
IPoolSvc::getAttribute
virtual StatusCode getAttribute(const std::string &optName, std::string &data, long tech, unsigned int contextId=IPoolSvc::kInputStream) const =0
Get POOL attributes - domain.
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
pool
pool namespace
Definition: libname.h:15
IPoolSvc::renamePfn
virtual void renamePfn(const std::string &pf, const std::string &newpf)=0
ITransaction.h
IPoolSvc::setFrontierCache
virtual StatusCode setFrontierCache(const std::string &conn)=0
Setup Frontier cache for given logical or physical connection name.
IPoolSvc::commitAndHold
virtual StatusCode commitAndHold(unsigned int contextId=IPoolSvc::kInputStream) const =0
Commit data for a given stream and hold buffer.
pool::ITransaction::Type
Type
Transaction type enumeration.
Definition: ITransaction.h:28
IPoolSvc::getOutputContext
virtual unsigned int getOutputContext(const std::string &label)=0
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
coral
Definition: ISecondaryEventSelector.h:19
IPoolSvc::kInputStream
@ kInputStream
Definition: IPoolSvc.h:39
IPoolSvc::setObjPtr
virtual void setObjPtr(void *&obj, const Token *token)=0
pool::IFileCatalog
Definition: IFileCatalog.h:23
IPoolSvc::commit
virtual StatusCode commit(unsigned int contextId=IPoolSvc::kInputStream) const =0
Commit data for a given stream and flush buffer.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PixelModuleFeMask_create_db.dbName
string dbName
Definition: PixelModuleFeMask_create_db.py:21
ICollection.h
IPoolSvc::lookupBestPfn
virtual void lookupBestPfn(const std::string &token, std::string &pfn, std::string &type) const =0
IPoolSvc::catalog
virtual const pool::IFileCatalog * catalog() const =0
IPoolSvc::setShareMode
virtual void setShareMode(bool shareCat)=0
python.output.AtlRunQueryRoot.pf
pf
Definition: AtlRunQueryRoot.py:988
IPoolSvc::disconnectDb
virtual StatusCode disconnectDb(const std::string &connection, unsigned int contextId=IPoolSvc::kInputStream) const =0
Disconnect single Database.
IPoolSvc::PoolStream
PoolStream
Stream to distinguish the POOL Stream instances.
Definition: IPoolSvc.h:39
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IPoolSvc::loadComponent
virtual void loadComponent(const std::string &compName)=0
RootType.h
IPoolSvc::context
virtual const coral::Context * context() const =0
IPoolSvc::getFileSize
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.
IPoolSvc::setAttribute
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.
IPoolSvc::getAttribute
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.
IPoolSvc::setAttribute
virtual StatusCode setAttribute(const std::string &optName, const std::string &data, long tech, unsigned int contextId=IPoolSvc::kOutputStream) const =0
Set POOL attributes - domain.
python.PyAthena.obj
obj
Definition: PyAthena.py:132
IPoolSvc::getInputContext
virtual unsigned int getInputContext(const std::string &label, unsigned int maxFile=0)=0
IPoolSvc::disconnect
virtual StatusCode disconnect(unsigned int contextId=IPoolSvc::kInputStream) const =0
Disconnect PersistencySvc associated with a stream.
pool::ICollection
Definition: ICollection.h:24
IPoolSvc::createCollection
virtual pool::ICollection * createCollection(const std::string &collectionType, const std::string &connection, const std::string &collectionName, unsigned int contextId=IPoolSvc::kInputStream) const =0
IPoolSvc::connect
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...
TScopeAdapter
Definition: RootType.h:119