Go to the documentation of this file.00001 #ifndef DataFormats_Provenance_LuminosityBlockRange_h
00002 #define DataFormats_Provenance_LuminosityBlockRange_h
00003
00004
00005
00006
00007
00016
00017
00018
00019
00020 #include <functional>
00021 #include <iosfwd>
00022 #include <vector>
00023
00024
00025 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00026
00027
00028 namespace edm {
00029
00030
00031
00032 class LuminosityBlockRange {
00033 public:
00034 LuminosityBlockRange();
00035
00036 LuminosityBlockRange(RunNumber_t startRun, LuminosityBlockNumber_t startLuminosityBlock,
00037 RunNumber_t endRun, LuminosityBlockNumber_t endLuminosityBlock);
00038
00039 LuminosityBlockRange(LuminosityBlockID const& begin, LuminosityBlockID const& end);
00040
00041
00042
00043
00044 LuminosityBlockID startLumiID() const {return startLumiID_;}
00045 LuminosityBlockID endLumiID() const {return endLumiID_;}
00046 RunNumber_t startRun() const {return startLumiID_.run();}
00047 RunNumber_t endRun() const {return endLumiID_.run();}
00048 LuminosityBlockNumber_t startLumi() const {return startLumiID_.luminosityBlock();}
00049 LuminosityBlockNumber_t endLumi() const {return endLumiID_.luminosityBlock();}
00050
00051
00052
00053
00054
00055 private:
00056
00057
00058
00059
00060
00061 LuminosityBlockID startLumiID_;
00062 LuminosityBlockID endLumiID_;
00063 };
00064
00065 std::ostream& operator<<(std::ostream& oStream, LuminosityBlockRange const& iID);
00066 bool contains(LuminosityBlockRange const& lh, LuminosityBlockID const& rh);
00067 bool contains(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
00068 bool lessThan(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
00069 bool overlaps(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
00070 bool distinct(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
00071 bool merge(LuminosityBlockRange& lh, LuminosityBlockRange& rh);
00072 std::vector<LuminosityBlockRange>& sortAndRemoveOverlaps(std::vector<LuminosityBlockRange>& lumiRange);
00073 }
00074 #endif
00075