CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DetHitAccess.cc File Reference
#include "TrackingTools/RoadSearchHitAccess/interface/DetHitAccess.h"

Go to the source code of this file.

Functions

template<typename T >
edmNew::DetSet< TdetSetOrEmpty (const edmNew::DetSetVector< T > &dsv, DetId detid)
 I need this because DetHitAccess assumes that it can search a hit container using a detid which is not there. More...
 

Function Documentation

template<typename T >
edmNew::DetSet<T> detSetOrEmpty ( const edmNew::DetSetVector< T > &  dsv,
DetId  detid 
)
inline

I need this because DetHitAccess assumes that it can search a hit container using a detid which is not there.

Definition at line 5 of file DetHitAccess.cc.

References edmNew::DetSetVector< T >::end(), edmNew::DetSetVector< T >::find(), and DetId::rawId().

Referenced by DetHitAccess::getHitVector().

5  {
6  typename edmNew::DetSetVector<T>::const_iterator iter = dsv.find(detid.rawId());
7  if (iter == dsv.end()) {
8  return typename edmNew::DetSet<T>(detid.rawId(), static_cast<const T *>(0), size_t(0) );
9  } else {
10  return *iter;
11  }
12 }
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator find(id_type i) const
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
const_iterator end() const
long double T