| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# Gaudi::XMLFileCatalog Class Reference

`#include <XMLFileCatalog.h>`

Inheritance diagram for Gaudi::XMLFileCatalog:

[legend]
Collaboration diagram for Gaudi::XMLFileCatalog:

[legend]

List of all members.

## Detailed Description

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 25 of file XMLFileCatalog.h.

## Public Member Functions
| XMLFileCatalog (CSTR url, IMessageSvc *m)
| Create a catalog file, initialization of XercesC.
virtual | ~XMLFileCatalog ()
| Destructor,.
virtual unsigned long | addRef ()
| IInterface implementation.
virtual unsigned long | release ()
| release catalog
virtual StatusCode | queryInterface (const InterfaceID &id, void **ppv)
| Query interface.
virtual std::string | createFID () const
| Catalog interface.
virtual CSTR | connectInfo () const
| Access to connect string.
virtual void | init ()
| Parse the DOM tree of the XML catalog.
virtual void | commit ()
| Save DOM catalog to file.
virtual void | rollback ()
| Save DOM catalog to file.
virtual bool | readOnly () const
| Check if the catalog is read-only.
virtual bool | dirty () const
| Check if the catalog should be updated.
virtual bool | existsPFN (CSTR pfn) const
| Return the status of a physical file name.
virtual std::string | lookupPFN (CSTR fid) const
| Lookup file identifier by physical file name.
virtual bool | existsLFN (CSTR lfn) const
| Return the status of a logical file name.
virtual std::string | lookupLFN (CSTR lfn) const
| Lookup file identifier by logical file name.
virtual bool | existsFID (CSTR fid) const
| Return the status of a FileID.
virtual void | getPFN (CSTR fid, Files &files) const
| Dump all physical file names of the catalog and their attributes associate to the FileID.
virtual void | getLFN (CSTR fid, Files &files) const
| Dump all logical file names of the catalog associate to the FileID.
virtual void | getFID (Strings &fids) const
| Dump all file Identifiers.
virtual void | deleteFID (CSTR FileID) const
| Delete FileID Node from the catalog.
virtual void | registerPFN (CSTR fid, CSTR pfn, CSTR ftype) const
| Create a FileID and Node of the physical file name with all the attributes.
virtual void | registerLFN (CSTR fid, CSTR lfn) const
| Create a FileID and Node of the logical file name with all the attributes.
virtual void | registerFID (CSTR fid) const
| Create a FileID and Node.
virtual void | getMetaData (CSTR fid, Attributes &attr) const
| Dump all MetaData of the catalog for a given file ID.
virtual std::string | getMetaDataItem (CSTR fid, CSTR name) const
| Access metadata item.
virtual void | setMetaData (CSTR fid, CSTR name, CSTR value) const
| Insert/update metadata item.
virtual void | dropMetaData (CSTR fid) const
| Drop all metadata of one FID.
virtual void | dropMetaData (CSTR fid, CSTR attr) const
| Drop specified metadata item.
## 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
bool | m_update
xercesc::DOMDocument * | m_doc
xercesc::XercesDOMParser * | m_parser
xercesc::ErrorHandler * | m_errHdlr
std::string | m_file
unsigned long | m_refCount
IMessageSvc * | m_msgSvc

## Member Typedef Documentation

typedef const std::string& Gaudi::XMLFileCatalog::CSTR`[protected]`

Definition at line 27 of file XMLFileCatalog.h.

## Constructor & Destructor Documentation

XMLFileCatalog::XMLFileCatalog | ( | CSTR | url,
|  | IMessageSvc * | m |
| ) |  |  |

Create a catalog file, initialization of XercesC.

Definition at line 191 of file XMLFileCatalog.cpp.

    00192 : m_rdOnly(false),m_update(false),m_doc(0),m_parser(0),m_errHdlr(0),
    00193   m_file(uri), m_refCount(0), m_msgSvc(m)
    00194 {
    00195 }

XMLFileCatalog::~XMLFileCatalog | ( |  | ) | `[virtual]`

Destructor,.

Definition at line 197 of file XMLFileCatalog.cpp.

    00197                                   {
    00198   if (m_parser) delete m_parser;
    00199   m_parser = 0;
    00200   if (m_errHdlr) delete m_errHdlr;
    00201   m_errHdlr = 0;
    00202   m_doc = 0;
    00203 }

## Member Function Documentation

unsigned long XMLFileCatalog::addRef | ( |  | ) | `[virtual]`

IInterface implementation.

Increase reference count on catalog

