test
CMS 3D CMS Logo

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

virtual void checkRunConsistency (RunNumber_t run, RunNumber_t origninalRun) const override
 
virtual void overrideRunNumber (EventID &event, bool isRealData) override
 
virtual void overrideRunNumber (RunID &run) override
 
virtual void overrideRunNumber (LuminosityBlockID &lumi) override
 
virtual void setForcedRunOffset (RunNumber_t firstRun) override
 
 SetRunHelper (ParameterSet const &pset)
 
virtual ~SetRunHelper ()
 
- 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 43 of file RunHelper.h.

Constructor & Destructor Documentation

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

Definition at line 43 of file RunHelper.cc.

43  :
44  RunHelperBase(),
45  setRun_(pset.getUntrackedParameter<unsigned int>("setRunNumber")),
47  firstTime_(true) {
48  }
RunHelperBase()=default
RunNumber_t setRun_
Definition: RunHelper.h:56
edm::SetRunHelper::~SetRunHelper ( )
virtual

Definition at line 50 of file RunHelper.cc.

50 {}

Member Function Documentation

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

Reimplemented from edm::RunHelperBase.

Definition at line 92 of file RunHelper.cc.

References assert(), and forcedRunOffset_.

92  {
93  assert(run == originalRun + forcedRunOffset_);
94  }
assert(m_qm.get())
void edm::SetRunHelper::overrideRunNumber ( EventID event,
bool  isRealData 
)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 80 of file RunHelper.cc.

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

80  {
81  if(isRealData) {
82  throw Exception(errors::Configuration, "SetRunHelper::overrideRunNumber()")
83  << "The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
84  }
85  id = EventID(id.run() + forcedRunOffset_, id.luminosityBlock(), id.event());
86  if(RunID(id.run()) < RunID::firstValidRun()) {
87  id = EventID(RunID::firstValidRun().run(), LuminosityBlockID::firstValidLuminosityBlock().luminosityBlock(), id.event());
88  }
89  }
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 68 of file RunHelper.cc.

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

68  {
69  id = RunID(id.run() + forcedRunOffset_);
71  }
static RunID firstValidRun()
Definition: RunID.h:77
void edm::SetRunHelper::overrideRunNumber ( LuminosityBlockID lumi)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 74 of file RunHelper.cc.

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

74  {
75  id = LuminosityBlockID(id.run() + forcedRunOffset_, id.luminosityBlock());
76  if(RunID(id.run()) < RunID::firstValidRun()) id = LuminosityBlockID(RunID::firstValidRun().run(), id.luminosityBlock());
77  }
static RunID firstValidRun()
Definition: RunID.h:77
void edm::SetRunHelper::setForcedRunOffset ( RunNumber_t  firstRun)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 53 of file RunHelper.cc.

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

53  {
54  if(firstTime_ && setRun_ != 0) {
56  if(forcedRunOffset_ < 0) {
58  << "The value of the 'setRunNumber' parameter must not be\n"
59  << "less than the first run number in the first input file.\n"
60  << "'setRunNumber' was " << setRun_ <<", while the first run was "
61  << firstRun << ".\n";
62  }
63  }
64  firstTime_ = false;
65  }
string firstRun
Definition: dataset.py:924
RunNumber_t setRun_
Definition: RunHelper.h:56

Member Data Documentation

bool edm::SetRunHelper::firstTime_
private

Definition at line 58 of file RunHelper.h.

Referenced by setForcedRunOffset().

int edm::SetRunHelper::forcedRunOffset_
private

Definition at line 57 of file RunHelper.h.

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

RunNumber_t edm::SetRunHelper::setRun_
private

Definition at line 56 of file RunHelper.h.

Referenced by setForcedRunOffset().