diff --git a/Fireworks/Calo/plugins/FWCaloClusterProxyBuilder.cc b/Fireworks/Calo/plugins/FWCaloClusterProxyBuilder.cc index b20e4aad6929e..741521d1c75df 100644 --- a/Fireworks/Calo/plugins/FWCaloClusterProxyBuilder.cc +++ b/Fireworks/Calo/plugins/FWCaloClusterProxyBuilder.cc @@ -55,7 +55,15 @@ void FWCaloClusterProxyBuilder::build(const FWEventItem *iItem, TEveElementList timeUpperBound = std::max(item()->getConfig()->value("TimeLowerBound(ns)"), item()->getConfig()->value("TimeUpperBound(ns)")); } else { - std::cerr << "Warning: couldn't locate 'timeLayerCluster' ValueMap in root file." << std::endl; + iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"), TimeValueMapHandle); + std::cerr << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access " + "'hgcalMergeLayerClusters:timeLayerClusters' ValueMap" + << std::endl; + if (!TimeValueMapHandle.isValid()) { + std::cerr << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file." << std::endl; + } } layer = item()->getConfig()->value("Layer"); diff --git a/Fireworks/Calo/plugins/FWTracksterHitsProxyBuilder.cc b/Fireworks/Calo/plugins/FWTracksterHitsProxyBuilder.cc index 3f5e111b96dbb..bebd5949b1519 100644 --- a/Fireworks/Calo/plugins/FWTracksterHitsProxyBuilder.cc +++ b/Fireworks/Calo/plugins/FWTracksterHitsProxyBuilder.cc @@ -70,11 +70,28 @@ void FWTracksterHitsProxyBuilder::build(const FWEventItem *iItem, TEveElementLis << "lower time bound is larger than upper time bound. Maybe opposite is desired?"; } } else { - edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file."; + iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"), TimeValueMapHandle_); + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access " + "'hgcalMergeLayerClusters:timeLayerClusters' ValueMap"; + if (!TimeValueMapHandle_.isValid()) { + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file."; + } } if (!layerClustersHandle_.isValid()) { - edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file."; + iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters"), layerClustersHandle_); + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalLayerClusters' collection " + "in input file. Trying to access 'hgcalMergeLayerClusters' collection."; + if (!layerClustersHandle_.isValid()) { + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ << " couldn't locate 'hgcalMergeLayerClusters' collection in input file."; + } } layer_ = item()->getConfig()->value("Layer"); diff --git a/Fireworks/Calo/plugins/FWTracksterLayersProxyBuilder.cc b/Fireworks/Calo/plugins/FWTracksterLayersProxyBuilder.cc index e5d1c370e767e..69f8e4a9cfc64 100644 --- a/Fireworks/Calo/plugins/FWTracksterLayersProxyBuilder.cc +++ b/Fireworks/Calo/plugins/FWTracksterLayersProxyBuilder.cc @@ -76,11 +76,28 @@ void FWTracksterLayersProxyBuilder::build(const FWEventItem *iItem, TEveElementL << "lower time bound is larger than upper time bound. Maybe opposite is desired?"; } } else { - edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file."; + iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"), TimeValueMapHandle_); + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access " + "'hgcalMergeLayerClusters:timeLayerClusters' ValueMap"; + if (!TimeValueMapHandle_.isValid()) { + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file."; + } } if (!layerClustersHandle_.isValid()) { - edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file."; + iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters"), layerClustersHandle_); + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ + << " couldn't locate 'hgcalLayerClusters' collection " + "in input file. Trying to access 'hgcalMergeLayerClusters' collection."; + if (!layerClustersHandle_.isValid()) { + edm::LogWarning("DataNotFound|InvalidData") + << __FILE__ << ":" << __LINE__ << " couldn't locate 'hgcalMergeLayerClusters' collection in input file."; + } } layer_ = item()->getConfig()->value("Layer");