CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
RecoTrackRefSelector Class Reference

#include <RecoTrackRefSelector.h>

Inheritance diagram for RecoTrackRefSelector:
RecoTrackSelectorBase

Public Types

typedef reco::TrackCollection collection
 
typedef ref_container::const_iterator const_ref_iterator
 
typedef reco::TrackRefVector ref_container
 

Public Member Functions

const_ref_iterator begin () const
 
const_ref_iterator end () const
 
 RecoTrackRefSelector ()
 Constructors. More...
 
 RecoTrackRefSelector (const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
 
void select (const edm::Handle< collection > &c, const edm::Event &event, const edm::EventSetup &es)
 
size_t size () const
 
- Public Member Functions inherited from RecoTrackSelectorBase
void init (const edm::Event &event, const edm::EventSetup &es)
 
bool operator() (const reco::TrackRef &tref) const
 
bool operator() (const reco::Track &t) const
 
bool operator() (const reco::Track &t, const reco::Track::Point &vertex) const
 
 RecoTrackSelectorBase ()
 
 RecoTrackSelectorBase (const edm::ParameterSet &cfg)
 
 RecoTrackSelectorBase (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 

Private Attributes

ref_container ref_selected_
 

Detailed Description

Definition at line 10 of file RecoTrackRefSelector.h.

Member Typedef Documentation

◆ collection

Definition at line 12 of file RecoTrackRefSelector.h.

◆ const_ref_iterator

Definition at line 14 of file RecoTrackRefSelector.h.

◆ ref_container

Definition at line 13 of file RecoTrackRefSelector.h.

Constructor & Destructor Documentation

◆ RecoTrackRefSelector() [1/2]

RecoTrackRefSelector::RecoTrackRefSelector ( )
inline

Constructors.

Definition at line 17 of file RecoTrackRefSelector.h.

17 {}

◆ RecoTrackRefSelector() [2/2]

RecoTrackRefSelector::RecoTrackRefSelector ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 19 of file RecoTrackRefSelector.h.

Member Function Documentation

◆ begin()

const_ref_iterator RecoTrackRefSelector::begin ( void  ) const
inline

Definition at line 21 of file RecoTrackRefSelector.h.

References edm::RefVector< C, T, F >::begin(), and ref_selected_.

21 { return ref_selected_.begin(); }
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223

◆ end()

const_ref_iterator RecoTrackRefSelector::end ( void  ) const
inline

Definition at line 22 of file RecoTrackRefSelector.h.

References edm::RefVector< C, T, F >::end(), and ref_selected_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

22 { return ref_selected_.end(); }
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228

◆ select()

void RecoTrackRefSelector::select ( const edm::Handle< collection > &  c,
const edm::Event event,
const edm::EventSetup es 
)
inline

Definition at line 24 of file RecoTrackRefSelector.h.

References HltBtagPostValidation_cff::c, edm::RefVector< C, T, F >::clear(), mps_fire::i, RecoTrackSelectorBase::init(), edm::RefVector< C, T, F >::push_back(), and ref_selected_.

24  {
25  init(event, es);
27  for (unsigned int i = 0; i < c->size(); i++) {
28  edm::Ref<collection> trk(c, i);
29  if (operator()(*trk)) {
31  }
32  }
33  }
void init(const edm::Event &event, const edm::EventSetup &es)
void clear()
Clear the vector.
Definition: RefVector.h:142
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
Definition: event.py:1

◆ size()

size_t RecoTrackRefSelector::size ( void  ) const
inline

Definition at line 35 of file RecoTrackRefSelector.h.

References ref_selected_, and edm::RefVector< C, T, F >::size().

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

35 { return ref_selected_.size(); }
size_type size() const
Size of the RefVector.
Definition: RefVector.h:102

Member Data Documentation

◆ ref_selected_

ref_container RecoTrackRefSelector::ref_selected_
private

Definition at line 38 of file RecoTrackRefSelector.h.

Referenced by begin(), end(), select(), and size().