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

virtual void checkForNewRun (RunNumber_t run) override
 
virtual void checkRunConsistency (RunNumber_t run, RunNumber_t origninalRun) const override
 
virtual bool fakeNewRun () const override
 
virtual InputSource::ItemType nextItemType (InputSource::ItemType const &previousItemType, InputSource::ItemType const &newIemType) override
 
virtual void overrideRunNumber (EventID &event, bool isRealData) override
 
virtual void overrideRunNumber (RunID &run) override
 
virtual void overrideRunNumber (LuminosityBlockID &lumi) override
 
virtual RunNumber_t runNumberToUseForThisLumi () const override
 
 SetRunForEachLumiHelper (ParameterSet const &pset)
 
virtual ~SetRunForEachLumiHelper ()
 
- 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 61 of file RunHelper.h.

Constructor & Destructor Documentation

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

Definition at line 96 of file RunHelper.cc.

96  :
97  RunHelperBase(),
98  setRunNumberForEachLumi_(pset.getUntrackedParameter<std::vector<unsigned int> >("setRunNumberForEachLumi")),
100  realRunNumber_(0),
101  fakeNewRun_(false),
102  firstTime_(true) {
103  }
RunHelperBase()=default
std::vector< RunNumber_t > setRunNumberForEachLumi_
Definition: RunHelper.h:79
edm::SetRunForEachLumiHelper::~SetRunForEachLumiHelper ( )
virtual

Definition at line 105 of file RunHelper.cc.

105 {}

Member Function Documentation

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

Reimplemented from edm::RunHelperBase.

Definition at line 140 of file RunHelper.cc.

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

140  {
141  if(realRunNumber_ != 0 && run != realRunNumber_) {
142  throw Exception(errors::MismatchedInputFiles, "PoolSource::checkForNewRun")
143  << " Parameter 'setRunNumberForEachLumi' can only process a single run.\n"
144  << "but this job is processing more than one run.\n";
145  }
147  }
void edm::SetRunForEachLumiHelper::checkRunConsistency ( RunNumber_t  run,
RunNumber_t  origninalRun 
) const
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 169 of file RunHelper.cc.

References runNumberToUseForThisLumi().

169  {
170  assert(run == runNumberToUseForThisLumi());
171  }
virtual RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:135
virtual 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 108 of file RunHelper.cc.

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

108  {
109  if(newItemType == InputSource::IsRun || (newItemType == InputSource::IsLumi && previousItemType != InputSource::IsRun)) {
110  if(firstTime_) {
111  firstTime_ = false;
112  } else {
114  }
116  throw Exception(errors::MismatchedInputFiles, "PoolSource::getNextItemType")
117  << " Parameter 'setRunNumberForEachLumi' has " << setRunNumberForEachLumi_.size() << " entries\n"
118  << "but this job is processing more luminosity blocks than this.\n";
119  }
121  if(run == 0) {
122  throw Exception(errors::Configuration, "PoolSource") <<
123  "'setRunNumberForEachLumi' contains an illegal run number of '0'.\n";
124  }
125  bool sameRunNumber = (indexOfNextRunNumber_ != 0U && run == setRunNumberForEachLumi_[indexOfNextRunNumber_ - 1]);
126  if(!sameRunNumber) {
127  fakeNewRun_ = (newItemType != InputSource::IsRun);
128  return InputSource::IsRun;
129  }
130  }
131  return newItemType;
132  }
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 160 of file RunHelper.cc.

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

160  {
161  if(isRealData) {
162  throw Exception(errors::Configuration, "SetRunForEachLumiHelper::overrideRunNumber()")
163  << "The 'setRunNumberForEachLumi' parameter of PoolSource cannot be used with real data.\n";
164  }
165  id = EventID(runNumberToUseForThisLumi(), id.luminosityBlock(), id.event());
166  }
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
virtual RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:135
void edm::SetRunForEachLumiHelper::overrideRunNumber ( RunID run)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 150 of file RunHelper.cc.

References runNumberToUseForThisLumi().

150  {
151  id = RunID(runNumberToUseForThisLumi());
152  }
virtual RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:135
void edm::SetRunForEachLumiHelper::overrideRunNumber ( LuminosityBlockID lumi)
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 155 of file RunHelper.cc.

References runNumberToUseForThisLumi().

155  {
156  id = LuminosityBlockID(runNumberToUseForThisLumi(), id.luminosityBlock());
157  }
virtual RunNumber_t runNumberToUseForThisLumi() const override
Definition: RunHelper.cc:135
RunNumber_t edm::SetRunForEachLumiHelper::runNumberToUseForThisLumi ( ) const
overridevirtual

Reimplemented from edm::RunHelperBase.

Definition at line 135 of file RunHelper.cc.

References indexOfNextRunNumber_, and setRunNumberForEachLumi_.

Referenced by checkRunConsistency(), and overrideRunNumber().

135  {
137  }
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().