296 typedef boost::tokenizer<boost::char_separator<char> > Tokenizer_t;
297 typedef std::vector<fs::path> Paths_t;
299 std::set<std::string> dsofiles;
301 std::string dsopath = System::getEnv(
"LD_LIBRARY_PATH");
302 std::string rootsys = System::getEnv(
"ROOTSYS");
304 Tokenizer_t tok(dsopath, boost::char_separator<char>(
":"));
310 if (itr->starts_with(rootsys)) {
317 Paths_t dir_content {fs::directory_iterator(
p),
318 fs::directory_iterator()};
322 ipath_end = dir_content.end();
327 bool is_components =
false;
328 if (dsomap.extension() == Components)
329 is_components =
true;
330 else if (dsomap.extension() != RootMap)
336 dsofiles.insert(dsomap.c_str());
337 std::ifstream
f(dsomap.c_str());
343 std::getline(
f,
line);
351 else if (
line.compare (0, 8,
"Library.")==0) {
354 boost::is_any_of(
" "),
355 boost::token_compress_on);
357 std::cerr <<
"DsoDb:: **error** could not parse "
358 << dsomap <<
":" << line_nbr
360 <<
"DsoDb:: (some) reflex-dicts may fail to be autoloaded"
365 if (::is_rootcint_dict(libname)) {
369 libname = ::getlibname(libname);
370 boost::algorithm::replace_all(dso_key,
"Library.",
"");
371 boost::algorithm::replace_all(dso_key,
":",
"");
376 else if (
line[0] ==
'[') {
377 libname =
line.substr (1,
line.size()-2);
379 if (::is_rootcint_dict(libname)) {
383 if (!libname.empty())
384 lastlib = ::getlibname (libname);
388 else if (
line.compare(0, 8,
"# --End ")==0) {
393 else if (
line.compare(0, 6,
"class ")==0) {
399 else if (is_components &&
line.compare(0, 3,
"lib") ==0) {
400 std::string::size_type
pos =
line.find (
':');
401 if (
pos == std::string::npos)
continue;
406 if (dso_key.compare(0, 6,
"_PERS_")==0 ||
407 dso_key.compare(0, 7,
"_TRANS_")==0)
410 if (libname.find (
"AthenaPoolPoolCnv") != std::string::npos)
414 if (libname.empty() || dso_key.empty())
continue;
416 const std::string fullpath_libname =
to_string(dsomap.parent_path() /
fs::path(libname));
421 if (dso_key.starts_with(PluginNs) || is_components) {
426 if (
db->find(dso_key) ==
db->end()) {
427 db->insert(std::make_pair(dso_key, Strings_t()));
429 (*db)[dso_key].push_back(fullpath_libname);