CMS 3D CMS Logo

PathAnalyzer.cc
Go to the documentation of this file.
1 #include <algorithm>
2 #include <iterator>
3 #include <sstream>
4 
13 
14 namespace edmtest {
16  public:
17  explicit PathAnalyzer(edm::ParameterSet const&);
18  ~PathAnalyzer() override;
19 
20  void analyze(edm::StreamID, edm::Event const&, edm::EventSetup const&) const override;
21  void beginJob() override;
22  void endJob() override;
23 
24  private:
25  void dumpTriggerNamesServiceInfo(char const* where) const;
26  }; // class PathAnalyzer
27 
28  //--------------------------------------------------------------------
29  //
30  // Implementation details
31 
33 
35 
37  dumpTriggerNamesServiceInfo("analyze");
38  }
39 
41 
43 
44  void PathAnalyzer::dumpTriggerNamesServiceInfo(char const* where) const {
45  edm::LogInfo("PathAnalyzer").log([&](auto& message) {
47  message << "TNS size: " << tns->size() << "\n";
48 
49  auto const& trigpaths = tns->getTrigPaths();
50  message << "dumpTriggernamesServiceInfo called from PathAnalyzer::" << where << '\n';
51  message << "trigger paths are:";
52  for (auto const& p : trigpaths) {
53  message << " " << p;
54  }
55  message << '\n';
56 
57  for (auto const& p : trigpaths) {
58  message << "path name: " << p << " contains:";
59  for (auto const& m : tns->getTrigPathModules(p)) {
60  message << " " << m;
61  }
62  message << '\n';
63  }
64 
65  message << "trigger ParameterSet:\n" << tns->getTriggerPSet() << '\n';
66  });
67  }
68 
69 } // namespace edmtest
70 
void analyze(edm::StreamID, edm::Event const &, edm::EventSetup const &) const override
Definition: PathAnalyzer.cc:36
Strings const & getTrigPathModules(std::string const &name) const
PathAnalyzer(edm::ParameterSet const &)
Definition: PathAnalyzer.cc:32
edm::ParameterSet const & getTriggerPSet() const
Strings const & getTrigPaths() const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void dumpTriggerNamesServiceInfo(char const *where) const
Definition: PathAnalyzer.cc:44
~PathAnalyzer() override
Definition: PathAnalyzer.cc:34
void endJob() override
Definition: PathAnalyzer.cc:42
Log< level::Info, false > LogInfo
void beginJob() override
Definition: PathAnalyzer.cc:40