ATLAS Offline Software
ICollectionService.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 COLLECTIONBASE_ICOLLECTIONSERVICE_H
6 #define COLLECTIONBASE_ICOLLECTIONSERVICE_H
7 
10 
11 #include <string>
12 
13 
14 namespace pool {
15 
16  class ICollectionDescription;
17  class ISession;
18  class ICollectionCursor;
19  class IFileCatalog;
20 
32  {
33  public:
42  bool overwrite = false ) = 0;
43 
55  bool overwrite = false,
56  const std::string & logicalName = "" ) = 0;
57 
69  virtual bool registerExisting( const std::string & name,
70  const std::string & type,
71  const std::string & connection = "",
72  const std::string & logicalName = "" ) = 0;
73 
74 
83  virtual bool registerExisting( ICollection* collection,
84  bool overwrite = false,
85  const std::string & logicalName = "" ) = 0;
86 
87 
101  virtual ICollection* handle( const std::string& name,
102  const std::string& type,
103  const std::string & connection = "",
104  bool readOnly = true,
105  ISession* session = 0 ) const = 0;
106 
116  virtual ICollection* openWithPhysicalName( const std::string& physicalName,
118 
128  virtual ICollection* openWithLogicalName( const std::string& logicalName,
129  bool readOnly = true ) = 0;
130 
140  virtual ICollection* openWithGuid( const std::string& guid,
141  bool readOnly = true ) = 0;
142 
144  virtual bool setDefaultCatalog() = 0;
145 
151  virtual bool setWriteCatalog( const std::string& name ) = 0;
152 
158  virtual bool addReadCatalog( const std::string& name ) = 0;
159 
163  virtual IFileCatalog* getCatalog( ) = 0;
164 
169  virtual void setCatalog( IFileCatalog* collCat ) = 0;
170 
171  protected:
173  virtual ~ICollectionService() {}
174  };
175 
176 }
177 
178 #endif
179 
pool::ICollectionService::openWithPhysicalName
virtual ICollection * openWithPhysicalName(const std::string &physicalName, pool::ICollection::OpenMode openMode=pool::ICollection::READ)=0
Retrieves a handle to an existing collection for read or update transactions, given the physical name...
pool::ICollectionService::createAndRegister
virtual ICollection * createAndRegister(const ICollectionDescription &description, bool overwrite=false, const std::string &logicalName="")=0
Creates or overwrites a collection, given a description of its properties, and registers it in a coll...
pool::ICollectionService::openWithLogicalName
virtual ICollection * openWithLogicalName(const std::string &logicalName, bool readOnly=true)=0
Retrieves a handle to an existing collection for read or update transactions, given the logical name ...
pool
pool namespace
Definition: libname.h:15
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
pool::ISession
Definition: ISession.h:32
pool::ICollectionService::handle
virtual ICollection * handle(const std::string &name, const std::string &type, const std::string &connection="", bool readOnly=true, ISession *session=0) const =0
Retrieves a handle to an existing collection or collection fragment for read or update transactions,...
pool::ICollectionService::setWriteCatalog
virtual bool setWriteCatalog(const std::string &name)=0
Sets the name of the catalog in which to register new collections.
pool::ICollectionService::setDefaultCatalog
virtual bool setDefaultCatalog()=0
Sets default values for the write and read collection catalogs.
pool::ICollectionService::setCatalog
virtual void setCatalog(IFileCatalog *collCat)=0
Forces the service to use externally provided file catalogs The catalogs are not deleted by the servi...
pool::IFileCatalog
Definition: IFileCatalog.h:23
pool::ICollection::OpenMode
OpenMode
Enumeration of the possible open modes of the collection.
Definition: ICollection.h:26
ICollection.h
pool::ICollectionService::~ICollectionService
virtual ~ICollectionService()
Empty destructor.
Definition: ICollectionService.h:173
pool_uuid.guid
guid
Definition: pool_uuid.py:112
pool::ICollectionService
Definition: ICollectionService.h:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
pool::ICollectionService::getCatalog
virtual IFileCatalog * getCatalog()=0
Returns the collection catalog used by the service.
pool::ICollectionService::create
virtual ICollection * create(const ICollectionDescription &description, bool overwrite=false)=0
Creates or overwrites a collection or collection fragment, given a description of its properties.
pool::ICollectionService::registerExisting
virtual bool registerExisting(const std::string &name, const std::string &type, const std::string &connection="", const std::string &logicalName="")=0
Registers an existing collection in a collection catalog managed by the collection service,...
pool::ICollection::READ
@ READ
Definition: ICollection.h:26
pool::ATLAS_NOT_THREAD_SAFE
DbStatus DbObjectHandle< T >::makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
Definition: DbObject.h:220
pool::ICollectionService::openWithGuid
virtual ICollection * openWithGuid(const std::string &guid, bool readOnly=true)=0
Retrieves a handle to an existing collection for read or update transactions, given the globally uniq...
checker_macros.h
Define macros for attributes used to control the static checker.
pool::ICollectionService::registerExisting
virtual bool registerExisting(ICollection *collection, bool overwrite=false, const std::string &logicalName="")=0
Registers an existing collection in a collection catalog managed by the collection service.
pool::ICollection
Definition: ICollection.h:23
pool::ICollectionDescription
Definition: ICollectionDescription.h:25
pool::ICollectionService::addReadCatalog
virtual bool addReadCatalog(const std::string &name)=0
Adds a catalog to the list of catalogs in which to search for registered collections.
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88