CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
OverlapExclusionSelector< C, T, O > Class Template Reference

#include <OverlapExclusionSelector.h>

Public Member Functions

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

Private Attributes

C::const_iterator begin_
 
C::const_iterator end_
 
overlap_
 
edm::EDGetTokenT< C > srcToken_
 

Detailed Description

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

Definition at line 12 of file OverlapExclusionSelector.h.

Constructor & Destructor Documentation

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

Definition at line 14 of file OverlapExclusionSelector.h.

References looper::cfg.

14  :
15  OverlapExclusionSelector(cfg, iC) {};
OverlapExclusionSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
template<typename C , typename T , typename O >
OverlapExclusionSelector< C, T, O >::OverlapExclusionSelector ( const edm::ParameterSet cfg,
edm::ConsumesCollector iC 
)

Definition at line 26 of file OverlapExclusionSelector.h.

26  :
27  srcToken_(iC.consumes<C>(cfg.template getParameter<edm::InputTag>("overlap"))),
28  overlap_(cfg) {
29 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< C > srcToken_

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 32 of file OverlapExclusionSelector.h.

References OverlapExclusionSelector< C, T, O >::begin_, OverlapExclusionSelector< C, T, O >::end_, edm::Event::getByToken(), h, and OverlapExclusionSelector< C, T, O >::srcToken_.

32  {
34  evt.getByToken(srcToken_, h);
35  begin_ = h->begin();
36  end_ = h->end();
37 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
edm::EDGetTokenT< C > srcToken_
template<typename C , typename T , typename O >
bool OverlapExclusionSelector< C, T, O >::operator() ( const T t) const

Definition at line 40 of file OverlapExclusionSelector.h.

References OverlapExclusionSelector< C, T, O >::begin_, OverlapExclusionSelector< C, T, O >::end_, mps_fire::i, and OverlapExclusionSelector< C, T, O >::overlap_.

40  {
41  bool noOverlap = true;
42  for(typename C::const_iterator i = begin_; i != end_; ++i) {
43  if(overlap_(*i, t)) {
44  noOverlap = false;
45  break;
46  }
47  }
48  return noOverlap;
49 }

Member Data Documentation

template<typename C , typename T , typename O >
C::const_iterator OverlapExclusionSelector< C, T, O >::begin_
mutableprivate
template<typename C , typename T , typename O >
C::const_iterator OverlapExclusionSelector< C, T, O >::end_
mutableprivate
template<typename C , typename T , typename O >
O OverlapExclusionSelector< C, T, O >::overlap_
private
template<typename C , typename T , typename O >
edm::EDGetTokenT<C> OverlapExclusionSelector< C, T, O >::srcToken_
private