/***********************************************************************//** * @brief Print effective area information * * @param[in] chatter Chattiness (defaults to NORMAL). * @return String containing effective area information. ***************************************************************************/ std::string GLATAeff::print(const GChatter& chatter) const { // Initialise result string std::string result; // Continue only if chatter is not silent if (chatter != SILENT) { // Append header result.append("=== GLATAeff ==="); // Append information result.append("\n"+gammalib::parformat("Number of energy bins") + gammalib::str(nenergies())); result.append("\n"+gammalib::parformat("Number of cos theta bins") + gammalib::str(ncostheta())); result.append("\n"+gammalib::parformat("Detector section")); if (m_front) { result.append("front"); } else if (m_back) { result.append("back"); } else { result.append("unknown"); } result.append("\n"+gammalib::parformat("Efficiency factors")); if (has_efficiency()) { result.append("present"); } else { result.append("absent"); } } // endif: chatter was not silent // Return result return result; }
/***********************************************************************//** * @brief Print response table information * * @param[in] chatter Chattiness (defaults to NORMAL). * @return String containing response table information. ***************************************************************************/ std::string GLATResponseTable::print(const GChatter& chatter) const { // Initialise result string std::string result; // Continue only if chatter is not silent if (chatter != SILENT) { // Append header result.append("=== GLATResponseTable ==="); // Append information result.append("\n"+gammalib::parformat("Number of energy bins") + gammalib::str(nenergies())); result.append("\n"+gammalib::parformat("Number of cos theta bins") + gammalib::str(ncostheta())); } // endif: chatter was not silent // Return result return result; }
int size(void) const { return nenergies()*ncostheta(); }
/***********************************************************************//** * @brief Return number of bins in effective area response * * @return Number of bins in effective area response. ***************************************************************************/ inline int GLATAeff::size(void) const { return nenergies()*ncostheta(); }