Implement a selector given a track or vertex collection and track or vertex classifier. More...
#include <CategoryCriteria.h>
Public Types | |
typedef Collection | collection |
typedef container::const_iterator | const_iterator |
typedef std::vector< const type * > | container |
typedef Collection::value_type | type |
Public Member Functions | |
const_iterator | begin () const |
CategoryCriteria (const edm::ParameterSet &config) | |
const_iterator | end () const |
void | select (const edm::Handle< collection > &collectionHandler, const edm::Event &event, const edm::EventSetup &setup) |
std::size_t | size () const |
Private Attributes | |
Classifier | classifier_ |
StringCutObjectSelector < typename Classifier::Categories > | evaluate_ |
container | selected_ |
Implement a selector given a track or vertex collection and track or vertex classifier.
Definition at line 11 of file CategoryCriteria.h.
typedef Collection CategoryCriteria< Collection, Classifier >::collection |
Definition at line 17 of file CategoryCriteria.h.
typedef container::const_iterator CategoryCriteria< Collection, Classifier >::const_iterator |
Definition at line 26 of file CategoryCriteria.h.
typedef std::vector<const type *> CategoryCriteria< Collection, Classifier >::container |
Definition at line 23 of file CategoryCriteria.h.
typedef Collection::value_type CategoryCriteria< Collection, Classifier >::type |
Definition at line 20 of file CategoryCriteria.h.
CategoryCriteria< Collection, Classifier >::CategoryCriteria | ( | const edm::ParameterSet & | config | ) | [inline] |
Definition at line 29 of file CategoryCriteria.h.
: classifier_(config), evaluate_( config.getParameter<std::string>("cut") ) {}
const_iterator CategoryCriteria< Collection, Classifier >::begin | ( | void | ) | const [inline] |
Definition at line 56 of file CategoryCriteria.h.
References CategoryCriteria< Collection, Classifier >::selected_.
{ return selected_.begin(); }
const_iterator CategoryCriteria< Collection, Classifier >::end | ( | void | ) | const [inline] |
Definition at line 62 of file CategoryCriteria.h.
References CategoryCriteria< Collection, Classifier >::selected_.
{ return selected_.end(); }
void CategoryCriteria< Collection, Classifier >::select | ( | const edm::Handle< collection > & | collectionHandler, |
const edm::Event & | event, | ||
const edm::EventSetup & | setup | ||
) | [inline] |
Definition at line 34 of file CategoryCriteria.h.
References CategoryCriteria< Collection, Classifier >::classifier_, CategoryCriteria< Collection, Classifier >::evaluate_, i, and CategoryCriteria< Collection, Classifier >::selected_.
{ selected_.clear(); // const collection & collectionPointer = *(collectionHandler.product()); classifier_.newEvent(event, setup); for (typename collection::size_type i = 0; i < collectionHandler->size(); ++i) { edm::Ref<Collection> member(collectionHandler, i); classifier_.evaluate(member); // Classifier is evaluated using StringCutObjectSelector if ( evaluate_(classifier_) ) selected_.push_back( &(*member) ); } }
std::size_t CategoryCriteria< Collection, Classifier >::size | ( | void | ) | const [inline] |
Definition at line 68 of file CategoryCriteria.h.
References CategoryCriteria< Collection, Classifier >::selected_.
{ return selected_.size(); }
Classifier CategoryCriteria< Collection, Classifier >::classifier_ [private] |
Definition at line 77 of file CategoryCriteria.h.
Referenced by CategoryCriteria< Collection, Classifier >::select().
StringCutObjectSelector<typename Classifier::Categories> CategoryCriteria< Collection, Classifier >::evaluate_ [private] |
Definition at line 79 of file CategoryCriteria.h.
Referenced by CategoryCriteria< Collection, Classifier >::select().
container CategoryCriteria< Collection, Classifier >::selected_ [private] |