Commit cb9c2eb42ccead11559d79b1d1f03237ca6f72b2

Authored by Jürgen Knödlseder
1 parent 2791cc64

Extract all attributes in GCOMObservation::read() method from XML element

inst/com/src/GCOMObservation.cpp
... ... @@ -534,9 +534,6 @@ void GCOMObservation::read(const GXmlElement& xml)
534 534 // Clear observation
535 535 clear();
536 536  
537   - // Extract instrument name
538   - m_instrument = xml.attribute("instrument");
539   -
540 537 // If the XML elements has a "EVP" attribute we have an unbinned
541 538 // observation
542 539 if (gammalib::xml_has_par(xml, "EVP")) {
... ... @@ -643,6 +640,11 @@ void GCOMObservation::read(const GXmlElement& xml)
643 640  
644 641 } // endelse: binned observation
645 642  
  643 + // Extract attributes
  644 + m_name = xml.attribute("name");
  645 + m_id = xml.attribute("id");
  646 + m_instrument = xml.attribute("instrument");
  647 +
646 648 // Return
647 649 return;
648 650 }
... ...