|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef COLLECTIONBASE_COLLECTIONFACTORY_H
6 #define COLLECTIONBASE_COLLECTIONFACTORY_H
19 class ICollectionDescription;
21 class ICollectionCursor;
64 bool overwrite =
false,
65 std::string logicalName =
"",
83 std::string logicalName =
"",
99 std::string logicalName =
"",
128 bool readOnly =
true,
143 bool readOnly =
true,
153 bool readOnly )
const;
157 bool readOnly )
const;
161 bool readOnly )
const;
206 void extract(
const std::string& physicalName,
208 std::string& connection,
209 std::string&
name )
const;
virtual ~CollectionFactory()
Default destructor.
bool isUnique(const FileCatalog::FileID &guid, IFileCatalog &collectionCatalog) const
Indicates whether the GUID of a collection is unique in a collection catalog.
static CollectionFactory * get()
Retrieves the collection factory singleton.
virtual ICollection * create(const ICollectionDescription &description, ICollection::OpenMode openMode, ISession *session=0) const
Creates an instance of a collection or collection fragment, given its storage technology type.
void setWriteCatalog(const std::string &cat)
set write catalog (once it is set, it can only be changed by resetting)
void extract(const std::string &physicalName, std::string &type, std::string &connection, std::string &name) const
Extracts the collection storage technology type and database connection string and name from the phys...
IFileCatalog * getDefaultCatalog() const
get the default file catalog if there was no file catalog, new one will be created according to envir...
virtual ICollection * createAndRegister(const ICollectionDescription &description, IFileCatalog *collectionCatalog, bool overwrite=false, std::string logicalName="", ISession *session=0) const
Creates or overwrites a collection given a description of its properties, and registers it in a colle...
virtual ICollection * openWithGuid(const FileCatalog::FileID &guid, IFileCatalog *collectionCatalog, bool readOnly=true, ISession *session=0) const
Opens an existing collection for read or update transactions, given the globally unique identifier us...
virtual CollectionDescription descFromLogicalName(const std::string &logicalName, IFileCatalog *collectionCatalog, bool readOnly) const
virtual bool registerExisting(const ICollectionDescription &description, IFileCatalog *collectionCatalog, std::string logicalName="", ISession *session=0) const
Registers an existing collection in a collection catalog, given a specification of its properties.
virtual CollectionDescription descFromPhysicalName(const std::string &physicalName, IFileCatalog *collectionCatalog, bool readOnly) const
virtual ICollection * openWithPhysicalName(const std::string &physicalName, IFileCatalog *collectionCatalog, ICollection::OpenMode openMode=pool::ICollection::READ, ISession *session=0) const
Opens an existing collection for read or update transactions, given its physical name.
virtual bool registerExisting(ICollection *collection, bool overwrite, IFileCatalog *collectionCatalog, std::string logicalName="", ISession *session=0) const
Registers an existing collection in a collection catalog, but uses user-supplied exiting collection o...
ICollection * create_callPlugin(const ICollectionDescription &description, ICollection::OpenMode openMode, ISession *session=0) const
OpenMode
Enumeration of the possible open modes of the collection.
virtual CollectionDescription descFromGuid(const FileCatalog::FileID &guid, IFileCatalog *collectionCatalog, bool readOnly) const
virtual ICollection * openWithLogicalName(const std::string &logicalName, IFileCatalog *collectionCatalog, bool readOnly=true, ISession *session=0) const
Opens an existing collection for read or update transactions, given a logical name assigned to it in ...
static CollectionFactory s_instance
Collection factory singleton.
DbStatus DbObjectHandle< T >::makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
void setDefaultCatalog(pool::IFileCatalog *catalog)
set external file catalog (it will not be deleted) pass 0 to reset the existing file catalog
CollectionFactory()
Default constructor.
virtual void resolveDescription(CollectionDescription &description, bool readOnly=true) const
Define macros for attributes used to control the static checker.
static const std::string c_fileType
Definition of file catalog entry type for collections registered in catalog.
std::string description
glabal timer - how long have I taken so far?