2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
6 * @file AthContainersInterfaces/AuxDataOption.icc
7 * @author scott snyder <snyder@bnl.gov>
9 * @brief Hold information about an option setting request.
17 * @brief Constructor, with an integer value.
18 * @param name The option name.
19 * @param val The option value.
22 AuxDataOption::AuxDataOption (const std::string& name, int val)
31 * @brief Constructor, with a float value.
32 * @param name The option name.
33 * @param val The option value.
36 AuxDataOption::AuxDataOption (const std::string& name, float val)
44 * @brief Constructor, with a double value.
45 * @param name The option name.
46 * @param val The option value.
49 AuxDataOption::AuxDataOption (const std::string& name, double val)
53 m_val.f = static_cast<float>(val);
58 * @brief The name of the option.
61 const std::string& AuxDataOption::name() const
68 * @brief Return the option value as an integer.
71 int AuxDataOption::intVal() const
73 return m_isInt ? m_val.i : static_cast<int>(m_val.f);
78 * @brief Return the option value as a float.
81 float AuxDataOption::floatVal() const
83 return m_isInt ? static_cast<float>(m_val.i) : m_val.f;