CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HGCalHistoSeedingImpl::HistogramT< T > Class Template Reference

Public Types

using const_iterator = typename Data::const_iterator
 
using Data = std::vector< T >
 
using iterator = typename Data::iterator
 

Public Member Functions

Tat (int zside, unsigned x1, unsigned x2)
 
const Tat (int zside, unsigned x1, unsigned x2) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
 HistogramT ()
 
 HistogramT (unsigned bins1, unsigned bins2)
 

Private Member Functions

unsigned index (int zside, unsigned x1, unsigned x2) const
 

Private Attributes

unsigned bins1_ = 0
 
unsigned bins2_ = 0
 
unsigned bins_ = 0
 
Data histogram_
 

Static Private Attributes

static constexpr unsigned kSides_ = 2
 

Detailed Description

template<typename T>
class HGCalHistoSeedingImpl::HistogramT< T >

Definition at line 23 of file HGCalHistoSeedingImpl.h.

Member Typedef Documentation

template<typename T>
using HGCalHistoSeedingImpl::HistogramT< T >::const_iterator = typename Data::const_iterator

Definition at line 27 of file HGCalHistoSeedingImpl.h.

template<typename T>
using HGCalHistoSeedingImpl::HistogramT< T >::Data = std::vector<T>

Definition at line 25 of file HGCalHistoSeedingImpl.h.

template<typename T>
using HGCalHistoSeedingImpl::HistogramT< T >::iterator = typename Data::iterator

Definition at line 26 of file HGCalHistoSeedingImpl.h.

Constructor & Destructor Documentation

template<typename T>
HGCalHistoSeedingImpl::HistogramT< T >::HistogramT ( )
inline
template<typename T>
HGCalHistoSeedingImpl::HistogramT< T >::HistogramT ( unsigned  bins1,
unsigned  bins2 
)
inline

Member Function Documentation

template<typename T>
T& HGCalHistoSeedingImpl::HistogramT< T >::at ( int  zside,
unsigned  x1,
unsigned  x2 
)
inline
template<typename T>
const T& HGCalHistoSeedingImpl::HistogramT< T >::at ( int  zside,
unsigned  x1,
unsigned  x2 
) const
inline

Definition at line 36 of file HGCalHistoSeedingImpl.h.

References HGCalHistoSeedingImpl::HistogramT< T >::histogram_, and HGCalHistoSeedingImpl::HistogramT< T >::index().

36 { return histogram_[index(zside, x1, x2)]; }
int zside(DetId const &)
unsigned index(int zside, unsigned x1, unsigned x2) const
template<typename T>
iterator HGCalHistoSeedingImpl::HistogramT< T >::begin ( void  )
inline
template<typename T>
const_iterator HGCalHistoSeedingImpl::HistogramT< T >::begin ( void  ) const
inline
template<typename T>
iterator HGCalHistoSeedingImpl::HistogramT< T >::end ( void  )
inline
template<typename T>
const_iterator HGCalHistoSeedingImpl::HistogramT< T >::end ( void  ) const
inline
template<typename T>
unsigned HGCalHistoSeedingImpl::HistogramT< T >::index ( int  zside,
unsigned  x1,
unsigned  x2 
) const
inlineprivate

Definition at line 50 of file HGCalHistoSeedingImpl.h.

References HGCalHistoSeedingImpl::HistogramT< T >::bins1_, HGCalHistoSeedingImpl::HistogramT< T >::bins2_, HGCalHistoSeedingImpl::HistogramT< T >::bins_, and Exception.

Referenced by BeautifulSoup.PageElement::_invert(), and HGCalHistoSeedingImpl::HistogramT< T >::at().

50  {
51  if (x1 >= bins1_ || x2 >= bins2_) {
52  throw cms::Exception("OutOfBound") << "Trying to access bin (" << x1 << "," << x2
53  << ") in seeding histogram of size (" << bins1_ << "," << bins2_ << ")";
54  }
55  return x2 + bins2_ * x1 + bins_ * (zside > 0 ? 1 : 0);
56  }
int zside(DetId const &)

Member Data Documentation

template<typename T>
unsigned HGCalHistoSeedingImpl::HistogramT< T >::bins1_ = 0
private
template<typename T>
unsigned HGCalHistoSeedingImpl::HistogramT< T >::bins2_ = 0
private
template<typename T>
unsigned HGCalHistoSeedingImpl::HistogramT< T >::bins_ = 0
private
template<typename T>
Data HGCalHistoSeedingImpl::HistogramT< T >::histogram_
private
template<typename T>
constexpr unsigned HGCalHistoSeedingImpl::HistogramT< T >::kSides_ = 2
staticprivate

Definition at line 44 of file HGCalHistoSeedingImpl.h.