CMS 3D CMS Logo

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

#include <RecoTrackSelector.h>

Inheritance diagram for RecoTrackSelector:
RecoTrackSelectorBase

Public Types

typedef reco::TrackCollection collection
 
typedef container::const_iterator const_iterator
 
typedef std::vector< const reco::Track * > container
 
typedef reco::TrackRef reference_type
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
 RecoTrackSelector ()
 Constructors. More...
 
 RecoTrackSelector (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
 
 RecoTrackSelectorBase ()
 
 RecoTrackSelectorBase (const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
 

Private Attributes

container selected_
 

Detailed Description

Definition at line 10 of file RecoTrackSelector.h.

Member Typedef Documentation

Definition at line 13 of file RecoTrackSelector.h.

typedef container::const_iterator RecoTrackSelector::const_iterator

Definition at line 15 of file RecoTrackSelector.h.

typedef std::vector<const reco::Track *> RecoTrackSelector::container

Definition at line 14 of file RecoTrackSelector.h.

Definition at line 12 of file RecoTrackSelector.h.

Constructor & Destructor Documentation

RecoTrackSelector::RecoTrackSelector ( )
inline

Constructors.

Definition at line 18 of file RecoTrackSelector.h.

18 {}
RecoTrackSelector::RecoTrackSelector ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 19 of file RecoTrackSelector.h.

19  :
20  RecoTrackSelectorBase( cfg, iC ) {}

Member Function Documentation

const_iterator RecoTrackSelector::begin ( void  ) const
inline

Definition at line 22 of file RecoTrackSelector.h.

References selected_.

22 { return selected_.begin(); }
const_iterator RecoTrackSelector::end ( void  ) const
inline

Definition at line 23 of file RecoTrackSelector.h.

References selected_.

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

23 { return selected_.end(); }
void RecoTrackSelector::select ( const edm::Handle< collection > &  c,
const edm::Event event,
const edm::EventSetup es 
)
inline

Definition at line 25 of file RecoTrackSelector.h.

References SoftLeptonByDistance_cfi::distance, RecoTrackSelectorBase::init(), and selected_.

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().

25  {
26  init(event,es);
27  selected_.clear();
28  for( reco::TrackCollection::const_iterator trk = c->begin();
29  trk != c->end(); ++ trk ) {
30  reference_type tkref(c,std::distance(c->begin(),trk));
31  if ( operator()(*tkref) ) {
32  selected_.push_back( & * trk );
33  }
34  }
35  }
void init(const edm::Event &event, const edm::EventSetup &es)
reco::TrackRef reference_type
size_t RecoTrackSelector::size ( void  ) const
inline

Definition at line 37 of file RecoTrackSelector.h.

References selected_.

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

37 { return selected_.size(); }

Member Data Documentation

container RecoTrackSelector::selected_
private

Definition at line 40 of file RecoTrackSelector.h.

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