Revision 183f3fe9a10bdeb05eba42cf31db31e546cad27a authored by Vassil Vassilev on 08 January 2024, 10:21:54 UTC, committed by Vincenzo Eduardo Padulano on 17 January 2024, 12:13:52 UTC
Symbol lookup is a quite expensive operation and might result in JIT
compilation and library loading.

Co-authored-by: Jonas Hahnfeld <jonas.hahnfeld@cern.ch>
1 parent 6a854cb
Raw File
libs.C
#include "TString.h"
#include "TInterpreter.h"
#include "TSystem.h"

void libs(TString classname)
{
   const char *libname;

   // Find in which library classname sits
   classname.ReplaceAll("_1",":");
   classname.ReplaceAll("_01"," ");
   int i = classname.Index("_3");
   if (i>0) classname.Remove(i,classname.Length()-i);

   libname = gInterpreter->GetClassSharedLibs(classname.Data());
   if (!libname)
      return;

   printf("mainlib=%s", libname);
}
back to top