CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Attributes
DTCombinatorialPatternReco::TriedPattern Class Reference

#include <DTCombinatorialPatternReco.h>

Classes

class  HashFunction
 

Public Types

typedef values::const_iterator const_iterator
 
typedef std::vector< short
unsigned int > 
values
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
size_t hash () const
 
template<class T >
void hash_combine (std::size_t &seed, const T &v)
 
bool operator== (const TriedPattern &other) const
 
void push_back (short unsigned int i)
 push back value, and update the hash More...
 
values::size_type size () const
 
 TriedPattern ()
 

Private Attributes

size_t hash_
 
values values_
 

Detailed Description

Definition at line 112 of file DTCombinatorialPatternReco.h.

Member Typedef Documentation

Definition at line 142 of file DTCombinatorialPatternReco.h.

typedef std::vector<short unsigned int> DTCombinatorialPatternReco::TriedPattern::values

Definition at line 114 of file DTCombinatorialPatternReco.h.

Constructor & Destructor Documentation

DTCombinatorialPatternReco::TriedPattern::TriedPattern ( )
inline

Member Function Documentation

const_iterator DTCombinatorialPatternReco::TriedPattern::begin ( void  ) const
inline
const_iterator DTCombinatorialPatternReco::TriedPattern::end ( void  ) const
inline
size_t DTCombinatorialPatternReco::TriedPattern::hash ( ) const
inline

return the hash: equal objects MUST have the same hash, different ones should have different ones

Definition at line 139 of file DTCombinatorialPatternReco.h.

References hash_.

Referenced by hash_value(), and DTCombinatorialPatternReco::TriedPattern::HashFunction::operator()().

template<class T >
void DTCombinatorialPatternReco::TriedPattern::hash_combine ( std::size_t &  seed,
const T v 
)
inline

Definition at line 127 of file DTCombinatorialPatternReco.h.

References visDQMUpload::hasher.

Referenced by push_back().

127  {
128  std::hash<T> hasher;
129  seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
130  }
bool DTCombinatorialPatternReco::TriedPattern::operator== ( const TriedPattern other) const
inline

Definition at line 120 of file DTCombinatorialPatternReco.h.

References hash_, and values_.

120  {
121  return (hash_ == other.hash_) && // cheap
122  (values_ == other.values_); // expensive last resort
123  }
void DTCombinatorialPatternReco::TriedPattern::push_back ( short unsigned int  i)
inline

push back value, and update the hash

Definition at line 133 of file DTCombinatorialPatternReco.h.

References hash_, hash_combine(), and values_.

Referenced by DTCombinatorialPatternReco::findCompatibleHits().

values::size_type DTCombinatorialPatternReco::TriedPattern::size ( void  ) const
inline

Member Data Documentation

size_t DTCombinatorialPatternReco::TriedPattern::hash_
private

Definition at line 155 of file DTCombinatorialPatternReco.h.

Referenced by hash(), operator==(), and push_back().

values DTCombinatorialPatternReco::TriedPattern::values_
private

Definition at line 154 of file DTCombinatorialPatternReco.h.

Referenced by begin(), end(), operator==(), push_back(), size(), and TriedPattern().