30 ClusterShapeLazyGetter() {}
31 ~ClusterShapeLazyGetter() {}
34 taskQueue_.pushAndWait([
this, &cluster, pixDet, &constCache]{
38 this->data_.size.clear();
39 this->clusterShape_.determineShape(*pixDet, *cluster, this->data_);
40 cache.
insert(cluster, this->data_);
69 onDemand_(iConfig.getParameter<bool>(
"onDemand"))
71 produces<SiPixelClusterShapeCache>();
79 desc.
add<
bool>(
"onDemand",
false);
80 descriptions.
add(
"siPixelClusterShapeCache", desc);
90 auto filler = std::make_shared<ClusterShapeLazyGetter>();
95 output->resize(input->data().size());
98 for(
const auto& detSet: *input) {
99 const GeomDetUnit *genericDet = geom->idToDetUnit(detSet.detId());
104 for(; iCluster != endCluster; ++iCluster) {
106 filler->fill(clusterRef, pixDet, *output);
109 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)