CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RunLumiSelector Class Reference

#include <RunLumiSelector.h>

Inheritance diagram for RunLumiSelector:
EventSelector

Public Member Functions

bool operator() (edm::EventBase const &ev, pat::strbitset &ret) override
 
 RunLumiSelector ()
 
 RunLumiSelector (edm::ParameterSet const &params)
 
 RunLumiSelector (edm::ParameterSet const &params, edm::ConsumesCollector &&iC)
 
- Public Member Functions inherited from EventSelector
const std::vector< std::string > & description ()
 
 EventSelector ()
 
 EventSelector (const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iC)
 
 EventSelector (const edm::ParameterSet &iConfig, edm::ConsumesCollector &iC)
 
const std::string & name () const
 name of the module (from configuration) More...
 
virtual bool select (const edm::Event &) const =0
 decision of the selector module More...
 
virtual ~EventSelector ()
 

Private Attributes

std::vector< edm::LuminosityBlockRangelumis_
 

Additional Inherited Members

- Protected Attributes inherited from EventSelector
std::vector< std::string > description_
 
std::string name_
 

Detailed Description

Definition at line 17 of file RunLumiSelector.h.

Constructor & Destructor Documentation

◆ RunLumiSelector() [1/3]

RunLumiSelector::RunLumiSelector ( )
inline

Definition at line 19 of file RunLumiSelector.h.

19 {}

◆ RunLumiSelector() [2/3]

RunLumiSelector::RunLumiSelector ( edm::ParameterSet const &  params,
edm::ConsumesCollector &&  iC 
)
inline

Definition at line 22 of file RunLumiSelector.h.

◆ RunLumiSelector() [3/3]

RunLumiSelector::RunLumiSelector ( edm::ParameterSet const &  params)
inline

Definition at line 25 of file RunLumiSelector.h.

25  {
26  push_back("RunLumi");
27 
28  if (params.exists("lumisToProcess")) {
29  lumis_ = params.getUntrackedParameter<std::vector<edm::LuminosityBlockRange> >("lumisToProcess");
30  set("RunLumi");
31  } else {
32  lumis_.clear();
33  set("RunLumi", false);
34  }
35 
36  retInternal_ = getBitTemplate();
37  }

References lumis_, and CalibrationSummaryClient_cfi::params.

Member Function Documentation

◆ operator()()

bool RunLumiSelector::operator() ( edm::EventBase const &  ev,
pat::strbitset ret 
)
inlineoverride

Definition at line 39 of file RunLumiSelector.h.

39  {
40  if (!ignoreCut("RunLumi")) {
41  bool goodLumi = false;
42  for (std::vector<edm::LuminosityBlockRange>::const_iterator lumisBegin = lumis_.begin(),
43  lumisEnd = lumis_.end(),
44  ilumi = lumisBegin;
45  ilumi != lumisEnd;
46  ++ilumi) {
47  if (ev.id().run() >= ilumi->startRun() && ev.id().run() <= ilumi->endRun() &&
48  ev.id().luminosityBlock() >= ilumi->startLumi() && ev.id().luminosityBlock() <= ilumi->endLumi()) {
49  goodLumi = true;
50  break;
51  }
52  }
53  if (goodLumi)
54  passCut(ret, "RunLumi");
55  } else {
56  passCut(ret, "RunLumi");
57  }
58 
59  setIgnored(ret);
60  return (bool)ret;
61  }

References ev, lumis_, and runTheMatrix::ret.

Member Data Documentation

◆ lumis_

std::vector<edm::LuminosityBlockRange> RunLumiSelector::lumis_
private

Definition at line 66 of file RunLumiSelector.h.

Referenced by operator()(), and RunLumiSelector().

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
RunLumiSelector::RunLumiSelector
RunLumiSelector()
Definition: RunLumiSelector.h:19
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
RunLumiSelector::lumis_
std::vector< edm::LuminosityBlockRange > lumis_
Definition: RunLumiSelector.h:66
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95