Implements IInterface.

Definition at line 205 of file XMLFileCatalog.cpp.

    00205                                       {
    00206   return ++m_refCount;
    00207 }

unsigned long XMLFileCatalog::release | ( |  | ) | `[virtual]`

release catalog

Implements IInterface.

Definition at line 209 of file XMLFileCatalog.cpp.

    00209                                        {
    00210   long cnt = --m_refCount;
    00211   if ( cnt <= 0 ) {
    00212     delete this;
    00213   }
    00214   return cnt;
    00215 }

StatusCode XMLFileCatalog::queryInterface | ( | const InterfaceID & | id,
|  | void ** | ppv |
| ) |  |  | `[virtual]`

Query interface.

Implements IInterface.

Definition at line 217 of file XMLFileCatalog.cpp.

    00217                                                                               {
    00218   if ( riid.versionMatch(IFileCatalog::interfaceID()) ) {
    00219     *ppv = (IFileCatalog*)this;
    00220   }
    00221   else if ( riid.versionMatch(IInterface::interfaceID()) ) {
    00222     *ppv = (IInterface*)this;
    00223   }
    00224   else  {
    00225     *ppv = 0;
    00226     return StatusCode::FAILURE;
    00227   }
    00228   addRef();
    00229   return StatusCode::SUCCESS;
    00230 }

std::string XMLFileCatalog::createFID | ( |  | ) | const`[virtual]`

Catalog interface.

Create file identifier using UUID mechanism.

Create file identifier using UUID mechanism

Implements Gaudi::IFileCatalog.

Definition at line 232 of file XMLFileCatalog.cpp.

    00232                                            {
    00233   return createGuidAsString();
    00234 }

virtual CSTR Gaudi::XMLFileCatalog::connectInfo | ( |  | ) | const`[inline, virtual]`

Access to connect string.

Implements Gaudi::IFileCatalog.

Definition at line 47 of file XMLFileCatalog.h.

    00047 { return m_file;                 }

void XMLFileCatalog::init | ( |  | ) | `[virtual]`

Parse the DOM tree of the XML catalog.

Implements Gaudi::IFileCatalog.

Definition at line 250 of file XMLFileCatalog.cpp.

    00250                             {
    00251   string xmlFile = getfile(false);
    00252   try{
    00253     if ( m_parser ) delete m_parser;
    00254     m_parser = new XercesDOMParser;
    00255     m_parser->setValidationScheme(XercesDOMParser::Val_Auto);
    00256     m_parser->setDoNamespaces(false);
    00257     DTDRedirect dtdinmem;
    00258     m_parser->setEntityResolver(&dtdinmem);
    00259     if ( ! m_errHdlr ) m_errHdlr = new ErrHandler(m_msgSvc);
    00260     m_parser->setErrorHandler(m_errHdlr);
    00261     if ( !xmlFile.empty() )  {
    00262       m_parser->parse(xmlFile.c_str());
    00263     }
    00264     else  {
    00265       const std::string& s = EmptyCatalog;
    00266       MemBufInputSource src((const XMLByte*)s.c_str(),s.length(),"MemCatalog");
    00267       m_parser->parse(src);
    00268     }
    00269     m_doc = m_parser->getDocument();
    00270   }
    00271   catch (const XMLException& e) {
    00272     printError("XML parse error["+xmlFile+"]: "+_toString(e.getMessage()));
    00273   }
    00274   catch (const DOMException& e) {
    00275     printError("XML parse error["+xmlFile+"]: "+_toString(e.getMessage()));
    00276   }
    00277   catch (...)  {
    00278     printError("UNKNOWN XML parse error in file "+xmlFile);
    00279   }
    00280 }

void XMLFileCatalog::commit | ( |  | ) | `[virtual]`

Save DOM catalog to file.

Implements Gaudi::IFileCatalog.

Definition at line 480 of file XMLFileCatalog.cpp.

    00480                                {
    00481   try {
    00482     if ( dirty() && !readOnly() )  {
    00483       string xmlfile = getfile(true);
    00484       XMLStr ii("LS");
    00485       DOMImplementation *imp = DOMImplementationRegistry::getDOMImplementation(ii);
    00486       DOMWriter         *wr  = ((DOMImplementationLS*)imp)->createDOMWriter();
    00487       XMLFormatTarget   *tar = new LocalFileFormatTarget(xmlfile.c_str());
    00488       wr->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
    00489       wr->writeNode(tar, *m_doc);
    00490       wr->release();
    00491       delete  tar;
    00492     }
    00493   }
    00494   catch ( exception& e )  {
    00495     printError(string("Cannot open output file:")+e.what());
    00496   }
    00497   catch (...)  {
    00498     printError("Unknown IO rrror.");
    00499   }
    00500 }

