CMS 3D CMS Logo

HGCalLayerClusterHeterogeneousDumper.cc
Go to the documentation of this file.
12 
13 #include <fmt/format.h>
14 
16 public:
18  : token_{consumes(iConfig.getParameter<edm::InputTag>("src"))} {}
19 
20  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
22  desc.add<edm::InputTag>("src", edm::InputTag("hltHgcalSoARecHitsLayerClustersProducer"));
23  descriptions.addWithDefaultLabel(desc);
24  }
25 
26  void analyze(edm::StreamID iStream, edm::Event const& iEvent, edm::EventSetup const& iSetup) const override {
27  auto const& data = iEvent.get(token_);
28 
29  auto const view = data.view();
30  std::cout << fmt::format("view.numberOfClusters() = {}", view.numberOfClustersScalar()) << std::endl;
31  for (int i = 0; i < data->metadata().size(); ++i) {
32  std::cout << fmt::format("view[{}].clusterIndex() = {}", i, view.clusterIndex(i)) << std::endl;
33  }
34  }
35 
36 private:
38 };
39 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int iEvent
Definition: GenABIO.cc:224
void analyze(edm::StreamID iStream, edm::Event const &iEvent, edm::EventSetup const &iSetup) const override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
HGCalLayerClusterHeterogeneousDumper(edm::ParameterSet const &iConfig)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
edm::EDGetTokenT< HGCalSoARecHitsExtraHostCollection > const token_