CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EventRange.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_EventRange_h
2 #define DataFormats_Provenance_EventRange_h
3 // -*- C++ -*-
4 //
5 // Package: DataFormats/Provenance
6 // Class : EventRange
7 //
8 
9 /*
10  Description: Holds run and event range.
11 
12  Usage:
13  <usage>
14 
15 */
16 //
17 //
18 
19 // system include files
20 #include <functional>
21 #include <iosfwd>
22 #include <vector>
24 
25 // user include files
26 
27 // forward declarations
28 namespace edm {
29 
30  typedef unsigned int EventNumber_t;
31  typedef unsigned int LumiNumber_t;
32  typedef unsigned int RunNumber_t;
33 
34  class EventRange {
35 
36  public:
37 
38  EventRange();
39 
42 
43  EventRange(EventID const& begin, EventID const& end);
44 // virtual ~EventRange();
45 
46  // ---------- const member functions ---------------------
47  EventID startEventID() const {return startEventID_; }
48  EventID endEventID() const {return endEventID_; }
49  RunNumber_t startRun() const {return startEventID_.run(); }
50  RunNumber_t endRun() const {return endEventID_.run(); }
54  EventNumber_t endEvent() const {return endEventID_.event(); }
55 
56  private:
57 
58  // ---------- member data --------------------------------
59  //RunNumber_t startRun_;
60  //RunNumber_t endRun_;
61  //LumiNumber_t startLumi_;
62  //LumiNumber_t endLumi_;
63  //EventNumber_t startEvent_;
64  //EventNumber_t endEvent_;
67  };
68 
69  std::ostream& operator<<(std::ostream& oStream, EventRange const& iID);
70  bool contains(EventRange const& lh, EventID const& rh);
71  bool contains_(EventRange const& lh, EventID const& rh);
72  bool contains(EventRange const& lh, EventRange const& rh);
73  bool lessThan(EventRange const& lh, EventRange const& rh);
74  bool lessThanSpecial(EventRange const& lh, EventRange const& rh);
75  bool overlaps(EventRange const& lh, EventRange const& rh);
76  bool distinct(EventRange const& lh, EventRange const& rh);
77  std::vector<EventRange>& sortAndRemoveOverlaps(std::vector<EventRange>& eventRange);
78 
79 }
80 #endif
RunNumber_t run() const
Definition: EventID.h:42
EventNumber_t event() const
Definition: EventID.h:44
LumiNumber_t startLumi() const
Definition: EventRange.h:51
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
EventID startEventID_
Definition: EventRange.h:65
unsigned int EventNumber_t
Definition: EventID.h:30
RunNumber_t startRun() const
Definition: EventRange.h:49
bool int lh
Definition: SIMDVec.h:19
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:43
bool distinct(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:72
EventID endEventID_
Definition: EventRange.h:66
RunNumber_t endRun() const
Definition: EventRange.h:50
EventID startEventID() const
Definition: EventRange.h:47
bool lessThanSpecial(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:59
EventNumber_t endEvent() const
Definition: EventRange.h:54
EventID endEventID() const
Definition: EventRange.h:48
#define end
Definition: vmac.h:37
LumiNumber_t endLumi() const
Definition: EventRange.h:52
bool contains_(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:45
EventNumber_t startEvent() const
Definition: EventRange.h:53
bool overlaps(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:54
#define begin
Definition: vmac.h:30
std::vector< EventRange > & sortAndRemoveOverlaps(std::vector< EventRange > &eventRange)
Definition: EventRange.cc:102
bool lessThan(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:67
unsigned int RunNumber_t
Definition: EventRange.h:32
unsigned int LumiNumber_t
Definition: EventRange.h:31
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.