1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include "DataFormats/SiPixelCluster/interface/SiPixelClusterShapeCache.h"
#include "FWCore/Utilities/interface/Exception.h"
SiPixelClusterShapeData::~SiPixelClusterShapeData() {}
SiPixelClusterShapeCache::~SiPixelClusterShapeCache() {}
void SiPixelClusterShapeCache::checkRef(const ClusterRef& ref) const {
if (ref.id() != productId_)
throw cms::Exception("InvalidReference")
<< "SiPixelClusterShapeCache caches values for SiPixelClusters with ProductID " << productId_
<< ", got SiPixelClusterRef with ID " << ref.id();
if (ref.index() >= data_.size())
throw cms::Exception("InvalidReference")
<< "SiPixelClusterShapeCache caches values for SiPixelClusters with ProductID " << productId_ << " that has "
<< data_.size() << " clusters, got SiPixelClusterRef with index " << ref.index();
}
|