File indexing completed on 2024-04-06 12:05:11
0001 #include "DataFormats/SiPixelCluster/interface/SiPixelClusterShapeCache.h"
0002 #include "FWCore/Utilities/interface/Exception.h"
0003
0004 SiPixelClusterShapeData::~SiPixelClusterShapeData() {}
0005
0006 SiPixelClusterShapeCache::~SiPixelClusterShapeCache() {}
0007
0008 void SiPixelClusterShapeCache::checkRef(const ClusterRef& ref) const {
0009 if (ref.id() != productId_)
0010 throw cms::Exception("InvalidReference")
0011 << "SiPixelClusterShapeCache caches values for SiPixelClusters with ProductID " << productId_
0012 << ", got SiPixelClusterRef with ID " << ref.id();
0013 if (ref.index() >= data_.size())
0014 throw cms::Exception("InvalidReference")
0015 << "SiPixelClusterShapeCache caches values for SiPixelClusters with ProductID " << productId_ << " that has "
0016 << data_.size() << " clusters, got SiPixelClusterRef with index " << ref.index();
0017 }