Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
CommonTools
UtilAlgos
interface
OverlapExclusionSelector.h
Go to the documentation of this file.
1
#ifndef CommonTools_UtilAlgos_OverlapExclusionSelector_h
2
#define CommonTools_UtilAlgos_OverlapExclusionSelector_h
3
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
4
#include "
FWCore/Utilities/interface/InputTag.h
"
5
#include "
FWCore/Framework/interface/Event.h
"
6
#include "
DataFormats/Common/interface/Handle.h
"
7
8
namespace
edm {
class
EventSetup
; }
9
10
template
<
typename
C,
typename
T,
typename
O>
11
class
OverlapExclusionSelector
{
12
public
:
13
OverlapExclusionSelector
(
const
edm::ParameterSet
&);
14
void
newEvent
(
const
edm::Event
&,
const
edm::EventSetup
&)
const
;
15
bool
operator()
(
const
T
&)
const
;
16
private
:
17
edm::InputTag
src_
;
18
mutable
typename
C::const_iterator
begin_
,
end_
;
19
O
overlap_
;
20
};
21
22
template
<
typename
C,
typename
T,
typename
O>
23
OverlapExclusionSelector<C, T, O>::OverlapExclusionSelector
(
const
edm::ParameterSet
& cfg) :
24
src_(cfg.
template
getParameter<edm::InputTag>(
"overlap"
)),
25
overlap_(cfg) {
26
}
27
28
template
<
typename
C,
typename
T,
typename
O>
29
void
OverlapExclusionSelector<C, T, O>::newEvent
(
const
edm::Event
& evt,
const
edm::EventSetup
&)
const
{
30
edm::Handle<C>
h
;
31
evt.
getByLabel
(src_, h);
32
begin_ = h->begin();
33
end_ = h->end();
34
}
35
36
template
<
typename
C,
typename
T,
typename
O>
37
bool
OverlapExclusionSelector<C, T, O>::operator()
(
const
T
&
t
)
const
{
38
bool
noOverlap =
true
;
39
for
(
typename
C::const_iterator
i
= begin_;
i
!= end_; ++
i
) {
40
if
(overlap_(*
i
, t)) {
41
noOverlap =
false
;
42
break
;
43
}
44
}
45
return
noOverlap;
46
}
47
48
#include "
CommonTools/UtilAlgos/interface/EventSetupInitTrait.h
"
49
50
EVENTSETUP_STD_INIT_T3
(
OverlapExclusionSelector
);
51
52
#endif
i
int i
Definition:
DBlmapReader.cc:9
OverlapExclusionSelector::operator()
bool operator()(const T &) const
Definition:
OverlapExclusionSelector.h:37
lumiQTWidget.t
tuple t
Definition:
lumiQTWidget.py:50
OverlapExclusionSelector::src_
edm::InputTag src_
Definition:
OverlapExclusionSelector.h:17
Event.h
OverlapExclusionSelector
Definition:
OverlapExclusionSelector.h:11
Handle.h
edm::Handle
Definition:
AssociativeIterator.h:48
ParameterSet.h
OverlapExclusionSelector::newEvent
void newEvent(const edm::Event &, const edm::EventSetup &) const
Definition:
OverlapExclusionSelector.h:29
OverlapExclusionSelector::end_
C::const_iterator end_
Definition:
OverlapExclusionSelector.h:18
EventSetup
OverlapExclusionSelector::OverlapExclusionSelector
OverlapExclusionSelector(const edm::ParameterSet &)
Definition:
OverlapExclusionSelector.h:23
OverlapExclusionSelector::begin_
C::const_iterator begin_
Definition:
OverlapExclusionSelector.h:18
edm::EventSetup
Definition:
EventSetup.h:44
edm::Event::getByLabel
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition:
Event.h:361
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition:
Activities.doc:4
edm::InputTag
Definition:
InputTag.h:17
InputTag.h
edm::ParameterSet
Definition:
ParameterSet.h:35
edm::Event
Definition:
Event.h:56
T
long double T
Definition:
Basic3DVectorLD.h:59
OverlapExclusionSelector::overlap_
O overlap_
Definition:
OverlapExclusionSelector.h:19
EventSetupInitTrait.h
svgfig.template
def template
Definition:
svgfig.py:520
EVENTSETUP_STD_INIT_T3
EVENTSETUP_STD_INIT_T3(OverlapExclusionSelector)
Generated for CMSSW Reference Manual by
1.8.5