CMS 3D CMS Logo

Public Member Functions | Private Attributes

OverlapExclusionSelector< C, T, O > Class Template Reference

#include <OverlapExclusionSelector.h>

List of all members.

Public Member Functions

void newEvent (const edm::Event &, const edm::EventSetup &) const
bool operator() (const T &) const
 OverlapExclusionSelector (const edm::ParameterSet &)

Private Attributes

C::const_iterator begin_
C::const_iterator end_
overlap_
edm::InputTag src_

Detailed Description

template<typename C, typename T, typename O>
class OverlapExclusionSelector< C, T, O >

Definition at line 11 of file OverlapExclusionSelector.h.


Constructor & Destructor Documentation

template<typename C , typename T , typename O >
OverlapExclusionSelector< C, T, O >::OverlapExclusionSelector ( const edm::ParameterSet cfg)

Definition at line 23 of file OverlapExclusionSelector.h.

                                                                                      :
  src_(cfg.template getParameter<edm::InputTag>("overlap")),
  overlap_(cfg) {
}

Member Function Documentation

template<typename C , typename T , typename O >
void OverlapExclusionSelector< C, T, O >::newEvent ( const edm::Event evt,
const edm::EventSetup  
) const

Definition at line 29 of file OverlapExclusionSelector.h.

References edm::Event::getByLabel(), and h.

                                                                                                       {
  edm::Handle<C> h;
  evt.getByLabel(src_, h);
  begin_ = h->begin();
  end_ = h->end();
}
template<typename C , typename T , typename O >
bool OverlapExclusionSelector< C, T, O >::operator() ( const T t) const

Definition at line 37 of file OverlapExclusionSelector.h.

References i.

                                                                   {
  bool noOverlap = true;
  for(typename C::const_iterator i = begin_; i != end_; ++i) {
    if(overlap_(*i, t)) {
      noOverlap = false;
      break;
    } 
  }
  return noOverlap;
}

Member Data Documentation

template<typename C , typename T , typename O >
C::const_iterator OverlapExclusionSelector< C, T, O >::begin_ [mutable, private]

Definition at line 18 of file OverlapExclusionSelector.h.

template<typename C , typename T , typename O >
C::const_iterator OverlapExclusionSelector< C, T, O >::end_ [mutable, private]

Definition at line 18 of file OverlapExclusionSelector.h.

template<typename C , typename T , typename O >
O OverlapExclusionSelector< C, T, O >::overlap_ [private]

Definition at line 19 of file OverlapExclusionSelector.h.

template<typename C , typename T , typename O >
edm::InputTag OverlapExclusionSelector< C, T, O >::src_ [private]

Definition at line 17 of file OverlapExclusionSelector.h.