29 ClusterShapeLazyGetter() {}
30 ~ClusterShapeLazyGetter() {}
36 this->data_.size.clear();
37 this->clusterShape_.determineShape(*pixDet, *cluster, this->data_);
38 cache.
insert(cluster, this->data_);
65 onDemand_(iConfig.getParameter<bool>(
"onDemand"))
67 produces<SiPixelClusterShapeCache>();
75 desc.
add<
bool>(
"onDemand",
false);
76 descriptions.
add(
"siPixelClusterShapeCache", desc);
86 auto filler = std::make_shared<ClusterShapeLazyGetter>();
91 output->resize(input->data().size());
94 for(
const auto& detSet: *input) {
95 const GeomDetUnit *genericDet = geom->idToDetUnit(detSet.detId());
100 for(; iCluster != endCluster; ++iCluster) {
102 filler->fill(clusterRef, pixDet, *output);
105 output->shrink_to_fit();
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
bool isFilled(const ClusterRef &cluster) const
void insert(const ClusterRef &cluster, const T &data)
SiPixelClusterShapeCacheProducer(const edm::ParameterSet &iConfig)
virtual void fill(const ClusterRef &cluster, const PixelGeomDetUnit *pixDet, const SiPixelClusterShapeCache &cache) const =0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
data_type const * const_iterator
~SiPixelClusterShapeCacheProducer()
static std::string const input
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< Field > data_
edm::EDGetTokenT< InputCollection > token_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)