CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/Provenance/interface/LuminosityBlockRange.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Provenance_LuminosityBlockRange_h
00002 #define DataFormats_Provenance_LuminosityBlockRange_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     DataFormats/Provenance
00006 // Class  :     LuminosityBlockRange
00007 //
00016 //
00017 //
00018 
00019 // system include files
00020 #include <functional>
00021 #include <iosfwd>
00022 #include <vector>
00023 
00024 // user include files
00025 #include "DataFormats/Provenance/interface/LuminosityBlockID.h"
00026 
00027 // forward declarations
00028 namespace edm {
00029 
00030 //   typedef unsigned int LuminosityBlockNumber_t;
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       //virtual ~LuminosityBlockID();
00042 
00043       // ---------- const member functions ---------------------
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       // ---------- static functions ---------------------------
00052 
00053       // ---------- member functions ---------------------------
00054 
00055     private:
00056       // ---------- member data --------------------------------
00057       //RunNumber_t             startRun_;
00058       //RunNumber_t             endRun_;
00059       //LuminosityBlockNumber_t startLumi_;
00060       //LuminosityBlockNumber_t endLumi_;
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