Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
Framework
Art
detail
md-summary
MetadataSummaryForMFStatsPlugin.h
Go to the documentation of this file.
1
#ifndef art_Framework_Art_detail_md_summary_MetadataSummaryForMFStatsPlugin_h
2
#define art_Framework_Art_detail_md_summary_MetadataSummaryForMFStatsPlugin_h
3
4
#include "
art/Framework/Art/detail/LibraryInfoCollection.h
"
5
#include "
art/Framework/Art/detail/MetadataSummary.h
"
6
#include "
art/Framework/Art/detail/PrintFormatting.h
"
7
8
#include <iomanip>
9
#include <sstream>
10
#include <string>
11
12
namespace
art::detail
{
13
14
template
<>
15
class
MetadataSummaryFor
<
suffix_type
::
mfStatsPlugin
>
16
:
public
MetadataSummary
{
17
public
:
18
MetadataSummaryFor
(
LibraryInfoCollection
const
& coll)
19
: widths_{
std::to_string
(coll.size()).
size
(),
20
columnWidth
(coll,
21
&
LibraryInfo::short_spec
,
22
"Statistics destination type"
),
23
columnWidth
(coll, &
LibraryInfo::path
,
"Source location"
)}
24
{}
25
26
private
:
27
Widths
widths_
;
28
Widths
const
&
29
doWidths
()
const override
30
{
31
return
widths_;
32
}
33
34
std::string
35
doHeader
()
const override
36
{
37
std::ostringstream
result
;
38
result <<
indent
(widths_[0] + 2) <<
std::setw
(widths_[1] + 4) <<
std::left
39
<<
"Statistics destination type"
<<
std::left
<<
"Source location"
;
40
return
result.str();
41
}
42
43
Summary
44
doSummary
(
LibraryInfo
const
& li, std::size_t
const
entry
)
const override
45
{
46
std::ostringstream
result
;
47
result <<
std::setw
(widths_[0]) <<
std::right
<< entry <<
". "
48
<<
std::setw
(widths_[1] + 4) <<
std::left
<< li.
short_spec
()
49
<<
std::left
<< li.
path
() <<
"\n"
;
50
return
{result.str(),
false
};
51
}
52
};
53
}
54
55
#endif
/* art_Framework_Art_detail_md_summary_MetadataSummaryForMFStatsPlugin_h */
56
57
// Local variables:
58
// mode: c++
59
// End:
art::detail::Widths
std::vector< std::size_t > Widths
Definition:
PrintFormatting.h:65
art::detail::MetadataSummaryFor< suffix_type::mfStatsPlugin >::doWidths
Widths const & doWidths() const override
Definition:
MetadataSummaryForMFStatsPlugin.h:29
entry
QList< Entry > entry
Definition:
tclscanner.cpp:1150
result
static QCString result
Definition:
fortranscanner.cpp:56614
art::suffix_type::mfStatsPlugin
string
std::string string
Definition:
nybbler.cc:12
art::detail::Summary
Definition:
MetadataSummary.h:18
art::detail::columnWidth
std::size_t columnWidth(T const &coll, std::string const Elem::*cp, std::string const &header)
Definition:
PrintFormatting.h:41
PrintFormatting.h
art::detail::MetadataSummaryFor
Definition:
MetadataSummary.h:13
art::detail::MetadataSummaryFor< suffix_type::mfStatsPlugin >::widths_
Widths widths_
Definition:
MetadataSummaryForMFStatsPlugin.h:27
LibraryInfoCollection.h
util::size
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition:
StdUtils.h:92
art::detail
Definition:
AllowedConfiguration.h:76
art::detail::LibraryInfo
Definition:
LibraryInfo.h:12
art::detail::indent
std::string indent(std::size_t const i)
Definition:
PrintFormatting.h:17
art::detail::MetadataSummaryFor< suffix_type::mfStatsPlugin >::MetadataSummaryFor
MetadataSummaryFor(LibraryInfoCollection const &coll)
Definition:
MetadataSummaryForMFStatsPlugin.h:18
art::detail::MetadataSummaryFor< suffix_type::mfStatsPlugin >::doHeader
std::string doHeader() const override
Definition:
MetadataSummaryForMFStatsPlugin.h:35
MetadataSummary.h
art::suffix_type
suffix_type
Definition:
PluginSuffixes.h:59
wirecell.validate.cmaps.right
right
Definition:
cmaps.py:84
setw
Q_EXPORT QTSManip setw(int w)
Definition:
qtextstream.h:331
art::detail::LibraryInfo::short_spec
std::string const & short_spec() const
Definition:
LibraryInfo.h:43
wirecell.validate.cmaps.left
left
Definition:
cmaps.py:84
art::detail::MetadataSummaryFor< suffix_type::mfStatsPlugin >::doSummary
Summary doSummary(LibraryInfo const &li, std::size_t const entry) const override
Definition:
MetadataSummaryForMFStatsPlugin.h:44
art::detail::LibraryInfo::path
std::string const & path() const
Definition:
LibraryInfo.h:53
art::detail::MetadataSummary
Definition:
MetadataSummary.h:23
art::to_string
std::string to_string(ModuleType const mt)
Definition:
ModuleType.h:34
art::detail::LibraryInfoCollection
std::multiset< LibraryInfo > LibraryInfoCollection
Definition:
LibraryInfoCollection.h:10
Generated by
1.8.11