ATLAS Offline Software
Public Member Functions | List of all members
pool::CollectionService Class Reference

#include <CollectionBase/CollectionService.h>

Inheritance diagram for pool::CollectionService:
Collaboration diagram for pool::CollectionService:

Public Member Functions

 CollectionService ()
 Constructor: More...
 
virtual ~CollectionService ()
 Default destructor. More...
 
virtual ICollectioncreate (const ICollectionDescription &description, bool overwrite=false)
 Creates or overwrites a collection or collection fragment, given a description of its properties. More...
 
virtual ICollectioncreateAndRegister (const ICollectionDescription &description, bool overwrite=false, std::string logicalName="")
 Creates or overwrites a collection, given a description of its properties, and registers it in a collection catalog managed by the collection service. More...
 
virtual ICollectionopen (const std::string &name, const std::string &type, std::string connection="", bool readOnly=true) const
 
virtual bool registerExisting (const std::string &name, const std::string &type, std::string connection="", std::string logicalName="")
 Registers an existing collection in a collection catalog managed by the collection service, given its name, storage technology type and database connection string. More...
 
virtual bool registerExisting (ICollection *collection, bool overwrite=false, std::string logicalName="")
 Registers an existing collection in a collection catalog managed by the collection service. More...
 
virtual ICollectionhandle (const std::string &name, const std::string &type, 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, given the collection or collection fragment's name, storage technology type and database connection string. More...
 
virtual ICollectionopenWithPhysicalName (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 used to register the collection in a collection catalog managed by the collection service. More...
 
virtual ICollectionopenWithLogicalName (const std::string &logicalName, bool readOnly=true)
 Retrieves a handle to an existing collection for read or update transactions, given the logical name used to register the collection in a collection catalog managed by the collection service. More...
 
virtual ICollectionopenWithGuid (const std::string &guid, bool readOnly=true)
 Retrieves a handle to an existing collection for read or update transactions, given the globally unique identifier used to register the collection in a collection catalog managed by the collection service. More...
 
virtual bool setDefaultCatalog ()
 Sets default values for the write and read collection catalogs. More...
 
virtual void setCatalog (IFileCatalog *collCat)
 Forces the service to use externally provided file catalogs The catalogs are not deleted by the service. More...
 
virtual bool setWriteCatalog (const std::string &name)
 Sets the name of the catalog in which to register new collections. More...
 
virtual bool addReadCatalog (const std::string &name)
 Adds a catalog to the list of catalogs in which to search for registered collections. More...
 
virtual IFileCataloggetCatalog ()
 Returns the collection catalog used by the service. More...
 

Detailed Description

A service for creating, accessing and managing an ensemble of collections of event references. In many cases, the individual unit managed by the service may simply consist of a collection fragment containing only a subset of the metadata of an existing collection. Note that a class that inherits from this interface must also inherit from the SEAL Service base class.

Definition at line 25 of file CollectionService.h.

Constructor & Destructor Documentation

◆ CollectionService()

pool::CollectionService::CollectionService ( )

Constructor:

Parameters
contextLocal context provided by the service.

◆ ~CollectionService()

virtual pool::CollectionService::~CollectionService ( )
virtual

Default destructor.

Member Function Documentation

◆ addReadCatalog()

virtual bool pool::CollectionService::addReadCatalog ( const std::string &  name)
virtual

Adds a catalog to the list of catalogs in which to search for registered collections.

Parameters
nameName of collection catalog to add to search list.

Implements pool::ICollectionService.

◆ create()

virtual ICollection* pool::CollectionService::create ( const ICollectionDescription description,
bool  overwrite = false 
)
virtual

Creates or overwrites a collection or collection fragment, given a description of its properties.

Parameters
descriptionSpecification of collection or collection fragment properties.
overwriteFlag to distinguish creation and overwrite open modes.

Implements pool::ICollectionService.

◆ createAndRegister()

virtual ICollection* pool::CollectionService::createAndRegister ( const ICollectionDescription description,
bool  overwrite = false,
std::string  logicalName = "" 
)
virtual

Creates or overwrites a collection, given a description of its properties, and registers it in a collection catalog managed by the collection service.

Throws an exception if the collection has been replicated, if an attempt is being made to overwrite an existing collection when the overwrite input argument has been set to "false" or if the object being registered is a collection fragment.

Parameters
descriptionSpecification of collection properties.
overwriteFlag to distinguish creation and overwrite open modes.

Implements pool::ICollectionService.

◆ getCatalog()

virtual IFileCatalog* pool::CollectionService::getCatalog ( )
virtual

Returns the collection catalog used by the service.

Implements pool::ICollectionService.

◆ handle()

virtual ICollection* pool::CollectionService::handle ( const std::string &  name,
const std::string &  type,
std::string  connection = "",
bool  readOnly = true,
ISession session = 0 
) const
virtual

Retrieves a handle to an existing collection or collection fragment for read or update transactions, given the collection or collection fragment's name, storage technology type and database connection string.

A reference to a POOL database session object must be provided as input for the case where the collection being accessed is of type "ImplicitCollection".

Parameters
nameName of collection or collection fragment.
typeStorage technology type of collection or collection fragment.
connectionConnection to database containing collection or collection fragment.
readOnlyFlag to distinguish read and update open modes.
sessionReference to database session (need only be set for implicit collections).

Implements pool::ICollectionService.

◆ open()

virtual ICollection* pool::CollectionService::open ( const std::string &  name,
const std::string &  type,
std::string  connection = "",
bool  readOnly = true 
) const
inlinevirtual

Definition at line 66 of file CollectionService.h.

70  {
71  return handle(name, type, connection, readOnly, 0);
72  }

◆ openWithGuid()

virtual ICollection* pool::CollectionService::openWithGuid ( const std::string &  guid,
bool  readOnly = true 
)
virtual

Retrieves a handle to an existing collection for read or update transactions, given the globally unique identifier used to register the collection in a collection catalog managed by the collection service.

Throws an exception if a collection with this GUID cannot be found in the catalog.

Parameters
guidGlobally unique identifier used to register collection in catalog.
readOnlyFlag to distinguish read and update open modes.

Implements pool::ICollectionService.

◆ openWithLogicalName()

virtual ICollection* pool::CollectionService::openWithLogicalName ( const std::string &  logicalName,
bool  readOnly = true 
)
virtual

Retrieves a handle to an existing collection for read or update transactions, given the logical name used to register the collection in a collection catalog managed by the collection service.

Throws an exception if a collection with this logical name cannot be found in the catalog.

Parameters
logicalNameLogical name used to register collection in catalog.
readOnlyFlag to distinguish read and update open modes.

Implements pool::ICollectionService.

◆ openWithPhysicalName()

virtual ICollection* pool::CollectionService::openWithPhysicalName ( const std::string &  physicalName,
pool::ICollection::OpenMode  openMode = pool::ICollection::READ 
)
virtual

Retrieves a handle to an existing collection for read or update transactions, given the physical name used to register the collection in a collection catalog managed by the collection service.

Throws an exception if a collection with this physical name cannot be found in the catalog.

Parameters
physicalNamePhysical name used to register collection in catalog.
readOnlyFlag to distinguish read and update open modes.

Implements pool::ICollectionService.

◆ registerExisting() [1/2]

virtual bool pool::CollectionService::registerExisting ( const std::string &  name,
const std::string &  type,
std::string  connection = "",
std::string  logicalName = "" 
)
virtual

Registers an existing collection in a collection catalog managed by the collection service, given its name, storage technology type and database connection string.

Throws an exception if the collection does not exist, if a collection has already been registered in the collection catalog with identical physical name or if the object being registered is a collection fragment.

Parameters
nameName of collection.
typeStorage technology type of collection.
connectionConnection to database containing collection.

Implements pool::ICollectionService.

◆ registerExisting() [2/2]

virtual bool pool::CollectionService::registerExisting ( ICollection collection,
bool  overwrite = false,
std::string  logicalName = "" 
)
virtual

Registers an existing collection in a collection catalog managed by the collection service.


Parameters
collectionThe collection to register
overwriteIf true attempt to overwrite catalog entry for the same collection name
logicalNameLogical name of the collection to store in the catalog

Implements pool::ICollectionService.

◆ setCatalog()

virtual void pool::CollectionService::setCatalog ( IFileCatalog collCat)
virtual

Forces the service to use externally provided file catalogs The catalogs are not deleted by the service.

Implements pool::ICollectionService.

◆ setDefaultCatalog()

virtual bool pool::CollectionService::setDefaultCatalog ( )
virtual

Sets default values for the write and read collection catalogs.

Implements pool::ICollectionService.

◆ setWriteCatalog()

virtual bool pool::CollectionService::setWriteCatalog ( const std::string &  name)
virtual

Sets the name of the catalog in which to register new collections.

Parameters
nameName of collection catalog for registering collections.

Implements pool::ICollectionService.


The documentation for this class was generated from the following file:
pool::CollectionService::handle
virtual ICollection * handle(const std::string &name, const std::string &type, 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,...
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78