CMS 3D CMS Logo

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

#include <RunHelper.h>

Inheritance diagram for edm::SetRunForEachLumiHelper:
edm::RunHelperBase

Public Member Functions

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

Private Attributes

bool fakeNewRun_
 
bool firstTime_
 
size_t indexOfNextRunNumber_
 
RunNumber_t realRunNumber_
 
std::vector< RunNumber_tsetRunNumberForEachLumi_
 

Additional Inherited Members

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

Detailed Description

Definition at line 62 of file RunHelper.h.

Constructor & Destructor Documentation

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

Definition at line 89 of file RunHelper.cc.

90  : RunHelperBase(),
91  setRunNumberForEachLumi_(pset.getUntrackedParameter<std::vector<unsigned int> >("setRunNumberForEachLumi")),
93  realRunNumber_(0),
94  fakeNewRun_(false),
95  firstTime_(true) {}
RunHelperBase()=default
std::vector< RunNumber_t > setRunNumberForEachLumi_
Definition: RunHelper.h:79
edm::SetRunForEachLumiHelper::~SetRunForEachLumiHelper ( )
override

Definition at line 97 of file RunHelper.cc.

97 {}

Member Function Documentation

void edm::SetRunForEachLumiHelper::checkForNewRun ( RunNumber_t  run)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 131 of file RunHelper.cc.

References Exception, edm::errors::MismatchedInputFiles, realRunNumber_, and writedatasetfile::run.

131  {
132  if (realRunNumber_ != 0 && run != realRunNumber_) {
133  throw Exception(errors::MismatchedInputFiles, "PoolSource::checkForNewRun")
134  << " Parameter 'setRunNumberForEachLumi' can only process a single run.\n"
135  << "but this job is processing more than one run.\n";
136  }
138  }
void edm::SetRunForEachLumiHelper::checkRunConsistency ( RunNumber_t  run,
RunNumber_t  origninalRun 
) const
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 154 of file RunHelper.cc.

References runNumberToUseForThisLumi().

154  {
155  assert(run == runNumberToUseForThisLumi());
156  }
RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:127
bool edm::SetRunForEachLumiHelper::fakeNewRun ( ) const
inlineoverridevirtual
InputSource::ItemType edm::SetRunForEachLumiHelper::nextItemType ( InputSource::ItemType const &  previousItemType,
InputSource::ItemType const &  newIemType 
)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 99 of file RunHelper.cc.

References edm::errors::Configuration, Exception, fakeNewRun_, firstTime_, indexOfNextRunNumber_, edm::InputSource::IsLumi, edm::InputSource::IsRun, edm::errors::MismatchedInputFiles, writedatasetfile::run, setRunNumberForEachLumi_, and mitigatedMETSequence_cff::U.

100  {
101  if (newItemType == InputSource::IsRun ||
102  (newItemType == InputSource::IsLumi && previousItemType != InputSource::IsRun)) {
103  if (firstTime_) {
104  firstTime_ = false;
105  } else {
107  }
109  throw Exception(errors::MismatchedInputFiles, "PoolSource::getNextItemType")
110  << " Parameter 'setRunNumberForEachLumi' has " << setRunNumberForEachLumi_.size() << " entries\n"
111  << "but this job is processing more luminosity blocks than this.\n";
112  }
114  if (run == 0) {
115  throw Exception(errors::Configuration, "PoolSource")
116  << "'setRunNumberForEachLumi' contains an illegal run number of '0'.\n";
117  }
118  bool sameRunNumber = (indexOfNextRunNumber_ != 0U && run == setRunNumberForEachLumi_[indexOfNextRunNumber_ - 1]);
119  if (!sameRunNumber) {
120  fakeNewRun_ = (newItemType != InputSource::IsRun);
121  return InputSource::IsRun;
122  }
123  }
124  return newItemType;
125  }
unsigned int RunNumber_t
std::vector< RunNumber_t > setRunNumberForEachLumi_
Definition: RunHelper.h:79
void edm::SetRunForEachLumiHelper::overrideRunNumber ( EventID event,
bool  isRealData 
)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 146 of file RunHelper.cc.

References edm::errors::Configuration, event(), Exception, and runNumberToUseForThisLumi().

146  {
147  if (isRealData) {
148  throw Exception(errors::Configuration, "SetRunForEachLumiHelper::overrideRunNumber()")
149  << "The 'setRunNumberForEachLumi' parameter of PoolSource cannot be used with real data.\n";
150  }
151  id = EventID(runNumberToUseForThisLumi(), id.luminosityBlock(), id.event());
152  }
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
RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:127
void edm::SetRunForEachLumiHelper::overrideRunNumber ( RunID run)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 140 of file RunHelper.cc.

References runNumberToUseForThisLumi().

140 { id = RunID(runNumberToUseForThisLumi()); }
RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:127
void edm::SetRunForEachLumiHelper::overrideRunNumber ( LuminosityBlockID lumi)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 142 of file RunHelper.cc.

References runNumberToUseForThisLumi().

142  {
143  id = LuminosityBlockID(runNumberToUseForThisLumi(), id.luminosityBlock());
144  }
RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:127
RunNumber_t edm::SetRunForEachLumiHelper::runNumberToUseForThisLumi ( ) const
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 127 of file RunHelper.cc.

References indexOfNextRunNumber_, and setRunNumberForEachLumi_.

Referenced by checkRunConsistency(), and overrideRunNumber().

127  {
129  }
std::vector< RunNumber_t > setRunNumberForEachLumi_
Definition: RunHelper.h:79

Member Data Documentation

bool edm::SetRunForEachLumiHelper::fakeNewRun_
private

Definition at line 82 of file RunHelper.h.

Referenced by nextItemType().

bool edm::SetRunForEachLumiHelper::firstTime_
private

Definition at line 83 of file RunHelper.h.

Referenced by nextItemType().

size_t edm::SetRunForEachLumiHelper::indexOfNextRunNumber_
private

Definition at line 80 of file RunHelper.h.

Referenced by nextItemType(), and runNumberToUseForThisLumi().

RunNumber_t edm::SetRunForEachLumiHelper::realRunNumber_
private

Definition at line 81 of file RunHelper.h.

Referenced by checkForNewRun().

std::vector<RunNumber_t> edm::SetRunForEachLumiHelper::setRunNumberForEachLumi_
private

Definition at line 79 of file RunHelper.h.

Referenced by nextItemType(), and runNumberToUseForThisLumi().