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