CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
edm::SetRunHelper Class Reference

#include <RunHelper.h>

Inheritance diagram for edm::SetRunHelper:
edm::RunHelperBase

Public Member Functions

void checkRunConsistency (RunNumber_t run, RunNumber_t origninalRun) const override
 
void overrideRunNumber (EventID &event, bool isRealData) override
 
void overrideRunNumber (RunID &run) override
 
void overrideRunNumber (LuminosityBlockID &lumi) override
 
void setForcedRunOffset (RunNumber_t firstRun) override
 
 SetRunHelper (ParameterSet const &pset)
 
 ~SetRunHelper () override
 
- Public Member Functions inherited from edm::RunHelperBase
virtual void checkForNewRun (RunNumber_t run)
 
virtual void checkLumiConsistency (LuminosityBlockNumber_t lumi, LuminosityBlockNumber_t origninalLumi) const
 
virtual bool fakeNewRun () const
 
virtual InputSource::ItemType nextItemType (InputSource::ItemType const &previousItemType, InputSource::ItemType const &newItemType)
 
 RunHelperBase ()=default
 
virtual RunNumber_t runNumberToUseForThisLumi () const
 
virtual ~RunHelperBase ()
 

Private Attributes

bool firstTime_
 
int forcedRunOffset_
 
RunNumber_t setRun_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::RunHelperBase
static void fillDescription (ParameterSetDescription &desc)
 

Detailed Description

Definition at line 44 of file RunHelper.h.

Constructor & Destructor Documentation

edm::SetRunHelper::SetRunHelper ( ParameterSet const &  pset)
explicit

Definition at line 40 of file RunHelper.cc.

41  : RunHelperBase(),
42  setRun_(pset.getUntrackedParameter<unsigned int>("setRunNumber")),
44  firstTime_(true) {}
RunHelperBase()=default
RunNumber_t setRun_
Definition: RunHelper.h:57
edm::SetRunHelper::~SetRunHelper ( )
override

Definition at line 46 of file RunHelper.cc.

46 {}

Member Function Documentation

void edm::SetRunHelper::checkRunConsistency ( RunNumber_t  run,
RunNumber_t  origninalRun 
) const
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 85 of file RunHelper.cc.

References forcedRunOffset_.

85  {
86  assert(run == originalRun + forcedRunOffset_);
87  }
void edm::SetRunHelper::overrideRunNumber ( EventID event,
bool  isRealData 
)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 73 of file RunHelper.cc.

References edm::errors::Configuration, event(), Exception, edm::LuminosityBlockID::firstValidLuminosityBlock(), edm::RunID::firstValidRun(), forcedRunOffset_, and writedatasetfile::run.

73  {
74  if (isRealData) {
75  throw Exception(errors::Configuration, "SetRunHelper::overrideRunNumber()")
76  << "The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
77  }
78  id = EventID(id.run() + forcedRunOffset_, id.luminosityBlock(), id.event());
79  if (RunID(id.run()) < RunID::firstValidRun()) {
80  id = EventID(
82  }
83  }
static LuminosityBlockID firstValidLuminosityBlock()
static RunID firstValidRun()
Definition: RunID.h:77
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void edm::SetRunHelper::overrideRunNumber ( RunID run)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 61 of file RunHelper.cc.

References edm::RunID::firstValidRun(), forcedRunOffset_, and writedatasetfile::run.

61  {
62  id = RunID(id.run() + forcedRunOffset_);
63  if (id < RunID::firstValidRun())
64  id = RunID::firstValidRun();
65  }
static RunID firstValidRun()
Definition: RunID.h:77
void edm::SetRunHelper::overrideRunNumber ( LuminosityBlockID lumi)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 67 of file RunHelper.cc.

References edm::RunID::firstValidRun(), forcedRunOffset_, and writedatasetfile::run.

67  {
68  id = LuminosityBlockID(id.run() + forcedRunOffset_, id.luminosityBlock());
69  if (RunID(id.run()) < RunID::firstValidRun())
70  id = LuminosityBlockID(RunID::firstValidRun().run(), id.luminosityBlock());
71  }
static RunID firstValidRun()
Definition: RunID.h:77
void edm::SetRunHelper::setForcedRunOffset ( RunNumber_t  firstRun)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 48 of file RunHelper.cc.

References edm::errors::Configuration, Exception, dataset::firstRun, firstTime_, forcedRunOffset_, and setRun_.

48  {
49  if (firstTime_ && setRun_ != 0) {
51  if (forcedRunOffset_ < 0) {
53  << "The value of the 'setRunNumber' parameter must not be\n"
54  << "less than the first run number in the first input file.\n"
55  << "'setRunNumber' was " << setRun_ << ", while the first run was " << firstRun << ".\n";
56  }
57  }
58  firstTime_ = false;
59  }
RunNumber_t setRun_
Definition: RunHelper.h:57
firstRun
Definition: dataset.py:940

Member Data Documentation

bool edm::SetRunHelper::firstTime_
private

Definition at line 59 of file RunHelper.h.

Referenced by setForcedRunOffset().

int edm::SetRunHelper::forcedRunOffset_
private

Definition at line 58 of file RunHelper.h.

Referenced by checkRunConsistency(), overrideRunNumber(), and setForcedRunOffset().

RunNumber_t edm::SetRunHelper::setRun_
private

Definition at line 57 of file RunHelper.h.

Referenced by setForcedRunOffset().