CMS 3D CMS Logo

HGCalLayerClusterHeterogeneousSoADumper.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("hltHgcalSoALayerClustersProducer"));
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("hgcalSoALayerClustersProducer size = {}", view.metadata().size()) << std::endl;
31  for (int i = 0; i < data->metadata().size(); ++i) {
32  std::cout << fmt::format("CLUSTERS_SOA {}, energy = {:.{}f}, x = {:.{}f}, y = {:.{}f}, z= {:.{}f}",
33  i,
34  view.energy(i),
35  std::numeric_limits<float>::max_digits10,
36  view.x(i),
37  std::numeric_limits<float>::max_digits10,
38  view.y(i),
39  std::numeric_limits<float>::max_digits10,
40  view.z(i),
41  std::numeric_limits<float>::max_digits10)
42  << std::endl;
43  }
44  }
45 
46 private:
48 };
49 
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::EDGetTokenT< HGCalSoAClustersHostCollection > const token_
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void analyze(edm::StreamID iStream, edm::Event const &iEvent, edm::EventSetup const &iSetup) const override
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HGCalLayerClusterHeterogeneousSoADumper(edm::ParameterSet const &iConfig)