virtual void Gaudi::XMLFileCatalog::rollback | ( |  | ) | `[inline, virtual]`

Save DOM catalog to file.

Implements Gaudi::IFileCatalog.

Definition at line 53 of file XMLFileCatalog.h.

    00053 { if ( dirty() )  init();        }

virtual bool Gaudi::XMLFileCatalog::readOnly | ( |  | ) | const`[inline, virtual]`

Check if the catalog is read-only.

Implements Gaudi::IFileCatalog.

Definition at line 55 of file XMLFileCatalog.h.

    00055 { return m_rdOnly;                }

virtual bool Gaudi::XMLFileCatalog::dirty | ( |  | ) | const`[inline, virtual]`

Check if the catalog should be updated.

Implements Gaudi::IFileCatalog.

Definition at line 57 of file XMLFileCatalog.h.

    00057 { return m_update;                }

virtual bool Gaudi::XMLFileCatalog::existsPFN | ( | CSTR | pfn | ) | const`[inline, virtual]`

Return the status of a physical file name.

Definition at line 59 of file XMLFileCatalog.h.

    00059 { return element(pfn,false) != 0; }

virtual std::string Gaudi::XMLFileCatalog::lookupPFN | ( | CSTR | fid | ) | const`[inline, virtual]`

Lookup file identifier by physical file name.

Definition at line 61 of file XMLFileCatalog.h.

    00061 { return lookupFID(fid);          }

virtual bool Gaudi::XMLFileCatalog::existsLFN | ( | CSTR | lfn | ) | const`[inline, virtual]`

Return the status of a logical file name.

Definition at line 63 of file XMLFileCatalog.h.

    00063 { return element(lfn,false) != 0; }

virtual std::string Gaudi::XMLFileCatalog::lookupLFN | ( | CSTR | lfn | ) | const`[inline, virtual]`

Lookup file identifier by logical file name.

Definition at line 65 of file XMLFileCatalog.h.

    00065 { return lookupFID(lfn);          }

virtual bool Gaudi::XMLFileCatalog::existsFID | ( | CSTR | fid | ) | const`[inline, virtual]`

Return the status of a FileID.

Definition at line 67 of file XMLFileCatalog.h.

    00067 { return element(fid,false) != 0; }

void XMLFileCatalog::getPFN | ( | CSTR | fid,
|  | Files & | files |
| ) |  |  | const`[virtual]`

Dump all physical file names of the catalog and their attributes associate to the FileID.

Definition at line 304 of file XMLFileCatalog.cpp.

    00304                                                          {
    00305   files.clear();
    00306   for(XMLCollection c(child(child(element(fid,false),PFNCOLL),PFNNODE), false); c; ++c)
    00307     files.push_back(make_pair(c.attr(Attr_name),c.attr(Attr_ftype)));
    00308 }

void XMLFileCatalog::getLFN | ( | CSTR | fid,
|  | Files & | files |
| ) |  |  | const`[virtual]`

Dump all logical file names of the catalog associate to the FileID.

Definition at line 310 of file XMLFileCatalog.cpp.

    00310                                                          {
    00311   files.clear();
    00312   for(XMLCollection c(child(child(element(fid,false),LFNCOLL),LFNNODE), false); c; ++c)
    00313     files.push_back(make_pair(c.attr(Attr_name),fid));
    00314 }

void XMLFileCatalog::getFID | ( | Strings & | fids | ) | const`[virtual]`

Dump all file Identifiers.

Implements Gaudi::IFileCatalog.

Definition at line 297 of file XMLFileCatalog.cpp.

    00297                                                {
    00298   fids.clear();
    00299   DOMNode* fde = getDoc(true)->getElementsByTagName(XMLStr("*"))->item(0);
    00300   for(XMLCollection c(child(fde,"File"), false); c; ++c)
    00301     fids.push_back(c.attr(Attr_ID));
    00302 }

void XMLFileCatalog::deleteFID | ( | CSTR | FileID | ) | const`[virtual]`

Delete FileID Node from the catalog.

Definition at line 370 of file XMLFileCatalog.cpp.

    00370                                              {
    00371   DOMNode *pn = 0, *fn = element(fid);
    00372   if ( fn ) pn = fn->getParentNode();
    00373   if ( pn ) pn->removeChild(fn);
    00374 }

