ATLAS Offline Software
CollectionService.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_COLLECTIONSERVICE_H
6 #define COLLECTIONBASE_COLLECTIONSERVICE_H
7 
10 
11 
12 namespace pool {
13 
14  class IFileCatalog;
15 
26  {
27  // DECLARE_SEAL_COMPONENT;
28 
29  public:
36 
37 
39  virtual ~CollectionService();
40 
49  bool overwrite = false );
50 
62  bool overwrite = false,
63  const std::string & logicalName = "" );
64 
65 
66  virtual ICollection* open( const std::string & name,
67  const std::string & type,
68  const std::string & connection = "",
69  bool readOnly = true) const
70  {
71  return handle(name, type, connection, readOnly, 0);
72  }
73 
74 
86  virtual bool registerExisting( const std::string & name,
87  const std::string & type,
88  const std::string & connection = "",
89  const std::string & logicalName = "" );
90 
91 
100  virtual bool registerExisting( ICollection* collection,
101  bool overwrite = false, const std::string & logicalName = "" );
102 
116  virtual ICollection* handle( const std::string & name,
117  const std::string & type,
118  const std::string & connection = "",
119  bool readOnly = true,
120  ISession* session = 0 ) const;
121 
131  virtual ICollection* openWithPhysicalName( const std::string& physicalName,
133 
143  virtual ICollection* openWithLogicalName( const std::string& logicalName,
144  bool readOnly = true );
145 
155  virtual ICollection* openWithGuid( const std::string& guid,
156  bool readOnly = true );
157 
159  virtual bool setDefaultCatalog();
160 
165  virtual void setCatalog( IFileCatalog* collCat );
166 
172  virtual bool setWriteCatalog( const std::string& name );
173 
179  virtual bool addReadCatalog( const std::string& name );
180 
185 
186  };
187 }
188 
189 #endif
190 
pool::CollectionService::handle
virtual ICollection * handle(const std::string &name, const std::string &type, const std::string &connection="", bool readOnly=true, ISession *session=0) const
Retrieves a handle to an existing collection or collection fragment for read or update transactions,...
pool::CollectionService::create
virtual ICollection * create(const ICollectionDescription &description, bool overwrite=false)
Creates or overwrites a collection or collection fragment, given a description of its properties.
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
pool
pool namespace
Definition: libname.h:15
pool::CollectionService::setWriteCatalog
virtual bool setWriteCatalog(const std::string &name)
Sets the name of the catalog in which to register new collections.
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
pool::ISession
Definition: ISession.h:32
pool::CollectionService::registerExisting
virtual bool registerExisting(ICollection *collection, bool overwrite=false, const std::string &logicalName="")
Registers an existing collection in a collection catalog managed by the collection service.
pool::IFileCatalog
Definition: IFileCatalog.h:23
pool::ICollection::OpenMode
OpenMode
Enumeration of the possible open modes of the collection.
Definition: ICollection.h:26
pool::CollectionService::createAndRegister
virtual ICollection * createAndRegister(const ICollectionDescription &description, bool overwrite=false, const std::string &logicalName="")
Creates or overwrites a collection, given a description of its properties, and registers it in a coll...
pool::CollectionService::registerExisting
virtual bool registerExisting(const std::string &name, const std::string &type, const std::string &connection="", const std::string &logicalName="")
Registers an existing collection in a collection catalog managed by the collection service,...
pool::CollectionService::setDefaultCatalog
virtual bool setDefaultCatalog()
Sets default values for the write and read collection catalogs.
pool_uuid.guid
guid
Definition: pool_uuid.py:112
pool::CollectionService::CollectionService
CollectionService()
Constructor:
pool::CollectionService::getCatalog
virtual IFileCatalog * getCatalog()
Returns the collection catalog used by the service.
pool::ICollectionService
Definition: ICollectionService.h:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
pool::CollectionService::addReadCatalog
virtual bool addReadCatalog(const std::string &name)
Adds a catalog to the list of catalogs in which to search for registered collections.
pool::CollectionService::openWithPhysicalName
virtual ICollection * openWithPhysicalName(const std::string &physicalName, pool::ICollection::OpenMode openMode=pool::ICollection::READ)
Retrieves a handle to an existing collection for read or update transactions, given the physical name...
pool::CollectionService::openWithLogicalName
virtual ICollection * openWithLogicalName(const std::string &logicalName, bool readOnly=true)
Retrieves a handle to an existing collection for read or update transactions, given the logical name ...
pool::ICollection::READ
@ READ
Definition: ICollection.h:26
pool::CollectionService::open
virtual ICollection * open(const std::string &name, const std::string &type, const std::string &connection="", bool readOnly=true) const
Definition: CollectionService.h:66
pool::CollectionService
Definition: CollectionService.h:26
pool::CollectionService::~CollectionService
virtual ~CollectionService()
Default destructor.
pool::CollectionService::setCatalog
virtual void setCatalog(IFileCatalog *collCat)
Forces the service to use externally provided file catalogs The catalogs are not deleted by the servi...
checker_macros.h
Define macros for attributes used to control the static checker.
ICollectionService.h
pool::ICollection
Definition: ICollection.h:23
pool::CollectionService::openWithGuid
virtual ICollection * openWithGuid(const std::string &guid, bool readOnly=true)
Retrieves a handle to an existing collection for read or update transactions, given the globally uniq...
pool::ICollectionDescription
Definition: ICollectionDescription.h:25
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88