File indexing completed on 2024-04-06 12:05:01
0001 #ifndef DataFormats_Provenance_EventRange_h
0002 #define DataFormats_Provenance_EventRange_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 #include <functional>
0021 #include <iosfwd>
0022 #include <vector>
0023 #include "DataFormats/Provenance/interface/EventID.h"
0024 #include "DataFormats/Provenance/interface/RunLumiEventNumber.h"
0025
0026
0027
0028
0029 namespace edm {
0030
0031 class EventRange {
0032 public:
0033 EventRange();
0034
0035 EventRange(RunNumber_t startRun,
0036 LuminosityBlockNumber_t startLumi,
0037 EventNumber_t startEvent,
0038 RunNumber_t endRun,
0039 LuminosityBlockNumber_t endLumi,
0040 EventNumber_t endEvent);
0041
0042 EventRange(EventID const& begin, EventID const& end);
0043
0044
0045
0046 EventID startEventID() const { return startEventID_; }
0047 EventID endEventID() const { return endEventID_; }
0048 RunNumber_t startRun() const { return startEventID_.run(); }
0049 RunNumber_t endRun() const { return endEventID_.run(); }
0050 LuminosityBlockNumber_t startLumi() const { return startEventID_.luminosityBlock(); }
0051 LuminosityBlockNumber_t endLumi() const { return endEventID_.luminosityBlock(); }
0052 EventNumber_t startEvent() const { return startEventID_.event(); }
0053 EventNumber_t endEvent() const { return endEventID_.event(); }
0054
0055 private:
0056
0057
0058
0059
0060
0061
0062
0063 EventID startEventID_;
0064 EventID endEventID_;
0065 };
0066
0067 std::ostream& operator<<(std::ostream& oStream, EventRange const& iID);
0068 bool contains(EventRange const& lh, EventID const& rh);
0069 bool contains_(EventRange const& lh, EventID const& rh);
0070 bool contains(EventRange const& lh, EventRange const& rh);
0071 bool lessThan(EventRange const& lh, EventRange const& rh);
0072 bool lessThanSpecial(EventRange const& lh, EventRange const& rh);
0073 bool overlaps(EventRange const& lh, EventRange const& rh);
0074 bool distinct(EventRange const& lh, EventRange const& rh);
0075 std::vector<EventRange>& sortAndRemoveOverlaps(std::vector<EventRange>& eventRange);
0076
0077 }
0078 #endif