CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Public Attributes
tracking::TempMeasurements Struct Reference

#include <TempMeasurements.h>

Public Types

typedef
TrackingRecHit::ConstRecHitPointer 
ConstRecHitPointer
 
typedef std::vector< float > Distances
 
typedef
TrackingRecHit::ConstRecHitContainer 
RecHitContainer
 

Public Member Functions

void add (ConstRecHitPointer const &h, float d)
 
void add (ConstRecHitPointer &&h, float d)
 
void clear ()
 
bool empty () const
 
std::size_t size () const
 
void sortIndex (int *index) const
 

Public Attributes

Distances distances
 
RecHitContainer hits
 

Detailed Description

Definition at line 11 of file TempMeasurements.h.

Member Typedef Documentation

Definition at line 13 of file TempMeasurements.h.

typedef std::vector<float> tracking::TempMeasurements::Distances

Definition at line 14 of file TempMeasurements.h.

Definition at line 12 of file TempMeasurements.h.

Member Function Documentation

void tracking::TempMeasurements::add ( ConstRecHitPointer const &  h,
float  d 
)
inline

Definition at line 29 of file TempMeasurements.h.

References distances, and hits.

Referenced by TkPixelMeasurementDet::measurements(), and counter.Counter::register().

29  {
30  hits.push_back(h); distances.push_back(d);
31  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
tuple d
Definition: ztail.py:151
void tracking::TempMeasurements::add ( ConstRecHitPointer &&  h,
float  d 
)
inline

Definition at line 32 of file TempMeasurements.h.

References distances, h, hits, and eostools::move().

Referenced by counter.Counter::register().

32  {
33  hits.push_back(std::move(h)); distances.push_back(d);
34  }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
tuple d
Definition: ztail.py:151
def move
Definition: eostools.py:510
void tracking::TempMeasurements::clear ( void  )
inline

Definition at line 16 of file TempMeasurements.h.

References distances, and hits.

16 { hits.clear(); distances.clear();}
bool tracking::TempMeasurements::empty ( void  ) const
inline

Definition at line 17 of file TempMeasurements.h.

References hits.

17 {return hits.empty();}
std::size_t tracking::TempMeasurements::size ( void  ) const
inline

Definition at line 18 of file TempMeasurements.h.

References hits.

Referenced by MeasurementDet::fastMeasurements(), TkPixelMeasurementDet::measurements(), and sortIndex().

18 { return hits.size();}
void tracking::TempMeasurements::sortIndex ( int *  index) const
inline

Definition at line 20 of file TempMeasurements.h.

References ztail::d, distances, i, j, relval_2017::k, and size().

Referenced by MeasurementDet::fastMeasurements().

20  {
21  float const * d = &distances.front(); // do not trust capture
22  for (std::size_t i=0; i!=size(); ++i) {
23  index[i]=i;
24  std::push_heap(index,index+i+1,[d](int j,int k){return d[j]<d[k];});
25  }
26  std::make_heap(index,index+size(),[d](int j,int k){return d[j]<d[k];});
27  }
int i
Definition: DBlmapReader.cc:9
std::size_t size() const
tuple d
Definition: ztail.py:151
int j
Definition: DBlmapReader.cc:9

Member Data Documentation

Distances tracking::TempMeasurements::distances

Definition at line 38 of file TempMeasurements.h.

Referenced by add(), clear(), MeasurementDet::fastMeasurements(), and sortIndex().

RecHitContainer tracking::TempMeasurements::hits

Definition at line 37 of file TempMeasurements.h.

Referenced by add(), clear(), empty(), MeasurementDet::fastMeasurements(), and size().