FWCore
Utilities
interface
ESIndices.h
Go to the documentation of this file.
1
#ifndef FWCore_Utilities_ESIndices_h
2
#define FWCore_Utilities_ESIndices_h
3
// -*- C++ -*-
4
//
5
// Package: Framework
6
// Class : ESIndices
7
//
18
//
19
// Author: Chris Jones
20
// Created: Sat Apr 6 14:47:35 EST 2019
21
//
22
23
// system include files
24
#include <limits>
25
#include <ostream>
26
27
// user include files
28
29
namespace
edm
{
30
class
ESProxyIndex
{
31
public
:
32
using
Value_t
=
int
;
33
constexpr
ESProxyIndex
() noexcept =
default
;
34
constexpr explicit
ESProxyIndex
(
Value_t
iValue) noexcept :
index_
{iValue} {}
35
constexpr
ESProxyIndex
(
ESProxyIndex
const
&) noexcept =
default
;
36
constexpr
ESProxyIndex
(
ESProxyIndex
&&) noexcept =
default
;
37
38
constexpr
ESProxyIndex
&
operator
=(
ESProxyIndex
const
&) noexcept =
default
;
39
constexpr
ESProxyIndex
&
operator
=(
ESProxyIndex
&&) noexcept =
default
;
40
41
constexpr
bool
operator
==(
ESProxyIndex
iOther)
const
noexcept {
return
iOther.index_ ==
index_
; }
42
constexpr
bool
operator!=
(
ESProxyIndex
iOther)
const
noexcept {
return
iOther.index_ !=
index_
; }
43
44
constexpr
Value_t
value
()
const
noexcept {
return
index_
; }
45
46
private
:
47
Value_t
index_
=
std::numeric_limits<int>::max
();
48
};
49
50
inline
std::ostream&
operator<<
(std::ostream& iOS,
ESProxyIndex
const
& iIndex) {
51
iOS << iIndex.
value
();
52
return
iOS;
53
}
54
55
class
ESTokenIndex
{
56
public
:
57
using
Value_t
=
int
;
58
59
constexpr
ESTokenIndex
() noexcept =
default
;
60
constexpr explicit
ESTokenIndex
(
Value_t
iValue) noexcept :
index_
{iValue} {}
61
constexpr
ESTokenIndex
(
ESTokenIndex
const
&) noexcept =
default
;
62
constexpr
ESTokenIndex
(
ESTokenIndex
&&) noexcept =
default
;
63
64
constexpr
ESTokenIndex
&
operator
=(
ESTokenIndex
const
&) noexcept =
default
;
65
constexpr
ESTokenIndex
&
operator
=(
ESTokenIndex
&&) noexcept =
default
;
66
67
constexpr
bool
operator
==(
ESTokenIndex
iOther)
const
noexcept {
return
iOther.index_ ==
index_
; }
68
constexpr
bool
operator!=
(
ESTokenIndex
iOther)
const
noexcept {
return
iOther.index_ !=
index_
; }
69
70
constexpr
Value_t
value
()
const
noexcept {
return
index_
; }
71
72
private
:
73
Value_t
index_
=
std::numeric_limits<Value_t>::max
();
74
};
75
inline
std::ostream&
operator<<
(std::ostream& iOS,
ESTokenIndex
const
& iIndex) {
76
iOS << iIndex.
value
();
77
return
iOS;
78
}
79
80
class
ESRecordIndex
{
81
public
:
82
using
Value_t
=
unsigned
int
;
83
84
constexpr
ESRecordIndex
() noexcept =
default
;
85
constexpr explicit
ESRecordIndex
(
unsigned
int
iValue) noexcept :
index_
{iValue} {}
86
constexpr
ESRecordIndex
(
ESRecordIndex
const
&) noexcept =
default
;
87
constexpr
ESRecordIndex
(
ESRecordIndex
&&) noexcept =
default
;
88
89
constexpr
ESRecordIndex
&
operator
=(
ESRecordIndex
const
&) noexcept =
default
;
90
constexpr
ESRecordIndex
&
operator
=(
ESRecordIndex
&&) noexcept =
default
;
91
92
constexpr
bool
operator
==(
ESRecordIndex
iOther)
const
noexcept {
return
iOther.index_ ==
index_
; }
93
constexpr
bool
operator!=
(
ESRecordIndex
iOther)
const
noexcept {
return
iOther.index_ !=
index_
; }
94
95
constexpr
Value_t
value
()
const
noexcept {
return
index_
; }
96
97
private
:
98
Value_t
index_
=
std::numeric_limits<int>::max
();
99
};
100
inline
std::ostream&
operator<<
(std::ostream& iOS,
ESRecordIndex
const
& iIndex) {
101
iOS << iIndex.
value
();
102
return
iOS;
103
}
104
105
}
// namespace edm
106
#endif
edm::ESRecordIndex::ESRecordIndex
constexpr ESRecordIndex() noexcept=default
edm::ESTokenIndex
Definition:
ESIndices.h:55
edm::ESTokenIndex::operator!=
constexpr bool operator!=(ESTokenIndex iOther) const noexcept
Definition:
ESIndices.h:68
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ESProxyIndex::Value_t
int Value_t
Definition:
ESIndices.h:32
edm::ESProxyIndex::operator!=
constexpr bool operator!=(ESProxyIndex iOther) const noexcept
Definition:
ESIndices.h:42
edm::ESProxyIndex::ESProxyIndex
constexpr ESProxyIndex() noexcept=default
edm::ESRecordIndex
Definition:
ESIndices.h:80
watchdog.const
const
Definition:
watchdog.py:83
edm::ESProxyIndex
Definition:
ESIndices.h:30
Utilities.operator
operator
Definition:
Utilities.py:24
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition:
HLTGlobalStatus.h:106
edm::ESRecordIndex::index_
Value_t index_
Definition:
ESIndices.h:98
edm::ESRecordIndex::value
constexpr Value_t value() const noexcept
Definition:
ESIndices.h:95
ESRecordIndex
edm::ESTokenIndex::value
constexpr Value_t value() const noexcept
Definition:
ESIndices.h:70
ESTokenIndex
edm::ESTokenIndex::Value_t
int Value_t
Definition:
ESIndices.h:57
writedatasetfile.default
default
Definition:
writedatasetfile.py:11
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:169
createfilelist.int
int
Definition:
createfilelist.py:10
ESProxyIndex
edm::ESRecordIndex::operator!=
constexpr bool operator!=(ESRecordIndex iOther) const noexcept
Definition:
ESIndices.h:93
edm::ESProxyIndex::value
constexpr Value_t value() const noexcept
Definition:
ESIndices.h:44
edm::ESTokenIndex::ESTokenIndex
constexpr ESTokenIndex() noexcept=default
edm::ESProxyIndex::index_
Value_t index_
Definition:
ESIndices.h:47
edm::ESTokenIndex::index_
Value_t index_
Definition:
ESIndices.h:73
edm::ESRecordIndex::Value_t
unsigned int Value_t
Definition:
ESIndices.h:82
Generated for CMSSW Reference Manual by
1.8.16