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

Definition at line 19 of file RunLumiSelector.h.

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

Definition at line 22 of file RunLumiSelector.h.

22  :
23  RunLumiSelector( params )
24  {}
RunLumiSelector::RunLumiSelector ( edm::ParameterSet const &  params)
inline

Definition at line 27 of file RunLumiSelector.h.

References edm::ParameterSet::exists(), edm::ParameterSet::getUntrackedParameter(), and lumis_.

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

Member Function Documentation

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

Definition at line 43 of file RunLumiSelector.h.

References edm::EventBase::id(), edm::EventID::luminosityBlock(), lumis_, Utilities::operator, and edm::EventID::run().

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

Member Data Documentation

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

Definition at line 69 of file RunLumiSelector.h.

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