|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef APR_IFILECATALOG_H
6 #define APR_IFILECATALOG_H
8 #include "GaudiUtils/IFileCatalog.h"
9 #include "GaudiUtils/IFileCatalogMgr.h"
10 #include "GaudiKernel/SmartIF.h"
13 #include "GaudiKernel/IMessageSvc.h"
19 namespace FileCatalog {
28 typedef Gaudi::IFileCatalogMgr::Catalogs
Catalogs;
67 void getFirstPFN(
const std::string& fid, std::string& pfn, std::string& tech )
const;
70 void lookupFileByPFN(
const std::string& pfn, std::string& fid, std::string& tech )
const;
73 bool existsPFN(
const std::string& pfn )
const {
return m_fc->existsPFN(pfn); }
76 std::string
lookupPFN(
const std::string& pfn )
const {
return m_fc->lookupPFN(pfn); }
95 void registerPFN(
const std::string& pfn,
const std::string& ftype, std::string& fid );
98 void renamePFN(
const std::string& pfn,
const std::string& newpfn ) {
m_fc->renamePFN(pfn, newpfn); }
101 void addReplicaPFN(
const std::string& pfn,
const std::string& replica_pfn );
105 const std::string& replica_pfn,
106 const std::string& replica_tech =
"ROOT_All" );
140 SmartIF<Gaudi::IFileCatalogMgr>
m_mgr;
141 SmartIF<Gaudi::IFileCatalog>
m_fc;
const std::string & connectInfo() const
Get the connect string.
void lookupFileByPFN(const std::string &pfn, std::string &fid, std::string &tech) const
Get FID and filetype for a given PFN.
Gaudi::IFileCatalog::Files Files
void registerPFN(const std::string &pfn, const std::string &ftype, std::string &fid)
Register PFN, assign new FID if not given.
void addReplicaFID(const std::string &fid, const std::string &replica_pfn, const std::string &replica_tech="ROOT_All")
adding replica to an existing FID
void deletePFN(const std::string &pfn)
Delete PFN from the catalog (delete entire FID entry if it was the last PFN)
SmartIF< Gaudi::IFileCatalogMgr > m_mgr
void renamePFN(const std::string &pfn, const std::string &newpfn)
Rename PFN.
void registerLFN(const std::string &fid, const std::string &lfn) const
Create a Node for a FileID and DOM Node of the LFN with all the attributes.
void commit()
Save catalog to file.
std::vector< std::string > Strings
void lookupFileByLFN(const std::string &lfn, std::string &fid) const
Return the status of a LFName.
void rollback()
Save catalog to file.
void getFIDs(Strings &fids) const
Get all FIDs.
std::string lookupPFN(const std::string &pfn) const
Lookup file identifier by physical file name.
const Catalogs & catalogs() const
Access catalog container (CONST)
Gaudi::IFileCatalogMgr::Catalogs Catalogs
SmartIF< Gaudi::IFileCatalog > m_fc
void start()
redirect to init() for Gaudi FC
Class to provide easy MsgStream access and capabilities.
void setWriteCatalog(const std::string &connect)
Access to the (first) writable file catalog.
std::string lookupLFN(const std::string &lfn) const
void addReplicaPFN(const std::string &pfn, const std::string &replica_pfn)
adding replica to an existing PFN
void removeCatalog(const std::string &connect)
Add new catalog identified by reference to the existing ones.
Gaudi::IFileCatalog::Strings Strings
void getPFNs(const std::string &fid, Files &files) const
Dump all PFNames of the catalog and their attributes associate to the FileID.
void getFirstPFN(const std::string &fid, std::string &pfn, std::string &tech) const
Get the first PFN + filetype for the given FID.
void addCatalog(const std::string &connect)
bool dirty() const
Check if the catalog should be updated.
bool existsPFN(const std::string &pfn) const
Return the status of a PFName.
Catalogs & catalogs()
Remove catalog identified by reference from the existing ones.
void init()
Parse the DOM tree of the XML catalog.
void deleteFID(const std::string &FileID)
Return the status of a FileID.
std::string createFID() const
Create file identifier using UUID mechanism.
bool readOnly() const
Check if the catalog is read-only.
void addReadCatalog(const std::string &connect)
Add new catalog identified by name to the existing ones.
void getLFNs(const std::string &fid, Files &files) const
Get all logical names for a given FID. Return pairs <LFN,FID>