CMS 3D CMS Logo

DDTestSpecPars.cc
Go to the documentation of this file.
8 
9 #include <iostream>
10 
11 using namespace std;
12 using namespace cms;
13 using namespace edm;
14 
15 class DDTestSpecPars : public one::EDAnalyzer<> {
16 public:
17  explicit DDTestSpecPars(const ParameterSet& iConfig)
18  : m_tag(iConfig.getParameter<ESInputTag>("DDDetector")) {}
19 
20  void beginJob() override {}
21  void analyze(Event const& iEvent, EventSetup const&) override;
22  void endJob() override {}
23 
24 private:
26 };
27 
28 void
29 DDTestSpecPars::analyze(const Event&, const EventSetup& iEventSetup)
30 {
31  LogVerbatim("Geometry") << "DDTestSpecPars::analyze: " << m_tag;
33  iEventSetup.get<DDSpecParRegistryRcd>().get(m_tag.module(), registry);
34 
35  LogVerbatim("Geometry").log([&registry](auto& log) {
36  log << "DD SpecPar Registry size: " << registry->specpars.size();
37  for(const auto& i: registry->specpars) {
38  log << " " << i.first << " => ";
39  for(const auto& k : i.second.paths)
40  log << k << ", ";
41  for(const auto& l : i.second.spars) {
42  log << l.first << " => ";
43  for(const auto& il : l.second) {
44  log << il << ", ";
45  }
46  }
47  for(const auto& m : i.second.numpars) {
48  log << m.first << " => ";
49  for(const auto& im : m.second) {
50  log << im << ", ";
51  }
52  }
53  log << '\n';
54  }
55  });
56 }
57 
const ESInputTag m_tag
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
LogVerbatim & log(F &&iF)
void analyze(Event const &iEvent, EventSetup const &) override
int k[5][pyjets_maxn]
Namespace of DDCMS conversion namespace.
void beginJob() override
HLT enums.
T get() const
Definition: EventSetup.h:71
DDTestSpecPars(const ParameterSet &iConfig)
static Interceptor::Registry registry("Interceptor")
void endJob() override