The Gaudi Framework
master (594c33fa)
|
#include </builds/gaudi/Gaudi/GaudiUtils/src/component/XMLFileCatalog.h>
Public Member Functions | |
XMLFileCatalog (CSTR url, IMessageSvc *m) | |
Create a catalog file, initialization of XercesC. More... | |
std::string | createFID () const override |
Catalog interface More... | |
CSTR | connectInfo () const override |
Access to connect string. More... | |
void | init () override |
Parse the DOM tree of the XML catalog. More... | |
void | commit () override |
Save DOM catalog to file. More... | |
void | rollback () override |
Save DOM catalog to file. More... | |
bool | readOnly () const override |
Check if the catalog is read-only. More... | |
bool | dirty () const override |
Check if the catalog should be updated. More... | |
bool | existsPFN (CSTR pfn) const override |
Return the status of a physical file name. More... | |
std::string | lookupPFN (CSTR fid) const override |
Lookup file identifier by physical file name. More... | |
bool | existsLFN (CSTR lfn) const override |
Return the status of a logical file name. More... | |
std::string | lookupLFN (CSTR lfn) const override |
Lookup file identifier by logical file name. More... | |
bool | existsFID (CSTR fid) const override |
Return the status of a FileID. More... | |
void | getPFN (CSTR fid, Files &files) const override |
Dump all physical file names of the catalog and their attributes associate to the FileID. More... | |
void | getLFN (CSTR fid, Files &files) const override |
Dump all logical file names of the catalog associate to the FileID. More... | |
void | getFID (Strings &fids) const override |
Dump all file Identifiers. More... | |
void | deleteFID (CSTR FileID) const override |
Delete FileID Node from the catalog. More... | |
void | registerPFN (CSTR fid, CSTR pfn, CSTR ftype) const override |
Create a FileID and Node of the physical file name with all the attributes. More... | |
void | registerLFN (CSTR fid, CSTR lfn) const override |
Create a FileID and Node of the logical file name with all the attributes. More... | |
void | registerFID (CSTR fid) const override |
Create a FileID and Node. More... | |
void | renamePFN (CSTR pfn, CSTR new_pfn) const override |
rename a PFN More... | |
void | deletePFN (CSTR pfn) const override |
remove a PFN More... | |
void | getMetaData (CSTR fid, Attributes &attr) const override |
Dump all MetaData of the catalog for a given file ID. More... | |
std::string | getMetaDataItem (CSTR fid, CSTR name) const override |
Access metadata item. More... | |
void | setMetaData (CSTR fid, CSTR name, CSTR value) const override |
Insert/update metadata item. More... | |
void | dropMetaData (CSTR fid) const override |
Drop all metadata of one FID. More... | |
void | dropMetaData (CSTR fid, CSTR attr) const override |
Drop specified metadata item. More... | |
Public Member Functions inherited from implements< IFileCatalog > | |
void * | i_cast (const InterfaceID &tid) const override |
Implementation of IInterface::i_cast. More... | |
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override |
Implementation of IInterface::queryInterface. More... | |
std::vector< std::string > | getInterfaceNames () const override |
Implementation of IInterface::getInterfaceNames. More... | |
implements ()=default | |
Default constructor. More... | |
implements (const implements &) | |
Copy constructor (zero the reference count) More... | |
implements & | operator= (const implements &) |
Assignment operator (do not touch the reference count). More... | |
unsigned long | addRef () override |
Reference Interface instance More... | |
unsigned long | release () override |
Release Interface instance More... | |
unsigned long | refCount () const override |
Current reference count More... | |
Protected Types | |
typedef const std::string & | CSTR |
Private Member Functions | |
xercesc::DOMDocument * | getDoc (bool throw_if_no_exists=true) const |
std::string | getfile (bool create) |
void | printError (CSTR msg, bool throw_exc=true) const |
std::string | lookupFID (CSTR lfn) const |
xercesc::DOMNode * | element (CSTR fid, bool print_err=true) const |
xercesc::DOMNode * | child (xercesc::DOMNode *par, CSTR tag, CSTR attr="", CSTR val="") const |
std::pair< xercesc::DOMElement *, xercesc::DOMElement * > | i_registerFID (CSTR fid) const |
Private Attributes | |
bool | m_rdOnly = false |
bool | m_update = false |
xercesc::DOMDocument * | m_doc = nullptr |
std::unique_ptr< xercesc::XercesDOMParser > | m_parser |
std::unique_ptr< xercesc::ErrorHandler > | m_errHdlr |
std::string | m_file |
IMessageSvc * | m_msgSvc |
Additional Inherited Members | |
Public Types inherited from implements< IFileCatalog > | |
using | base_class = implements< Interfaces... > |
Typedef to this class. More... | |
using | extend_interfaces_base = extend_interfaces< Interfaces... > |
Typedef to the base of this class. More... | |
using | iids = typename extend_interfaces_base::ext_iids |
Public Types inherited from extend_interfaces< Interfaces... > | |
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids... >::type |
take union of the ext_iids of all Interfaces... More... | |
Protected Attributes inherited from implements< IFileCatalog > | |
std::atomic_ulong | m_refCount |
Reference counter More... | |
This class constitutes the core of the XML based FileCatalog API for POOL. It uses the DOM model and the external XercesC library for parsing.
Definition at line 37 of file XMLFileCatalog.h.
|
protected |
Definition at line 39 of file XMLFileCatalog.h.
XMLFileCatalog::XMLFileCatalog | ( | CSTR | url, |
IMessageSvc * | m | ||
) |
Create a catalog file, initialization of XercesC.
Definition at line 189 of file XMLFileCatalog.cpp.
|
override |
Save DOM catalog to file.
Definition at line 447 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
override |
Catalog interface
Create file identifier using UUID mechanism.
Create file identifier using UUID mechanism
Definition at line 192 of file XMLFileCatalog.cpp.
|
override |
|
override |
|
inlineoverride |
|
inlineoverride |
Drop specified metadata item.
Definition at line 301 of file XMLFileCatalog.cpp.
|
private |
Definition at line 309 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
inlineoverride |
|
inlineoverride |
|
private |
Definition at line 194 of file XMLFileCatalog.cpp.
|
override |
|
private |
Definition at line 474 of file XMLFileCatalog.cpp.
|
override |
Dump all logical file names of the catalog associate to the FileID.
Definition at line 257 of file XMLFileCatalog.cpp.
|
override |
Dump all MetaData of the catalog for a given file ID.
Definition at line 263 of file XMLFileCatalog.cpp.
|
override |
Dump all physical file names of the catalog and their attributes associate to the FileID.
Definition at line 251 of file XMLFileCatalog.cpp.
It creates a new node File with name = fid in the XML file catalog
Definition at line 353 of file XMLFileCatalog.cpp.
|
override |
Definition at line 230 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
inlineoverride |
|
private |
Definition at line 199 of file XMLFileCatalog.cpp.
|
inlineoverride |
|
override |
Create a FileID and Node of the logical file name with all the attributes.
Definition at line 419 of file XMLFileCatalog.cpp.
Create a FileID and Node of the physical file name with all the attributes.
Definition at line 389 of file XMLFileCatalog.cpp.
rename a PFN
Definition at line 330 of file XMLFileCatalog.cpp.
|
inlineoverride |
Save DOM catalog to file.
Definition at line 55 of file XMLFileCatalog.h.
|
private |
Definition at line 111 of file XMLFileCatalog.h.
|
private |
Definition at line 113 of file XMLFileCatalog.h.
|
private |
Definition at line 114 of file XMLFileCatalog.h.
|
private |
Definition at line 115 of file XMLFileCatalog.h.
|
private |
Definition at line 112 of file XMLFileCatalog.h.
|
private |
Definition at line 109 of file XMLFileCatalog.h.
|
mutableprivate |
Definition at line 110 of file XMLFileCatalog.h.