39 namespace SourceCatalog {
76 typename std::conditional<Const, const FluxErrorPair, FluxErrorPair>::type> {
158 : m_filter_name_vector_ptr(filter_name_vector_ptr), m_value_vector(
std::move(value_vector)) {
159 if (m_filter_name_vector_ptr ==
nullptr) {
163 if (m_filter_name_vector_ptr->size() != m_value_vector.size()) {
164 throw Elements::Exception() <<
"Photometry filter names vector has different size than the values vector";
172 return const_iterator{m_filter_name_vector_ptr->cbegin(), m_value_vector.cbegin()};
176 return const_iterator{m_filter_name_vector_ptr->cend(), m_value_vector.cend()};
180 return const_iterator{m_filter_name_vector_ptr->cbegin(), m_value_vector.cbegin()};
184 return const_iterator{m_filter_name_vector_ptr->cend(), m_value_vector.cend()};
188 return iterator{m_filter_name_vector_ptr->begin(), m_value_vector.begin()};
192 return iterator{m_filter_name_vector_ptr->end(), m_value_vector.end()};
200 return m_filter_name_vector_ptr->size();
225 #define PHOTOMETRY_IMPL
227 #undef PHOTOMETRY_IMPL
Attribute interface extended by all source attributes.
typename std::conditional< Const, std::vector< FluxErrorPair >::const_iterator, std::vector< FluxErrorPair >::iterator >::type values_iter_t
PhotometryIterator(const filters_iter_t &filters_iter, const values_iter_t &values_iter)
typename std::conditional< Const, std::vector< std::string >::const_iterator, std::vector< std::string >::iterator >::type filters_iter_t
bool operator==(const PhotometryIterator &other) const
PhotometryIterator(const PhotometryIterator< false > &other)
ssize_t operator-(const PhotometryIterator &other) const
typename std::conditional< Const, const FluxErrorPair, FluxErrorPair >::type value_t
filters_iter_t m_filters_iter
const std::string & filterName() const
bool operator!=(const PhotometryIterator &other) const
values_iter_t m_values_iter
PhotometryIterator & operator++()
const_iterator cend() const
const_iterator cbegin() const
std::shared_ptr< std::vector< std::string > > m_filter_name_vector_ptr
Shared pointer to the common list of filter names.
PhotometryIterator< false > iterator
Photometry(std::shared_ptr< std::vector< std::string >> filter_name_vector_ptr, std::vector< FluxErrorPair > value_vector)
Constructor which should never be called directly. Use the PhotometryAttributeHandler to build Photom...
std::vector< FluxErrorPair > m_value_vector
The photometry map.
const_iterator end() const
PhotometryIterator< true > const_iterator
std::size_t size() const
Return the size of the photometry map.
virtual ~Photometry()=default
default destructor
const_iterator begin() const
bool operator==(const FluxErrorPair &other) const
FluxErrorPair(double flux, double error, bool missing_photometry_flag=false, bool upper_limit_flag=false)
bool missing_photometry_flag
bool operator!=(const FluxErrorPair &other) const
FluxErrorPair(const FluxErrorPair &)=default