File indexing completed on 2024-04-06 12:13:10
0001 #ifndef FWCore_Sources_EventSkipperByID_h
0002 #define FWCore_Sources_EventSkipperByID_h
0003
0004 #include "DataFormats/Provenance/interface/EventID.h"
0005 #include "DataFormats/Provenance/interface/EventRange.h"
0006 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
0007 #include "DataFormats/Provenance/interface/LuminosityBlockRange.h"
0008 #include "DataFormats/Provenance/interface/RunLumiEventNumber.h"
0009
0010 #include <memory>
0011 #include <vector>
0012
0013 namespace edm {
0014 class ParameterSet;
0015 class ParameterSetDescription;
0016
0017 class EventSkipperByID {
0018 public:
0019 explicit EventSkipperByID(ParameterSet const& pset);
0020 ~EventSkipperByID();
0021 bool skipIt(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const;
0022 bool skippingLumis() const { return skippingLumis_; }
0023 bool skippingEvents() const { return skippingEvents_; }
0024 bool somethingToSkip() const { return somethingToSkip_; }
0025 static std::unique_ptr<EventSkipperByID> create(ParameterSet const& pset);
0026 static void fillDescription(ParameterSetDescription& desc);
0027
0028 private:
0029 RunNumber_t firstRun_;
0030 LuminosityBlockNumber_t firstLumi_;
0031 EventNumber_t firstEvent_;
0032 std::vector<LuminosityBlockRange> whichLumisToSkip_;
0033 std::vector<LuminosityBlockRange> whichLumisToProcess_;
0034 std::vector<EventRange> whichEventsToSkip_;
0035 std::vector<EventRange> whichEventsToProcess_;
0036 bool skippingLumis_;
0037 bool skippingEvents_;
0038 bool somethingToSkip_;
0039 };
0040 }
0041
0042 #endif