Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DataFormats
Common
interface
AssociationMapHelpers.h
Go to the documentation of this file.
1
#ifndef DataFormats_Common_AssociationMapKeyVal_h
2
#define DataFormats_Common_AssociationMapKeyVal_h
3
/*
4
*
5
* helper classes for AssociationMap
6
*
7
* \author Luca Lista, INFN
8
*
9
*
10
*/
11
#include "
FWCore/Utilities/interface/EDMException.h
"
12
13
namespace
edm {
14
namespace
helpers {
15
template
<
typename
K,
typename
V>
16
struct
KeyVal
{
17
typedef
K
key_type
;
18
typedef
V
value_type
;
19
KeyVal
() :
key
(),
val
() { }
20
KeyVal
(
const
K &
k
,
const
V &
v
) :
key
(k),
val
(v) { }
21
K
key
;
22
V
val
;
23
};
24
25
template
<
typename
K>
26
struct
Key
{
27
typedef
K
key_type
;
28
Key
() { }
29
Key
(
const
K &
k
) :
key
(k) { }
30
K
key
;
31
};
32
34
template
<
typename
RP,
typename
R>
35
void
checkRef
(
const
RP & rp,
const
R
&
r
) {
36
if
(rp.id() != r.id()) {
37
Exception::throwThis
(
edm::errors::InvalidReference
,
"invalid reference"
);
38
}
39
}
40
}
41
}
42
43
#endif
edm::helpers::Key
Definition:
AssociationMapHelpers.h:26
edm::helpers::Key::key
K key
Definition:
AssociationMapHelpers.h:30
edm::helpers::Key::key_type
K key_type
Definition:
AssociationMapHelpers.h:27
edm::helpers::Key::Key
Key(const K &k)
Definition:
AssociationMapHelpers.h:29
findQualityFiles.v
v
Definition:
findQualityFiles.py:177
edm::helpers::KeyVal::val
V val
Definition:
AssociationMapHelpers.h:22
edm::helpers::Key::Key
Key()
Definition:
AssociationMapHelpers.h:28
edm::Exception::throwThis
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition:
EDMException.cc:101
roll_playback.k
tuple k
Definition:
roll_playback.py:138
EDMException.h
dttmaxenums::R
Definition:
DTTMax.h:28
edm::helpers::KeyVal::key
K key
Definition:
AssociationMapHelpers.h:21
edm::helpers::KeyVal::KeyVal
KeyVal(const K &k, const V &v)
Definition:
AssociationMapHelpers.h:20
edm::helpers::KeyVal
Definition:
AssociationMapHelpers.h:16
edm::errors::InvalidReference
Definition:
EDMException.h:40
edm::helpers::KeyVal::KeyVal
KeyVal()
Definition:
AssociationMapHelpers.h:19
edm::helpers::KeyVal::value_type
V value_type
Definition:
AssociationMapHelpers.h:18
alignCSCRings.r
list r
Definition:
alignCSCRings.py:92
edm::helpers::KeyVal::key_type
K key_type
Definition:
AssociationMapHelpers.h:17
edm::helpers::checkRef
void checkRef(const RP &rp, const R &r)
throw if r hasn't the same id as rp
Definition:
AssociationMapHelpers.h:35
Generated for CMSSW Reference Manual by
1.8.5