Go to the documentation of this file.
11 #ifndef GAUDIUTILS_MULTIFILECATALOG_H
12 #define GAUDIUTILS_MULTIFILECATALOG_H
40 template <
class A1,
class F>
44 result = ( i->*pmf )( arg1 );
45 if ( !result.
empty() )
break;
49 template <
class A1,
class F>
54 arg1.insert( arg1.end(), tmp.begin(), tmp.end() );
58 template <
class A2,
class A1,
class F>
59 void _collect(
const A2& arg2, A1& arg1, F f )
const {
63 arg1.insert( arg1.end(), tmp.begin(), tmp.end() );
70 using extends::extends;
92 bool dirty()
const override;
std::vector< std::string > CatalogNames
void registerFID(CSTR fid) const override
Create a FileID and DOM Node.
void commit() override
Save DOM catalog to file.
void getLFN(CSTR fid, Files &files) const override
Dump all logical file names of the catalog associate to the FileID.
void deletePFN(CSTR pfn) const override
remove a PFN
virtual std::string lookupPFN(const std::string &lfn) const =0
Lookup file identifier by physical file name.
Catalogs::iterator i_findCatalog(CSTR connect, bool must_be_writable)
Find catalog by connect string.
virtual void renamePFN(const std::string &pfn, const std::string &new_pfn) const =0
rename a PFN
void removeCatalog(CSTR connect) override
Remove catalog identified by name from the existing ones.
void setMetaData(CSTR fid, CSTR attr, CSTR val) const override
Insert/update metadata item.
StatusCode initialize() override
IService implementation
Gaudi::Property< CatalogNames > m_catalogNames
void getPFN(CSTR fid, Files &files) const override
Dump all physical file names of the catalog and their attributes associate to the FileID.
IFileCatalog * findCatalog(CSTR connect, bool must_be_writable) const override
Catalog management
std::string _find(A1 &arg1, F pmf) const
Catalogs m_catalogs
Container with references to known catalogs.
bool existsFID(CSTR fid) const override
Return the status of a FileID.
virtual std::string lookupLFN(const std::string &lfn) const =0
Lookup file identifier by physical file name.
void printError(CSTR msg, bool throw_exc=true) const
void renamePFN(CSTR pfn, CSTR newpfn) const override
rename a PFN
const std::string & name() const override
Retrieve name of the service
virtual void registerFID(const std::string &fid) const =0
Create a Node for a FileID and DOM Node.
virtual void dropMetaData(const std::string &fid) const =0
Drop all metadata of one FID.
void registerPFN(CSTR fid, CSTR pfn, CSTR ftype) const override
Create a FileID and DOM Node of the PFN with all the attributes.
bool readOnly() const override
Check if the catalog is read-only.
void setWriteCatalog(IFileCatalog *cat) override
Define the writable catalog identified by reference.
void getFID(Strings &fids) const override
Dump all file Identifiers.
std::string lookupPFN(CSTR pfn) const override
Lookup file identifier by physical file name.
StatusCode finalize() override
Finalize service object.
Base class used to extend a class implementing other interfaces.
void init() override
Parse the DOM tree of the XML catalog.
virtual void getLFN(const std::string &fid, Files &files) const =0
Dump all LFNames of the catalog associate to the FileID.
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
bool existsLFN(CSTR lfn) const override
Return the status of a logical file name.
Catalogs & catalogs() override
Access catalog container.
std::string getMetaDataItem(CSTR fid, CSTR name) const override
Access metadata item.
void _collect(A1 &arg1, F f) const
void dropMetaData(CSTR fid) const override
Drop all metadata of one FID.
const Catalogs & catalogs() const override
Access catalog container (CONST)
virtual void setMetaData(const std::string &fid, const std::string &name, const std::string &value) const =0
Insert/update metadata item.
virtual void getMetaData(const std::string &fid, Attributes &attr) const =0
Dump all MetaData of the catalog for a given file ID.
virtual void getPFN(const std::string &fid, Files &files) const =0
Dump all PFNames of the catalog and their attributes associate to the FileID.
std::vector< IFileCatalog * > Catalogs
void _collect(const A2 &arg2, A1 &arg1, F f) const
Gaudi::PluginService::Factory< IService *(const std::string &, ISvcLocator *)> Factory
CSTR connectInfo() const override
Access to connect string.
void getMetaData(CSTR fid, Attributes &attr) const override
Dump all MetaData of the catalog for a given file ID.
bool existsPFN(CSTR pfn) const override
Return the status of physical file name.
std::string lookupLFN(CSTR lfn) const override
Lookup file identifier by logical file name.
IFileCatalog * writeCatalog(CSTR fid="") const override
Access to the (first) writable file catalog.
void deleteFID(CSTR fid) const override
Delete FileID from the catalog.
bool dirty() const override
Check if the catalog should be updated.
virtual void getFID(Strings &fids) const =0
Dump all file Identifiers.
void registerLFN(CSTR fid, CSTR lfn) const override
Create a FileID and DOM Node of the LFN with all the attributes.
void rollback() override
Save DOM catalog to file.
virtual void deleteFID(const std::string &FileID) const =0
Delete FileID Node from the catalog.
IFileCatalog * getCatalog(CSTR fid, bool throw_if_not, bool writable=true, bool prt=true) const
Find catalog containing a given file identifier.
bool m_started
Flag to indicate if catalog is started.
virtual void deletePFN(const std::string &pfn) const =0
remove a PFN
void addCatalog(CSTR connect) override
Add new catalog identified by name to the existing ones.
void propHandler()
simple property handle to allow interactive modification of list of the file catalogs
void dropMetaData(CSTR fid, CSTR attr) const override
Drop specified metadata item.
Implementation of property with value of concrete type.
CatalogNames m_oldNames
BACKUP:: Container with catalog names.
std::string createFID() const override
Catalog interface
std::string lookupFID(CSTR lfn) const