void XMLFileCatalog::registerPFN | ( | CSTR | fid,
|  | CSTR | pfn,
|  | CSTR | ftype |
| ) |  |  | const`[virtual]`

Create a FileID and Node of the physical file name with all the attributes.

Definition at line 422 of file XMLFileCatalog.cpp.

    00422                                                                      {
    00423   if ( !fid.empty() )  {
    00424     std::pair<DOMElement*,DOMElement*> res = i_registerFID(fid);
    00425     DOMElement* phyelem = res.second, *fnelem = 0;
    00426     for(XMLCollection c(phyelem); c; ++c )  {
    00427       char* nam = XMLString::transcode(c->getNodeName());
    00428       if ( nam == PFNNODE )  {
    00429         XMLString::release(&nam);
    00430         nam = XMLString::transcode(c->getAttribute(Attr_name));
    00431         if ( nam == pfn )  {
    00432           XMLString::release(&nam);
    00433           fnelem = c;
    00434           break;
    00435         }
    00436       }
    00437       XMLString::release(&nam);
    00438     }
    00439     if ( !fnelem )  {
    00440       fnelem = getDoc(true)->createElement(PFNNODE);
    00441       phyelem->appendChild(fnelem);
    00442       fnelem->setAttribute(Attr_ftype,XMLStr(ftype));
    00443       fnelem->setAttribute(Attr_name,XMLStr(pfn));
    00444       fnelem->setIdAttribute(Attr_name);
    00445       m_update = true;
    00446     }
    00447     return;
    00448   }
    00449   throw runtime_error("XMLFileCatalog> Cannot register PFN for invalid FID:"+fid);
    00450 }

void XMLFileCatalog::registerLFN | ( | CSTR | fid,
|  | CSTR | lfn |
| ) |  |  | const`[virtual]`

Create a FileID and Node of the logical file name with all the attributes.

Definition at line 452 of file XMLFileCatalog.cpp.

    00452                                                          {
    00453   if ( !fid.empty() )  {
    00454     std::pair<DOMElement*, DOMElement*> res = i_registerFID(fid);
    00455     DOMElement* logelem = res.first, *fnelem = 0;
    00456     for(XMLCollection c(logelem); c; ++c )  {
    00457       char* nam = XMLString::transcode(c->getNodeName());
    00458       if ( nam == LFNNODE )  {
    00459         XMLString::release(&nam);
    00460         nam = XMLString::transcode(c->getAttribute(Attr_name));
    00461         if ( nam == lfn )  {
    00462           XMLString::release(&nam);
    00463           fnelem = c;
    00464           break;
    00465         }
    00466       }
    00467     }
    00468     if ( !fnelem )  {
    00469       fnelem = getDoc(true)->createElement(LFNNODE);
    00470       logelem->appendChild(fnelem);
    00471       fnelem->setAttribute(Attr_name,XMLStr(lfn));
    00472       fnelem->setIdAttribute(Attr_name);
    00473       m_update = true;
    00474     }
    00475     return;
    00476   }
    00477   throw runtime_error("XMLFileCatalog> Cannot register LFN for invalid FID:"+fid);
    00478 }

void XMLFileCatalog::registerFID | ( | CSTR | fid | ) | const`[virtual]`

Create a FileID and Node.

Definition at line 376 of file XMLFileCatalog.cpp.

    00376                                                {
    00377   if ( !fid.empty() ) {
    00378     std::pair<DOMElement*, DOMElement*> res = i_registerFID(fid);
    00379     if ( res.first == 0 || res.second == 0 )  {
    00380       printError("Failed to register FID:"+fid);
    00381     }
    00382     return;
    00383   }
    00384   throw runtime_error("XMLFileCatalog> Cannot register LFN for invalid FID:"+fid);
    00385 }

void XMLFileCatalog::getMetaData | ( | CSTR | fid,
|  | Attributes & | attr |
| ) |  |  | const`[virtual]`

Dump all MetaData of the catalog for a given file ID.

Definition at line 316 of file XMLFileCatalog.cpp.

    00316                                                                    {
    00317   attr.clear();
    00318   for(XMLCollection c(child(element(fid),MetaNode), false); c; ++c)
    00319     attr.push_back(make_pair(c.attr(Attr_metaName),c.attr(Attr_metaValue)));
    00320   if ( attr.size() > 0 )
    00321     attr.push_back(make_pair("guid",fid));
    00322 }

