Go to the documentation of this file.00001 #ifndef DataFormats_Provenance_EventRange_h
00002 #define DataFormats_Provenance_EventRange_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include <functional>
00021 #include <iosfwd>
00022 #include <vector>
00023 #include "DataFormats/Provenance/interface/EventID.h"
00024
00025
00026
00027
00028 namespace edm {
00029
00030 typedef unsigned int EventNumber_t;
00031 typedef unsigned int LumiNumber_t;
00032 typedef unsigned int RunNumber_t;
00033
00034 class EventRange {
00035
00036 public:
00037
00038 EventRange();
00039
00040 EventRange(RunNumber_t startRun, LumiNumber_t startLumi, EventNumber_t startEvent,
00041 RunNumber_t endRun, LumiNumber_t endLumi, EventNumber_t endEvent);
00042
00043 EventRange(EventID const& begin, EventID const& end);
00044
00045
00046
00047 EventID startEventID() const {return startEventID_; }
00048 EventID endEventID() const {return endEventID_; }
00049 RunNumber_t startRun() const {return startEventID_.run(); }
00050 RunNumber_t endRun() const {return endEventID_.run(); }
00051 LumiNumber_t startLumi() const {return startEventID_.luminosityBlock(); }
00052 LumiNumber_t endLumi() const {return endEventID_.luminosityBlock(); }
00053 EventNumber_t startEvent() const {return startEventID_.event(); }
00054 EventNumber_t endEvent() const {return endEventID_.event(); }
00055
00056 private:
00057
00058
00059
00060
00061
00062
00063
00064
00065 EventID startEventID_;
00066 EventID endEventID_;
00067 };
00068
00069 std::ostream& operator<<(std::ostream& oStream, EventRange const& iID);
00070 bool contains(EventRange const& lh, EventID const& rh);
00071 bool contains_(EventRange const& lh, EventID const& rh);
00072 bool contains(EventRange const& lh, EventRange const& rh);
00073 bool lessThan(EventRange const& lh, EventRange const& rh);
00074 bool lessThanSpecial(EventRange const& lh, EventRange const& rh);
00075 bool overlaps(EventRange const& lh, EventRange const& rh);
00076 bool distinct(EventRange const& lh, EventRange const& rh);
00077 std::vector<EventRange>& sortAndRemoveOverlaps(std::vector<EventRange>& eventRange);
00078
00079 }
00080 #endif