CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
DTCombinatorialPatternReco::TriedPattern Class Reference

#include <DTCombinatorialPatternReco.h>

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
 
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 107 of file DTCombinatorialPatternReco.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 130 of file DTCombinatorialPatternReco.h.

◆ values

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

Definition at line 109 of file DTCombinatorialPatternReco.h.

Constructor & Destructor Documentation

◆ TriedPattern()

DTCombinatorialPatternReco::TriedPattern::TriedPattern ( )
inline

Definition at line 112 of file DTCombinatorialPatternReco.h.

112 : hash_(1) { values_.reserve(8); }

References values_.

Member Function Documentation

◆ begin()

const_iterator DTCombinatorialPatternReco::TriedPattern::begin ( void  ) const
inline

Definition at line 131 of file DTCombinatorialPatternReco.h.

131 { return values_.begin(); }

References values_.

◆ end()

const_iterator DTCombinatorialPatternReco::TriedPattern::end ( void  ) const
inline

Definition at line 132 of file DTCombinatorialPatternReco.h.

132 { return values_.end(); }

References values_.

◆ hash()

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 127 of file DTCombinatorialPatternReco.h.

127 { return hash_; }

References hash_.

◆ operator==()

bool DTCombinatorialPatternReco::TriedPattern::operator== ( const TriedPattern other) const
inline

Definition at line 115 of file DTCombinatorialPatternReco.h.

115  {
116  return (hash_ == other.hash_) && // cheap
117  (values_ == other.values_); // expensive last resort
118  }

References hash_, trackingPlots::other, and values_.

◆ push_back()

void DTCombinatorialPatternReco::TriedPattern::push_back ( short unsigned int  i)
inline

push back value, and update the hash

Definition at line 121 of file DTCombinatorialPatternReco.h.

121  {
122  boost::hash_combine(hash_, i);
123  values_.push_back(i);
124  }

References hash_, mps_fire::i, and values_.

◆ size()

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

Definition at line 133 of file DTCombinatorialPatternReco.h.

133 { return values_.size(); }

References values_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Member Data Documentation

◆ hash_

size_t DTCombinatorialPatternReco::TriedPattern::hash_
private

Definition at line 137 of file DTCombinatorialPatternReco.h.

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

◆ values_

values DTCombinatorialPatternReco::TriedPattern::values_
private

Definition at line 136 of file DTCombinatorialPatternReco.h.

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

mps_fire.i
i
Definition: mps_fire.py:355
DTCombinatorialPatternReco::TriedPattern::hash_
size_t hash_
Definition: DTCombinatorialPatternReco.h:137
trackingPlots.other
other
Definition: trackingPlots.py:1465
DTCombinatorialPatternReco::TriedPattern::values_
values values_
Definition: DTCombinatorialPatternReco.h:136