Exemple #1
0
/***********************************************************************//**
 * @brief Print livetime cube map information
 *
 * @param[in] chatter Chattiness (defaults to NORMAL).
 * @return String containing livetime cube map information.
 ***************************************************************************/
std::string GLATLtCubeMap::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("=== GLATLtCubeMap ===");

        // Append information
        result.append("\n"+gammalib::parformat("Number of cos theta bins") +
                      gammalib::str(ncostheta()));
        result.append("\n"+gammalib::parformat("Number of phi bins") +
                      gammalib::str(nphi()));
        result.append("\n"+gammalib::parformat("Cos theta binning"));
        if (m_sqrt_bin) {
            result.append("sqrt");
        }
        else {
            result.append("linear");
        }
        result.append("\n"+gammalib::parformat("Minimum cos theta") +
                      gammalib::str(costhetamin()));
        result.append("\n"+m_map.print(gammalib::reduce(chatter)));

    } // endif: chatter was not silent

    // Return result
    return result;
}
Exemple #2
0
/***********************************************************************//**
 * @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;
}
Exemple #4
0
 int          size(void) const {
     return nenergies()*ncostheta();
 }
Exemple #5
0
/***********************************************************************//**
 * @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();
}