Main Page
Namespaces
Classes
Package Documentation
src
DataFormats
Common
interface
RefKeyTrait.h
Go to the documentation of this file.
1
#ifndef DataFormats_Common_RefKeyTrait_h
2
#define DataFormats_Common_RefKeyTrait_h
3
#include "
FWCore/Utilities/interface/EDMException.h
"
4
5
namespace
edm
{
6
template
<
typename
C>
class
RefProd
;
7
namespace
reftobase {
8
9
struct
RefKey
{
10
template
<
typename
REF>
11
static
size_t
key
(
const
REF &
r
) {
12
return
r.key();
13
}
14
};
15
16
struct
RefProdKey
{
17
template
<
typename
REF>
18
static
size_t
key
(
const
REF &
r
) {
19
Exception::throwThis
(
errors::InvalidReference
,
20
"attempting get key from a RefToBase containing a RefProd.\n"
21
"You can use key only with RefToBase containing a Ref."
);
22
return
0;
23
}
24
};
25
26
template
<
typename
REF>
27
struct
RefKeyTrait
{
28
typedef
RefKey
type
;
29
};
30
31
template
<
typename
C>
32
struct
RefKeyTrait
<
RefProd
<
C
> > {
33
typedef
RefProdKey
type
;
34
};
35
}
36
}
37
38
#endif
edm::reftobase::RefKeyTrait::type
RefKey type
Definition:
RefKeyTrait.h:28
edm::reftobase::RefProdKey::key
static size_t key(const REF &r)
Definition:
RefKeyTrait.h:18
edm::reftobase::RefKeyTrait
Definition:
RefKeyTrait.h:27
edm::reftobase::RefKey
Definition:
RefKeyTrait.h:9
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:83
EDMException.h
edm::RefProd
Definition:
EDProductfwd.h:22
patCaloMETCorrections_cff.C
C
Definition:
patCaloMETCorrections_cff.py:45
edm::errors::InvalidReference
Definition:
EDMException.h:39
alignCSCRings.r
r
Definition:
alignCSCRings.py:93
reco::JetExtendedAssociation::RefProd
edm::RefProd< Container > RefProd
Definition:
JetExtendedAssociation.h:33
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::reftobase::RefProdKey
Definition:
RefKeyTrait.h:16
edm::reftobase::RefKeyTrait< RefProd< C > >::type
RefProdKey type
Definition:
RefKeyTrait.h:33
edm::reftobase::RefKey::key
static size_t key(const REF &r)
Definition:
RefKeyTrait.h:11
Generated for CMSSW Reference Manual by
1.8.11