CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OverlapExclusionSelector.h
Go to the documentation of this file.
1 #ifndef CommonTools_UtilAlgos_OverlapExclusionSelector_h
2 #define CommonTools_UtilAlgos_OverlapExclusionSelector_h
7 
8 namespace edm { class EventSetup; }
9 
10 template<typename C, typename T, typename O>
12 public:
14  void newEvent(const edm::Event&, const edm::EventSetup&) const;
15  bool operator()(const T&) const;
16 private:
18  mutable typename C::const_iterator begin_, end_;
20 };
21 
22 template<typename C, typename T, typename O>
24  src_(cfg.template getParameter<edm::InputTag>("overlap")),
25  overlap_(cfg) {
26 }
27 
28 template<typename C, typename T, typename O>
31  evt.getByLabel(src_, h);
32  begin_ = h->begin();
33  end_ = h->end();
34 }
35 
36 template<typename C, typename T, typename O>
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 
49 
51 
52 #endif
int i
Definition: DBlmapReader.cc:9
bool operator()(const T &) const
void newEvent(const edm::Event &, const edm::EventSetup &) const
OverlapExclusionSelector(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
long double T
def template
Definition: svgfig.py:520
EVENTSETUP_STD_INIT_T3(OverlapExclusionSelector)