string XMLFileCatalog::getMetaDataItem | ( | CSTR | fid,
|  | CSTR | name |
| ) |  |  | const`[virtual]`

Access metadata item.

Definition at line 350 of file XMLFileCatalog.cpp.

    00350                                                                 {
    00351   XMLCollection c(child(getDoc(true)->getElementById(XMLStr(fid)),MetaNode,Attr_metaName,attr));
    00352   return c ? c.attr(attr) : string("");
    00353 }

void XMLFileCatalog::setMetaData | ( | CSTR | fid,
|  | CSTR | name,
|  | CSTR | value |
| ) |  |  | const`[virtual]`

Insert/update metadata item.

Definition at line 334 of file XMLFileCatalog.cpp.

    00334                                                                       {
    00335   if ( !readOnly() )  {
    00336     DOMNode*    node = element(fid);
    00337     DOMElement* mnod = (DOMElement*)child(node,MetaNode,Attr_metaName,attr);
    00338     if (!mnod){
    00339       mnod = getDoc(true)->createElement(MetaNode);
    00340       node->appendChild(mnod);
    00341       mnod->setAttribute(Attr_metaName,XMLStr(attr));
    00342     }
    00343     mnod->setAttribute(Attr_metaValue,XMLStr(val));
    00344     m_update = true;
    00345     return;
    00346   }
    00347   printError("Cannot update readonly catalog!");
    00348 }

virtual void Gaudi::XMLFileCatalog::dropMetaData | ( | CSTR | fid | ) | const`[inline, virtual]`

Drop all metadata of one FID.

Definition at line 89 of file XMLFileCatalog.h.

    00089 {   dropMetaData(fid,"*");   }

void XMLFileCatalog::dropMetaData | ( | CSTR | fid,
|  | CSTR | attr |
| ) |  |  | const`[virtual]`

Drop specified metadata item.

Definition at line 355 of file XMLFileCatalog.cpp.

    00355                                                            {
    00356   vector<DOMNode*> gbc;
    00357   DOMNode* fn = getDoc(true)->getElementById(XMLStr(fid));
    00358   for(XMLCollection c(child(fn,MetaNode)); c; ++c)
    00359     if ( attr[0]=='*' || !c.attr(attr).empty() ) gbc.push_back(c);
    00360   for(vector<DOMNode*>::iterator i=gbc.begin(); i != gbc.end(); i++)
    00361     fn->removeChild(*i);
    00362 }

DOMDocument * XMLFileCatalog::getDoc | ( | bool | throw_if_no_exists = `true` | ) | const`[private]`

Definition at line 236 of file XMLFileCatalog.cpp.

    00236                                                                    {
    00237   if ( !m_doc && throw_if_no_exists )
    00238     printError("The XML catalog was not started.",true);
    00239   return m_doc;
    00240 }

string XMLFileCatalog::getfile | ( | bool | create | ) | `[private]`

Definition at line 502 of file XMLFileCatalog.cpp.

    00502                                             {
    00503   string protocol, path;
    00504   XMLURL xerurl;
    00505   try{
    00506     xerurl   = (const XMLCh*)XMLStr(m_file);
    00507     protocol = _toString(xerurl.getProtocolName());
    00508     path     = _toString(xerurl.getPath());
    00509   }
    00510   catch (const XMLException& e ) {
    00511     printError(_toString(e.getMessage()));
    00512   }
    00513   if ( protocol.empty() )    {
    00514     printError("Missing protocol.");
    00515   }
    00516   else if ( protocol == "http" || protocol == "ftp" )  {
    00517     m_rdOnly = true;
    00518   }
    00519   else if ( protocol == "file" ) {
    00520     m_rdOnly = false;
    00521     struct stat buff;
    00522     int exist = ::stat(path.c_str(),&buff) != -1;
    00523     if ( create && !exist )  {
    00524       MsgStream log(m_msgSvc,"XMLCatalog");
    00525       log << MSG::INFO << "File '" << path << "' does not exist. New file created." << endmsg;
    00526       ofstream out(path.c_str());
    00527       if( !m_rdOnly && out.is_open() ) {
    00528         out << (CSTR)EmptyCatalog << endl;
    00529       }
    00530       else     {
    00531         printError("Problem creating file "+path);
    00532       }
    00533       out.close();
    00534     }
    00535     else if ( exist )  {
    00536       return path;
    00537     }
    00538     else if ( !create )  {
    00539       return "";
    00540     }
    00541   }
    00542   else  {
    00543     printError(protocol + ": protocol not supported.");
    00544   }
    00545   return path;
    00546 }

