1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
#ifndef DataFormats_Provenance_LuminosityBlockRange_h
#define DataFormats_Provenance_LuminosityBlockRange_h
// -*- C++ -*-
//
// Package: DataFormats/Provenance
// Class : LuminosityBlockRange
//
/**\class LuminosityBlockRange LuminosityBlockRange.h DataFormats/Provenance/interface/LuminosityBlockRange.h
Description: Holds run and luminosityBlock range.
Usage:
<usage>
*/
//
//
// system include files
#include <functional>
#include <iosfwd>
#include <vector>
// user include files
#include "DataFormats/Provenance/interface/LuminosityBlockID.h"
// forward declarations
namespace edm {
// typedef unsigned int LuminosityBlockNumber_t;
class LuminosityBlockRange {
public:
LuminosityBlockRange();
LuminosityBlockRange(RunNumber_t startRun,
LuminosityBlockNumber_t startLuminosityBlock,
RunNumber_t endRun,
LuminosityBlockNumber_t endLuminosityBlock);
LuminosityBlockRange(LuminosityBlockID const& begin, LuminosityBlockID const& end);
//virtual ~LuminosityBlockID();
// ---------- const member functions ---------------------
LuminosityBlockID startLumiID() const { return startLumiID_; }
LuminosityBlockID endLumiID() const { return endLumiID_; }
RunNumber_t startRun() const { return startLumiID_.run(); }
RunNumber_t endRun() const { return endLumiID_.run(); }
LuminosityBlockNumber_t startLumi() const { return startLumiID_.luminosityBlock(); }
LuminosityBlockNumber_t endLumi() const { return endLumiID_.luminosityBlock(); }
// ---------- static functions ---------------------------
// ---------- member functions ---------------------------
private:
// ---------- member data --------------------------------
//RunNumber_t startRun_;
//RunNumber_t endRun_;
//LuminosityBlockNumber_t startLumi_;
//LuminosityBlockNumber_t endLumi_;
LuminosityBlockID startLumiID_;
LuminosityBlockID endLumiID_;
};
std::ostream& operator<<(std::ostream& oStream, LuminosityBlockRange const& iID);
bool contains(LuminosityBlockRange const& lh, LuminosityBlockID const& rh);
bool contains(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
bool lessThan(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
bool overlaps(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
bool distinct(LuminosityBlockRange const& lh, LuminosityBlockRange const& rh);
bool merge(LuminosityBlockRange& lh, LuminosityBlockRange& rh);
std::vector<LuminosityBlockRange>& sortAndRemoveOverlaps(std::vector<LuminosityBlockRange>& lumiRange);
} // namespace edm
#endif
|