48 return "PROCESS NAME";
55 "PRODUCT INSTANCE NAME",
57 "PRODUCT FRIENDLY TYPE",
62 using ProductInfos = std::vector<art::detail::ProductInfo>;
64 columnWidthFirst(std::map<std::string, ProductInfos>
const&
m,
67 std::size_t i{title.size()};
74 columnWidth(std::map<std::string, ProductInfos>
const& m,
78 std::size_t i{title.size()};
79 for (
auto const&
entry : m) {
80 for (
auto const&
pi :
entry.second) {
102 wantProductFullClassName()};
119 template <
typename P>
120 void printPrincipal(
P const&
p);
122 void printProductInfo(std::vector<std::size_t>
const& columnWidths,
166 template <
typename P>
174 size_t not_present{0};
175 std::map<std::string, std::vector<detail::ProductInfo>> products;
177 auto const& dinfo = dummyInfo();
179 products[dummyProcess()].emplace_back(dinfo);
181 for (
auto const& pr : p) {
182 auto const&
g = *pr.second;
183 auto const& pd =
g.productDescription();
186 EDProduct const* product = oh.isValid() ? oh.wrapper() :
nullptr;
187 bool const productPresent = product !=
nullptr && product->
isPresent();
189 if (productPresent) {
197 pd.productInstanceName(),
198 pd.producedClassName(),
199 pd.friendlyClassName(),
201 product_size(product, productPresent)};
202 products[pd.processName()].emplace_back(
std::move(
pi));
209 std::vector<std::size_t>
const widths{
210 columnWidthFirst(products, dummyProcess()),
224 for (
auto const& processConfig : p.processHistory()) {
225 auto const&
processName = processConfig.processName();
231 std::cout <<
"\nTotal products (present, not present): " 232 <<
present + not_present <<
" (" <<
present <<
", " << not_present
241 std::ostringstream oss;
242 oss <<
cet::rpad(processName, widths[0],
'.') <<
" | " 255 std::cout << oss.str() <<
'\n';
std::string instance_name
std::string const & processName() const
bool const wantResolveProducts_
static constexpr double g
void write(EventPrincipal &e) override
auto const & get_PSet() const
std::size_t columnWidth(T const &coll, std::string const Elem::*cp, std::string const &header)
ChannelGroupService::Name Name
std::string rpad(std::string const &pad_me, std::string::size_type wanted_size, char char_to_pad_with= ' ')
std::string lpad(std::string const &pad_me, std::string::size_type wanted_size, char char_to_pad_with= ' ')
FileDumperOutput(Parameters const &)
std::pair< float, std::string > P
size_t write(int, const char *, size_t)
Writes count bytes from buf to the filedescriptor fd.
void printPrincipal(P const &p)
QCollection::Item first()
#define DEFINE_ART_MODULE(klass)
void printProductInfo(std::vector< std::size_t > const &columnWidths, std::string const &processName, detail::ProductInfo const &pi) const
bool const wantProductID_
bool const wantPresentOnly_
static int max(int a, int b)
static constexpr double ps
bool const wantProductFullClassName_
std::string const & BranchTypeToString(BranchType const bt)
void writeRun(RunPrincipal &r) override
void readResults(ResultsPrincipal const &resp) override
fhicl::TableFragment< OutputModule::Config > omConfig
virtual std::string productSize() const
auto for_all(FwdCont &, Func)
void writeSubRun(SubRunPrincipal &sr) override
static constexpr double sr
std::string to_string(ModuleType const mt)
constexpr ProductStatus present() noexcept
QTextStream & endl(QTextStream &s)
std::string friendly_type
bool const wantProductFriendlyClassName_