#include "IMidasBankProxyRegistry.hxx" #include "ICOMETLog.hxx" #include "IXmlBank.hxx" REGISTER_MIDAS_BANK(IXmlBank,XMLD) /// Typically the class constructors do nothing beyond passing their arguments do /// to the IMidasBank base class and the destructor does nothing. //_____________________________________________________________________________ COMET::IXmlBank::IXmlBank() : IMidasBank(0,TXML_BANK_TITLE), fXmlOdb(0) { // Default constructor COMETTrace("IXmlBank: Default ctor at:" << (void*) this); } //_____________________________________________________________________________ COMET::IXmlBank::IXmlBank(const ULong64_t *bank, const char* title /* = TXML_BANK_TITLE */) : IMidasBank(bank,title), fXmlOdb(0) { // Normal constructor COMETTrace("COMET::IXmlBank: Normal ctor at:" << (void*) this << "\n Name:'" << this->GetName() << "'; Title:" << title << "; Bank size:" << this->GetBankSize() << "; starts at:" << (void*) this->GetBank()); } //_____________________________________________________________________________ COMET::IXmlBank::~IXmlBank() { COMETTrace("COMET::IXmlBank: dtor at:" << (void*) this); delete fXmlOdb; fXmlOdb = NULL; } //_____________________________________________________________________________ void COMET::IXmlBank::InitXmlOdb() { delete fXmlOdb; // Only create IXmlOdb if there is a buffer if ( this->GetBank() ) { fXmlOdb = new IXmlOdb(reinterpret_cast(this->GetData8()),this->GetRawSize()-4); if ( ! fXmlOdb->IsValid() ) { delete fXmlOdb; fXmlOdb = NULL; } } } //_____________________________________________________________________________ void COMET::IXmlBank::Print(const Option_t* opt /* = "" */) const { this->COMET::IMidasBank::Print(""); if ( ! fXmlOdb ) this->GetXmlOdb(); if ( fXmlOdb ) fXmlOdb->Print(opt); }