ATLAS Offline Software
ICollectionService.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 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 #include <vector>
13 
14 
15 namespace pool {
16 
17  class ICollectionDescription;
18  class ISession;
19  class ICollectionCursor;
20  class IFileCatalog;
21 
33  {
34  public:
43  bool overwrite = false ) = 0;
44 
56  bool overwrite = false,
57  std::string logicalName = "" ) = 0;
58 
70  virtual bool registerExisting( const std::string& name,
71  const std::string& type,
72  std::string connection = "",
73  std::string logicalName = "" ) = 0;
74 
75 
84  virtual bool registerExisting( ICollection* collection,
85  bool overwrite = false,
86  std::string logicalName = "" ) = 0;
87 
88 
102  virtual ICollection* handle( const std::string& name,
103  const std::string& type,
104  std::string connection = "",
105  bool readOnly = true,
106  ISession* session = 0 ) const = 0;
107 
117  virtual ICollection* openWithPhysicalName( const std::string& physicalName,
119 
129  virtual ICollection* openWithLogicalName( const std::string& logicalName,
130  bool readOnly = true ) = 0;
131 
141  virtual ICollection* openWithGuid( const std::string& guid,
142  bool readOnly = true ) = 0;
143 
145  virtual bool setDefaultCatalog() = 0;
146 
152  virtual bool setWriteCatalog( const std::string& name ) = 0;
153 
159  virtual bool addReadCatalog( const std::string& name ) = 0;
160 
164  virtual IFileCatalog* getCatalog( ) = 0;
165 
170  virtual void setCatalog( IFileCatalog* collCat ) = 0;
171 
172  protected:
174  virtual ~ICollectionService() {}
175  };
176 
177 }
178 
179 #endif
180 
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::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
pool::ICollectionService::registerExisting
virtual bool registerExisting(ICollection *collection, bool overwrite=false, std::string logicalName="")=0
Registers an existing collection in a collection catalog managed by the collection service.
pool::ISession
Definition: ISession.h:31
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::registerExisting
virtual bool registerExisting(const std::string &name, const std::string &type, std::string connection="", std::string logicalName="")=0
Registers an existing collection in a collection catalog managed by the collection service,...
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:27
ICollection.h
pool::ICollectionService::~ICollectionService
virtual ~ICollectionService()
Empty destructor.
Definition: ICollectionService.h:174
pool_uuid.guid
guid
Definition: pool_uuid.py:112
pool::ICollectionService
Definition: ICollectionService.h:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
pool::ICollectionService::createAndRegister
virtual ICollection * createAndRegister(const ICollectionDescription &description, bool overwrite=false, std::string logicalName="")=0
Creates or overwrites a collection, given a description of its properties, and registers it in a coll...
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::ICollection::READ
@ READ
Definition: ICollection.h:27
pool::ICollectionService::handle
virtual ICollection * handle(const std::string &name, const std::string &type, 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,...
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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::ICollection
Definition: ICollection.h:24
pool::ICollectionDescription
Definition: ICollectionDescription.h:26
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