void XMLFileCatalog::printError | ( | CSTR | msg,
|  | bool | throw_exc = `true` |
| ) |  |  | const`[private]`

Definition at line 242 of file XMLFileCatalog.cpp.

    00242                                                               {
    00243   MsgStream log(m_msgSvc,"XMLCatalog");
    00244   log << MSG::FATAL << msg << endmsg;
    00245   if ( rethrow )  {
    00246     throw runtime_error("XMLFileCatalog> "+msg);
    00247   }
    00248 }

std::string Gaudi::XMLFileCatalog::lookupFID | ( | CSTR | lfn | ) | const`[private]`

DOMNode * XMLFileCatalog::element | ( | CSTR | fid,
|  | bool | print_err = `true` |
| ) |  |  | const`[private]`

Definition at line 364 of file XMLFileCatalog.cpp.

    00364                                                                        {
    00365   DOMNode* node = getDoc(true)->getElementById(XMLStr(element_name));
    00366   if ( !node && print_err ) printError("Cannot find element:"+element_name);
    00367   return node;
    00368 }

xercesc::DOMNode* Gaudi::XMLFileCatalog::child | ( | xercesc::DOMNode * | par,
|  | CSTR | tag,
|  | CSTR | attr = `""`,
|  | CSTR | val = `""` |
| ) |  |  | const`[private]`

std::pair< DOMElement *, DOMElement * > XMLFileCatalog::i_registerFID | ( | CSTR | fid | ) | const`[private]`

It creates a new node File with name = fid in the XML file catalog

Definition at line 387 of file XMLFileCatalog.cpp.

    00387                                                                              {
    00388   if ( !readOnly() )  {
    00390     DOMElement *file = (DOMElement*)element(fid,false), *phyelem = 0, *logelem = 0;
    00391     DOMDocument* doc = getDoc(true);
    00392     if ( !file )  {
    00393       DOMNode* fde = doc->getElementsByTagName(XMLStr("*"))->item(0);
    00394       file = m_doc->createElement(XMLStr("File"));
    00395       file->setAttribute(Attr_ID, XMLStr(fid));
    00396       file->setIdAttribute(Attr_ID);
    00397       fde->appendChild(file);
    00398       m_update = true;
    00399     }
    00400     for(XMLCollection c1(file); c1; ++c1 )  {
    00401       char* nam = XMLString::transcode(c1->getNodeName());
    00402       if ( nam == PFNCOLL ) phyelem = c1;
    00403       if ( nam == LFNCOLL ) logelem = c1;
    00404       XMLString::release(&nam);
    00405     }
    00406     if ( !phyelem )  {
    00407       phyelem = doc->createElement(PFNCOLL);
    00408       file->appendChild(phyelem);
    00409       m_update = true;
    00410     }
    00411     if ( !logelem )  {
    00412       logelem = doc->createElement(LFNCOLL);
    00413       file->appendChild(logelem);
    00414       m_update = true;
    00415     }
    00416     return std::make_pair(logelem,phyelem);
    00417   }
    00418   printError("Cannot update readonly catalog!");
    00419   return std::pair<DOMElement*, DOMElement*>(0,0);
    00420 }

## Member Data Documentation

bool Gaudi::XMLFileCatalog::m_rdOnly`[private]`

Definition at line 100 of file XMLFileCatalog.h.

bool Gaudi::XMLFileCatalog::m_update`[mutable, private]`

Definition at line 101 of file XMLFileCatalog.h.

xercesc::DOMDocument* Gaudi::XMLFileCatalog::m_doc`[private]`

Definition at line 102 of file XMLFileCatalog.h.

xercesc::XercesDOMParser* Gaudi::XMLFileCatalog::m_parser`[private]`

Definition at line 103 of file XMLFileCatalog.h.

xercesc::ErrorHandler* Gaudi::XMLFileCatalog::m_errHdlr`[private]`

Definition at line 104 of file XMLFileCatalog.h.

std::string Gaudi::XMLFileCatalog::m_file`[private]`

Definition at line 105 of file XMLFileCatalog.h.

unsigned long Gaudi::XMLFileCatalog::m_refCount`[private]`

Definition at line 106 of file XMLFileCatalog.h.

IMessageSvc* Gaudi::XMLFileCatalog::m_msgSvc`[private]`

Definition at line 107 of file XMLFileCatalog.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiUtils/src/component/XMLFileCatalog.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiUtils/src/component/XMLFileCatalog.cpp