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, edm::ConsumesCollector &&iC)
 
 RunLumiSelector (edm::ParameterSet const &params)
 
- 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

◆ RunLumiSelector() [3/3]

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

Definition at line 25 of file RunLumiSelector.h.

References lumis_, submitPVValidationJobs::params, and push_back().

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  }
std::vector< edm::LuminosityBlockRange > lumis_
deadvectors [0] push_back({0.0175431, 0.538005, 6.80997, 13.29})

Member Function Documentation

◆ operator()()

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

Definition at line 39 of file RunLumiSelector.h.

References makeMEIFBenchmarkPlots::ev, lumis_, and runTheMatrix::ret.

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  }
std::vector< edm::LuminosityBlockRange > lumis_
ret
prodAgent to be discontinued

Member Data Documentation

◆ lumis_

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

Definition at line 66 of file RunLumiSelector.h.

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