DataFormats
SiPixelCluster
src
SiPixelClusterShapeCache.cc
Go to the documentation of this file.
1
#include "
DataFormats/SiPixelCluster/interface/SiPixelClusterShapeCache.h
"
2
#include "
FWCore/Utilities/interface/Exception.h
"
3
4
SiPixelClusterShapeData::~SiPixelClusterShapeData
() {}
5
6
SiPixelClusterShapeCache::~SiPixelClusterShapeCache
() {}
7
8
void
SiPixelClusterShapeCache::checkRef
(
const
ClusterRef
& ref)
const
{
9
if
(ref.
id
() !=
productId_
)
10
throw
cms::Exception
(
"InvalidReference"
)
11
<<
"SiPixelClusterShapeCache caches values for SiPixelClusters with ProductID "
<<
productId_
12
<<
", got SiPixelClusterRef with ID "
<< ref.
id
();
13
if
(ref.
index
() >=
data_
.size())
14
throw
cms::Exception
(
"InvalidReference"
)
15
<<
"SiPixelClusterShapeCache caches values for SiPixelClusters with ProductID "
<<
productId_
<<
" that has "
16
<<
data_
.size() <<
" clusters, got SiPixelClusterRef with index "
<< ref.
index
();
17
}
SiPixelClusterShapeData::~SiPixelClusterShapeData
~SiPixelClusterShapeData()
Definition:
SiPixelClusterShapeCache.cc:4
edm::Ref::index
key_type index() const
Definition:
Ref.h:253
edm::Ref
Definition:
AssociativeIterator.h:58
SiPixelClusterShapeCache::~SiPixelClusterShapeCache
~SiPixelClusterShapeCache()
Definition:
SiPixelClusterShapeCache.cc:6
SiPixelClusterShapeCache::productId_
edm::ProductID productId_
Definition:
SiPixelClusterShapeCache.h:114
edm::Ref::id
ProductID id() const
Accessor for product ID.
Definition:
Ref.h:244
SiPixelClusterShapeCache::checkRef
void checkRef(const ClusterRef &cluster) const
Definition:
SiPixelClusterShapeCache.cc:8
SiPixelClusterShapeCache::data_
std::vector< Field > data_
Definition:
SiPixelClusterShapeCache.h:112
Exception.h
cms::Exception
Definition:
Exception.h:70
SiPixelClusterShapeCache.h
Generated for CMSSW Reference Manual by
1.8.16