13 firstRun_(pset.getUntrackedParameter<unsigned
int>(
"firstRun", 1
U)),
14 firstLumi_(pset.getUntrackedParameter<unsigned
int>(
"firstLuminosityBlock", 0
U)),
15 firstEvent_(pset.existsAs<unsigned
int>(
"firstEvent",
false) ? pset.getUntrackedParameter<unsigned
int>(
"firstEvent") :
16 pset.getUntrackedParameter<unsigned long long>(
"firstEvent", 1
U)),
21 skippingLumis_(!(whichLumisToSkip_.
empty() && whichLumisToProcess_.
empty())),
22 skippingEvents_(!(whichEventsToSkip_.
empty() && whichEventsToProcess_.
empty())),
23 somethingToSkip_(skippingLumis_ || skippingEvents_ || !(firstRun_ <= 1
U && firstLumi_ <= 1
U && firstEvent_ <= 1
U)) {
33 std::unique_ptr<EventSkipperByID>
35 auto evSkp = std::make_unique<EventSkipperByID>(
pset);
36 if (!evSkp->somethingToSkip()) {
48 if(run == 0
U) run = 1
U;
115 ->setComment(
"Skip any run with run number < 'firstRun'.");
117 ->setComment(
"Skip any lumi in run 'firstRun' with lumi number < 'firstLuminosityBlock'.");
121 ->
setComment(
"'firstEvent' is an XOR group because it can have type uint32 or uint64, default:1\n" 122 "If 'firstLuminosityBlock' == 0, skip any event in run 'firstRun' with event number < 'firstEvent'.\n" 123 "If 'firstLuminosityBlock' != 0, skip any event in lumi 'firstRun:firstLuminosityBlock' with event number < 'firstEvent'.");
125 std::vector<LuminosityBlockRange> defaultLumis;
126 desc.
addUntracked<std::vector<LuminosityBlockRange> >(
"lumisToSkip", defaultLumis)
127 ->setComment(
"Skip any lumi inside the specified run:lumi range. In python do 'help(cms.LuminosityBlockRange)' for documentation.");
128 desc.
addUntracked<std::vector<LuminosityBlockRange> >(
"lumisToProcess", defaultLumis)
129 ->setComment(
"If not empty, skip any lumi outside the specified run:lumi range. In python do 'help(cms.LuminosityBlockRange)' for documentation.");
131 std::vector<EventRange> defaultEvents;
132 desc.
addUntracked<std::vector<EventRange> >(
"eventsToSkip", defaultEvents)
133 ->setComment(
"Skip any event inside the specified run:event or run:lumi:event range. In python do 'help(cms.EventRange)' for documentation.");
134 desc.
addUntracked<std::vector<EventRange> >(
"eventsToProcess", defaultEvents)
135 ->setComment(
"If not empty, skip any event outside the specified run:event or run:lumi:event range. In python do 'help(cms.EventRange)' for documentation.");
void setComment(std::string const &value)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
bool skippingLumis() const
static std::unique_ptr< EventSkipperByID > create(ParameterSet const &pset)
unsigned long long EventNumber_t
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
bool skipIt(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
LuminosityBlockNumber_t firstLumi_
unsigned int LuminosityBlockNumber_t
bool skippingEvents() const
std::vector< LuminosityBlockRange > whichLumisToSkip_
std::vector< EventRange > whichEventsToProcess_
bool lessThanSpecial(EventRange const &lh, EventRange const &rh)
std::vector< LuminosityBlockRange > whichLumisToProcess_
std::vector< EventRange > whichEventsToSkip_
EventNumber_t firstEvent_
static void fillDescription(ParameterSetDescription &desc)
std::vector< EventRange > & sortAndRemoveOverlaps(std::vector< EventRange > &eventRange)
bool binary_search_all(ForwardSequence const &s, Datum const &d)
wrappers for std::binary_search
bool lessThan(EventRange const &lh, EventRange const &rh)
EventSkipperByID(ParameterSet const &pset)