CMS 3D CMS Logo

OverlapExclusionSelector.h
Go to the documentation of this file.
1 #ifndef CommonTools_UtilAlgos_OverlapExclusionSelector_h
2 #define CommonTools_UtilAlgos_OverlapExclusionSelector_h
8 
9 namespace edm {
10  class EventSetup;
11 }
12 
13 template <typename C, typename T, typename O>
15 public:
19  void newEvent(const edm::Event&, const edm::EventSetup&) const;
20  bool operator()(const T&) const;
21 
22 private:
24  mutable typename C::const_iterator begin_, end_;
26 };
27 
28 template <typename C, typename T, typename O>
30  : srcToken_(iC.consumes<C>(cfg.template getParameter<edm::InputTag>("overlap"))), overlap_(cfg) {}
31 
32 template <typename C, typename T, typename O>
35  evt.getByToken(srcToken_, h);
36  begin_ = h->begin();
37  end_ = h->end();
38 }
39 
40 template <typename C, typename T, typename O>
42  bool noOverlap = true;
43  for (typename C::const_iterator i = begin_; i != end_; ++i) {
44  if (overlap_(*i, t)) {
45  noOverlap = false;
46  break;
47  }
48  }
49  return noOverlap;
50 }
51 
53 
55 
56 #endif
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
OverlapExclusionSelector
Definition: OverlapExclusionSelector.h:14
edm::EDGetTokenT< C >
edm
HLT enums.
Definition: AlignableModifier.h:19
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
OverlapExclusionSelector::operator()
bool operator()(const T &) const
Definition: OverlapExclusionSelector.h:41
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89281
OverlapExclusionSelector::newEvent
void newEvent(const edm::Event &, const edm::EventSetup &) const
Definition: OverlapExclusionSelector.h:33
EventSetupInitTrait.h
edm::Handle
Definition: AssociativeIterator.h:50
EVENTSETUP_STD_INIT_T3
#define EVENTSETUP_STD_INIT_T3(SELECTOR)
Definition: EventSetupInitTrait.h:136
OverlapExclusionSelector::srcToken_
edm::EDGetTokenT< C > srcToken_
Definition: OverlapExclusionSelector.h:23
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:535
h
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
OverlapExclusionSelector::overlap_
O overlap_
Definition: OverlapExclusionSelector.h:25
edm::EventSetup
Definition: EventSetup.h:58
svgfig.template
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
InputTag.h
looper.cfg
cfg
Definition: looper.py:297
gen::C
C
Definition: PomwigHadronizer.cc:78
T
long double T
Definition: Basic3DVectorLD.h:48
OverlapExclusionSelector::begin_
C::const_iterator begin_
Definition: OverlapExclusionSelector.h:24
OverlapExclusionSelector::end_
C::const_iterator end_
Definition: OverlapExclusionSelector.h:24
ConsumesCollector.h
EventSetup
ParameterSet.h
OverlapExclusionSelector::OverlapExclusionSelector
OverlapExclusionSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
Definition: OverlapExclusionSelector.h:16
edm::Event
Definition: Event.h:73
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::ConsumesCollector
Definition: ConsumesCollector.h:45