CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::LuminosityBlockRange
lumis_
 

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::RunLumiSelector ( )
inline

Definition at line 19 of file RunLumiSelector.h.

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

Definition at line 25 of file RunLumiSelector.h.

References edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameter(), lumis_, 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

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

Definition at line 39 of file RunLumiSelector.h.

References edm::EventBase::id(), edm::EventID::luminosityBlock(), lumis_, runTheMatrix::ret, and edm::EventID::run().

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_
tuple ret
prodAgent to be discontinued

Member Data Documentation

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

Definition at line 66 of file RunLumiSelector.h.

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