ATLAS Offline Software
Functions
Athena::DsoUtils Namespace Reference

Functions

bool inDso (const RootDataMember &mem, const std::string &dsoname)
 
std::string libNativeName (const std::string &libName)
 

Function Documentation

◆ inDso()

bool Athena::DsoUtils::inDso ( const RootDataMember mem,
const std::string &  dsoname 
)

Definition at line 46 of file AthDsoUtils.cxx.

48 {
49 #ifdef _WIN32
50  char sep = '\\';
51 #else
52  char sep = '/';
53 #endif
54 
55  std::string srcname = dsoName(mem);
56  if (srcname.empty()) {
57  // we do not know the name of the library, let's guess it's OK
58  return true;
59  }
60 
61  std::string::size_type pos = dsoname.find_last_of(sep);
62  std::string curname;
63  if (std::string::npos == pos) {
64  curname = dsoname;
65  } else {
66  curname = dsoname.substr(pos+1);
67  }
68 
69  return srcname == curname;
70 }

◆ libNativeName()

std::string Athena::DsoUtils::libNativeName ( const std::string &  libName)
inline

Definition at line 25 of file AthDsoUtils.cxx.

26 {
27 #if defined(_WIN32)
28  return libName+".dll";
29 #elif defined(__linux) || defined(__APPLE__)
30  return "lib"+libName+".so";
31 #else
32  // variant of the GIGO design pattern
33  return libName;
34 #endif
35 }
checkPlugins.libName
libName
Definition: checkPlugins.py:143
grepfile.sep
sep
Definition: grepfile.py:38
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18