13 if (
pset.exists(
"setRunNumber")) {
16 return std::make_unique<SetRunHelper>(
pset);
19 if (
pset.exists(
"setRunNumberForEachLumi")) {
20 std::vector<RunNumber_t>
runs =
pset.getUntrackedParameter<std::vector<unsigned int>>(
"setRunNumberForEachLumi");
22 return std::make_unique<SetRunForEachLumiHelper>(
pset);
25 if (
pset.exists(
"firstLuminosityBlockForEachRun")) {
26 if (not
pset.getUntrackedParameter<std::vector<LuminosityBlockID>>(
"firstLuminosityBlockForEachRun").empty()) {
27 return std::make_unique<FirstLuminosityBlockForEachRunHelper>(
pset);
30 return std::make_unique<DefaultRunHelper>();
47 setRun_(
pset.getUntrackedParameter<unsigned
int>(
"setRunNumber")),
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 " <<
firstRun <<
".\n";
81 <<
"The 'setRunNumber' parameter of PoolSource cannot be used with real data.\n";
96 setRunNumberForEachLumi_(
pset.getUntrackedParameter<
std::
vector<unsigned
int>>(
"setRunNumberForEachLumi")),
97 indexOfNextRunNumber_(0),
119 <<
"but this job is processing more luminosity blocks than this.\n";
124 <<
"'setRunNumberForEachLumi' contains an illegal run number of '0'.\n";
127 if (!sameRunNumber) {
142 <<
" Parameter 'setRunNumberForEachLumi' can only process a single run.\n" 143 <<
"but this job is processing more than one run.\n";
157 <<
"The 'setRunNumberForEachLumi' parameter of PoolSource cannot be used with real data.\n";
169 lastUsedRunNumber_{0},
170 fakeNewRun_{
false} {}
181 <<
"'firstLuminosityBlockForEachRun' contains an illegal run number of '0'.\n";
197 <<
" Parameter 'firstLuminosityBlockForEachRun' can only process a single run.\n" 198 <<
"but this job is processing more than one run.\n";
214 <<
"The 'firstLuminosityBlockForEachRun' parameter of PoolSource cannot be used with real data.\n";
226 if (lumiID.luminosityBlock() >
iLumi) {
233 <<
"The 'firstLuminosityBlockForEachRun' parameter does not have a matching Run number for LuminosityBlock " 243 "setRunNumberForEachLumi", std::vector<unsigned int>(),
false) xor
245 "firstLuminosityBlockForEachRun", std::vector<LuminosityBlockID>(),
false),
248 "If 'setRun' is non-zero, change number of first run to this number. Apply same offset to all runs." 249 "If 'setRunNumberForEachLumi' is non-empty, use these as run numbers for each lumi respectively." 250 "If 'firstLuminosityBlockForEachRun' is non-empty, the LuminosityBlock ID is used to determine which Run " 251 "ID to use. The entries must be ascending values of LuminosityBlock ID." 252 "''setRun', 'setRunNumberForEachLumi' and 'firstLuminosityBlockForEachRun' are mutually exclusive and " 253 "allowed only for simulation.");
RunNumber_t realRunNumber_
size_t indexOfNextRunNumber_
static LuminosityBlockID firstValidLuminosityBlock()
virtual void checkLumiConsistency(LuminosityBlockNumber_t lumi, LuminosityBlockNumber_t origninalLumi) const
void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const override
void setForcedRunOffset(RunNumber_t firstRun) override
void checkForNewRun(RunNumber_t run, LuminosityBlockNumber_t nextLumi) override
static void fillDescription(ParameterSetDescription &desc)
void overrideRunNumber(EventID &event, bool isRealData) override
InputSource::ItemType nextItemType(InputSource::ItemType const &previousItemType, InputSource::ItemType const &newIemType, RunNumber_t, LuminosityBlockNumber_t, EventNumber_t) override
unsigned long long EventNumber_t
static RunID firstValidRun()
unsigned int LuminosityBlockNumber_t
RunNumber_t realRunNumber_
void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const override
SetRunHelper(ParameterSet const &pset)
std::vector< edm::LuminosityBlockID > const lumiToRun_
RunNumber_t findRunFromLumi(LuminosityBlockNumber_t) const
void overrideRunNumber(EventID &event, bool isRealData) override
virtual void checkRunConsistency(RunNumber_t run, RunNumber_t origninalRun) const
~DefaultRunHelper() override
std::unique_ptr< RunHelperBase > makeRunHelper(ParameterSet const &pset)
FirstLuminosityBlockForEachRunHelper(ParameterSet const &pset)
SetRunForEachLumiHelper(ParameterSet const &pset)
InputSource::ItemType nextItemType(InputSource::ItemType const &previousItemType, InputSource::ItemType const &newIemType, RunNumber_t, LuminosityBlockNumber_t, EventNumber_t) override
void checkForNewRun(RunNumber_t run, LuminosityBlockNumber_t nextLumi) override
~SetRunForEachLumiHelper() override
RunNumber_t runNumberToUseForThisLumi() const override
RunNumber_t runNumberToUseForThisLumi() const override
void checkRunConsistency(RunNumber_t run, RunNumber_t originalRun) const override
RunNumber_t lastUsedRunNumber_
std::vector< RunNumber_t > setRunNumberForEachLumi_
void overrideRunNumber(EventID &event, bool isRealData) override