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
RunNumber_t run() const
Definition: EventID.h:38
EventNumber_t event() const
Definition: EventID.h:40
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:37
EventID startEventID_
Definition: EventRange.h:63
unsigned long long EventNumber_t
RunNumber_t startRun() const
Definition: EventRange.h:48
bool int lh
Definition: SIMDVec.h:20
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
unsigned int LuminosityBlockNumber_t
bool distinct(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:69
EventID endEventID_
Definition: EventRange.h:64
RunNumber_t endRun() const
Definition: EventRange.h:49
EventID startEventID() const
Definition: EventRange.h:46
bool lessThanSpecial(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:56
EventNumber_t endEvent() const
Definition: EventRange.h:53
EventID endEventID() const
Definition: EventRange.h:47
#define end
Definition: vmac.h:39
LuminosityBlockNumber_t endLumi() const
Definition: EventRange.h:51
bool contains_(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:44
EventNumber_t startEvent() const
Definition: EventRange.h:52
bool overlaps(EventRange const &lh, EventRange const &rh)
Definition: EventRange.cc:51
LuminosityBlockNumber_t startLumi() const
Definition: EventRange.h:50
#define begin
Definition: vmac.h:32
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
unsigned int RunNumber_t
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.