20 std::string const regex_prefix{
"([-A-Za-z0-9]*_)*"};
21 std::regex
const slash{
"/"};
22 std::regex
const artPrefix{R
"(\S*art/.*)"}; 25 plugin_suffix(std::size_t
const sz)
27 return sz != 1ull ?
"s" :
"";
34 std::size_t
const width,
35 std::size_t
const denom,
37 : libType_{libType}, w_{width}, d_{denom}, v_{
verbose}
50 print_progress(std::size_t
const num)
const 54 std::size_t
const per{100 * num / d_};
56 << d_ <<
" " << libType_ << plugin_suffix(d_) <<
" (" << per
71 std::string const canonSpec = std::regex_replace(spec, slash,
"_");
72 return regex_prefix + canonSpec +
"_";
78 return std::regex_search(fullSpec, artPrefix) ?
"art" :
"user";
81 inline std::vector<std::string>
84 std::vector<std::string>
result;
92 bool const print_only_message = (spec ==
"scheduler");
95 if (print_only_message || print_available_services) {
98 std::make_pair(
"scheduler",
""),
113 bool const print_only_message = (spec ==
"message");
116 if (print_only_message || print_available_services) {
119 std::make_pair(
"message",
""),
121 "https://cdcvs.fnal.gov/redmine/projects/art/wiki/Messagefacility ]",
138 return "<module_label>";
141 return "<plugin_label>";
144 return "<tool_label>";
150 return "<destination_label>";
153 return "<statistics_destination_label>";
166 auto const& libs = getLibraries(lm);
167 auto const sz = libs.size();
169 StatusBar
const status_bar{lm.
libType(),
w, sz, verbose};
170 for (
auto const& lib : libs) {
173 libspecs.second.empty() ? libspecs.first : libspecs.second;
182 status_bar.print_progress(++i);
188 collection_for_services(
std::string const& spec,
bool const verbose)
191 std::set<std::string>
const systemServicesToIgnore{
"TriggerNamesService"};
194 auto libs = getLibraries(lm);
197 libs.erase(std::remove_if(libs.begin(),
199 [&lm, &systemServicesToIgnore](
auto const& path) {
201 systemServicesToIgnore,
208 StatusBar
const status_bar{
212 for (
auto const& lib : libs) {
218 std::make_pair(shortspec, fullspec),
221 lm, shortspec, shortspec),
222 getProvider(fullspec),
225 status_bar.print_progress(++i);
227 if (scheduler_included(spec, result)) {
228 status_bar.print_progress(++i);
230 if (messagefacility_included(spec, result)) {
231 status_bar.print_progress(++i);
245 return collection_for_services(pattern, verbose);
247 return collection_for_plugins(suffix, pattern, verbose);
std::string getType(cet::LibraryManager const &lm, std::string const &fullSpec)
static std::string const & mfStatsPlugin()
LibraryInfoCollection get_LibraryInfoCollection(std::string const &suffix, std::string const &pattern, bool verbose=false)
static std::string const & source()
std::unique_ptr< fhicl::ConfigurationTable > getAllowedConfiguration(cet::LibraryManager const &lm, std::string const &fullSpec, std::string const &name)
bool search_all(FwdCont const &, Datum const &)
std::pair< std::string, std::string > getSpecsByPath(std::string const &lib_loc) const
QTextStream & flush(QTextStream &s)
size_t getLoadableLibraries(std::vector< std::string > &list) const
std::string getFilePath(cet::LibraryManager const &lm, std::string const &fullspec)
static std::string const & plugin()
static std::string const & tool()
Q_EXPORT QTSManip setw(int w)
static std::string const & mfPlugin()
static std::string const & service()
static std::string const & module()
constexpr char const * dflt_spec_pattern()
std::string libType() const
std::string to_string(ModuleType const mt)
std::multiset< LibraryInfo > LibraryInfoCollection