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 | Private Attributes
RecoTrackViewRefSelector Class Reference

#include <RecoTrackViewRefSelector.h>

Inheritance diagram for RecoTrackViewRefSelector:
RecoTrackSelectorBase

Public Types

typedef edm::View< reco::Trackcollection
 
typedef
ref_container::const_iterator 
const_ref_iterator
 
typedef edm::RefToBaseVector
< reco::Track
ref_container
 

Public Member Functions

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

Private Attributes

ref_container ref_selected_
 

Detailed Description

Definition at line 7 of file RecoTrackViewRefSelector.h.

Member Typedef Documentation

Definition at line 9 of file RecoTrackViewRefSelector.h.

Definition at line 11 of file RecoTrackViewRefSelector.h.

Definition at line 10 of file RecoTrackViewRefSelector.h.

Constructor & Destructor Documentation

RecoTrackViewRefSelector::RecoTrackViewRefSelector ( )
inline

Constructors.

Definition at line 14 of file RecoTrackViewRefSelector.h.

14 {}
RecoTrackViewRefSelector::RecoTrackViewRefSelector ( const edm::ParameterSet cfg,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 16 of file RecoTrackViewRefSelector.h.

Member Function Documentation

const_ref_iterator RecoTrackViewRefSelector::begin ( void  ) const
inline

Definition at line 18 of file RecoTrackViewRefSelector.h.

References edm::RefToBaseVector< T >::begin(), and ref_selected_.

18 { return ref_selected_.begin(); }
const_iterator begin() const
const_ref_iterator RecoTrackViewRefSelector::end ( void  ) const
inline

Definition at line 19 of file RecoTrackViewRefSelector.h.

References edm::RefToBaseVector< T >::end(), and ref_selected_.

19 { return ref_selected_.end(); }
const_iterator end() const
void RecoTrackViewRefSelector::select ( const edm::Handle< collection > &  c,
const edm::Event event,
const edm::EventSetup es 
)
inline

Definition at line 21 of file RecoTrackViewRefSelector.h.

References edm::RefToBaseVector< T >::clear(), i, RecoTrackSelectorBase::init(), edm::RefToBaseVector< T >::push_back(), and ref_selected_.

Referenced by Vispa.Views.AbstractView.AbstractView::restoreSelection().

21  {
22  init(event, es);
24  for (unsigned int i = 0; i < c->size(); i++) {
25  auto trk = c->refAt(i);
26  if ( operator()(*trk) ) {
27  ref_selected_.push_back( trk );
28  }
29  }
30  }
int i
Definition: DBlmapReader.cc:9
void init(const edm::Event &event, const edm::EventSetup &es)
void push_back(const RefToBase< T > &)
size_t RecoTrackViewRefSelector::size ( void  ) const
inline

Definition at line 32 of file RecoTrackViewRefSelector.h.

References ref_selected_, and edm::RefToBaseVector< T >::size().

32 { return ref_selected_.size(); }
size_type size() const

Member Data Documentation

ref_container RecoTrackViewRefSelector::ref_selected_
private

Definition at line 35 of file RecoTrackViewRefSelector.h.

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