Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PrintConfigTools.cc
Go to the documentation of this file.
2 #include <string>
3 #include <vector>
4 #include <iostream>
5 #include "FWCore/ParameterSet/interface/ParameterSet.h"
6 #include "FWCore/Utilities/interface/InputTag.h"
7 #include "boost/format.hpp"
8 
9 void PrintHeaderWithBranch(edm::ParameterSet const& config, std::string branch) {
10  std::string label = config.getParameter<std::string>("@module_label");
11  std::string type = config.getParameter<std::string>("@module_type");
12  std::string header = (boost::format("%-39s%39s") % type % label).str();
13  // std::string flow = (boost::format("%s") % branch).str();
14  std::cout << std::string(78, '-') << "\n";
15  std::cout << header << "\n";
16  std::cout << boost::format("%-15s : %-60s\n") % "Branch" % branch;
17 }
18 
19 void PrintHeaderWithProduces(edm::ParameterSet const& config,
20  edm::InputTag const& in, std::string branch) {
21  std::string label = config.getParameter<std::string>("@module_label");
22  std::string type = config.getParameter<std::string>("@module_type");
23  std::string header = (boost::format("%-39s%39s") % type % label).str();
24  // std::string flow = (boost::format("%s --> %s") % in.encode() % branch).str();
25  std::cout << std::string(78, '-') << "\n";
26  std::cout << header << "\n";
27  // std::cout << "Produces: " << flow << "\n";
28  std::cout << boost::format("%-15s : %-60s\n") % "Input" % in.encode();
29  std::cout << boost::format("%-15s : %-60s\n") % "Branch" % branch;
30 
31 }
32 
33 void PrintOptional(unsigned depth, bool value, std::string text) {
34  std::cout << boost::format("%s- [%c] %s\n")
35  % std::string(depth, ' ')
36  % (value ? 'x' : ' ')
37  % text;
38 }
39 
void PrintHeaderWithBranch(edm::ParameterSet const &config, std::string branch)
void PrintOptional(unsigned depth, bool value, std::string text)
void PrintHeaderWithProduces(edm::ParameterSet const &config, edm::InputTag const &in, std::string branch)