CMS 3D CMS Logo

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>
25 
26 // user include files
27 
28 // forward declarations
29 namespace edm {
30 
31  class EventRange {
32  public:
33  EventRange();
34 
41 
42  EventRange(EventID const& begin, EventID const& end);
43  // virtual ~EventRange();
44 
45  // ---------- const member functions ---------------------
46  EventID startEventID() const { return startEventID_; }
47  EventID endEventID() const { return endEventID_; }
48  RunNumber_t startRun() const { return startEventID_.run(); }
49  RunNumber_t endRun() const { return endEventID_.run(); }
53  EventNumber_t endEvent() const { return endEventID_.event(); }
54 
55  private:
56  // ---------- member data --------------------------------
57  //RunNumber_t startRun_;
58  //RunNumber_t endRun_;
59  //LuminosityBlockNumber_t startLumi_;
60  //LuminosityBlockNumber_t endLumi_;
61  //EventNumber_t startEvent_;
62  //EventNumber_t endEvent_;
65  };
66 
67  std::ostream& operator<<(std::ostream& oStream, EventRange const& iID);
68  bool contains(EventRange const& lh, EventID const& rh);
69  bool contains_(EventRange const& lh, EventID const& rh);
70  bool contains(EventRange const& lh, EventRange const& rh);
71  bool lessThan(EventRange const& lh, EventRange const& rh);
72  bool lessThanSpecial(EventRange const& lh, EventRange const& rh);
73  bool overlaps(EventRange const& lh, EventRange const& rh);
74  bool distinct(EventRange const& lh, EventRange const& rh);
75  std::vector<EventRange>& sortAndRemoveOverlaps(std::vector<EventRange>& eventRange);
76 
77 } // namespace edm
78 #endif
EventID startEventID() const
Definition: EventRange.h:46
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
EventID startEventID_
Definition: EventRange.h:63
EventNumber_t startEvent() const
Definition: EventRange.h:52
EventID endEventID() const
Definition: EventRange.h:47
unsigned long long EventNumber_t
bool int lh
Definition: SIMDVec.h:20
RunNumber_t startRun() const
Definition: EventRange.h:48
unsigned int LuminosityBlockNumber_t
bool distinct(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:69
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
EventID endEventID_
Definition: EventRange.h:64
bool lessThanSpecial(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:56
LuminosityBlockNumber_t endLumi() const
Definition: EventRange.h:51
RunNumber_t endRun() const
Definition: EventRange.h:49
RunNumber_t run() const
Definition: EventID.h:38
LuminosityBlockNumber_t startLumi() const
Definition: EventRange.h:50
bool contains_(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:44
bool overlaps(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:51
HLT enums.
std::vector< EventRange > & sortAndRemoveOverlaps(std::vector< EventRange > &eventRange)
Definition: EventRange.cc:98
bool lessThan(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:64
EventNumber_t endEvent() const
Definition: EventRange.h:53
unsigned int RunNumber_t
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
EventNumber_t event() const
Definition: EventID.h:40