SimTracker
TrackerHitAssociation
src
ClusterTPAssociation.cc
Go to the documentation of this file.
1
#include "
SimTracker/TrackerHitAssociation/interface/ClusterTPAssociation.h
"
2
#include "
FWCore/Utilities/interface/Exception.h
"
3
4
void
ClusterTPAssociation::checkKeyProductID
(
const
edm::ProductID
&
id
)
const
{
5
if
(
std::find
(std::begin(
keyProductIDs_
),
std::end
(
keyProductIDs_
),
id
) ==
std::end
(
keyProductIDs_
)) {
6
auto
e
=
cms::Exception
(
"InvalidReference"
);
7
e
<<
"ClusterTPAssociation has OmniClusterRefs with ProductIDs "
;
8
for
(
size_t
i
= 0;
i
<
keyProductIDs_
.
size
(); ++
i
) {
9
e
<<
keyProductIDs_
[
i
];
10
if
(
i
<
keyProductIDs_
.
size
() - 1) {
11
e
<<
","
;
12
}
13
}
14
e
<<
" but got OmniClusterRef/ProductID with ID "
<<
id
<<
". This is typically caused by a configuration error."
;
15
throw
e
;
16
}
17
}
18
19
void
ClusterTPAssociation::checkMappedProductID
(
const
edm::ProductID
&
id
)
const
{
20
if
(
id
!=
mappedProductId_
) {
21
throw
cms::Exception
(
"InvalidReference"
)
22
<<
"ClusterTPAssociation has TrackingParticles with ProductID "
<<
mappedProductId_
23
<<
", but got TrackingParticleRef/Handle/ProductID with ID "
<<
id
24
<<
". This is typically caused by a configuration error."
;
25
}
26
}
mps_fire.i
i
Definition:
mps_fire.py:428
ClusterTPAssociation::keyProductIDs_
edm::VecArray< edm::ProductID, 2 > keyProductIDs_
Definition:
ClusterTPAssociation.h:89
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition:
FindCaloHit.cc:19
ClusterTPAssociation::mappedProductId_
edm::ProductID mappedProductId_
Definition:
ClusterTPAssociation.h:90
mps_fire.end
end
Definition:
mps_fire.py:242
ClusterTPAssociation::checkKeyProductID
void checkKeyProductID(const OmniClusterRef &key) const
Definition:
ClusterTPAssociation.h:72
ClusterTPAssociation::checkMappedProductID
void checkMappedProductID(const edm::HandleBase &mappedHandle) const
Definition:
ClusterTPAssociation.h:75
Exception
Definition:
hltDiff.cc:245
Exception.h
edm::VecArray::size
constexpr size_type size() const noexcept
Definition:
VecArray.h:70
edm::ProductID
Definition:
ProductID.h:27
ClusterTPAssociation.h
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
Generated for CMSSW Reference Manual by
1.8.16