12extern "C" void* (*
dlsym(
void* handle,
const char* symbol))();
24 std::cout <<
"Already loaded handle " <<
fHandle << std::endl;
29 std::ostringstream str;
30 str <<
DRED <<
"No data parser library provided! Please provided the location of the parser library via .grsirc file or on the command line." <<
RESET_COLOR;
31 throw std::runtime_error(str.str());
35 std::ostringstream str;
37 throw std::runtime_error(str.str());
42 std::ostringstream str;
44 std::cout <<
"dlerror: '" << dlerror() <<
"'" << std::endl;
45 throw std::runtime_error(str.str());
48#pragma GCC diagnostic push
49#pragma GCC diagnostic ignored "-Wcast-function-type"
58#pragma GCC diagnostic pop
61 std::ostringstream str;
63 throw std::runtime_error(str.str());
bool FileExists(const char *filename)
static TGRSIOptions * Get(int argc=0, char **argv=nullptr)
Do not use!
void ParserLibrary(std::string &library)
TDataParser *(* fCreateDataParser)()
std::string(* fLibraryVersion)()
void(* fDestroyRawFile)(TRawFile *)
void Load()
if necessary loads shared object library and sets/initializes all other functions
void(* fDestroyDataParser)(TDataParser *)
TRawFile *(* fCreateRawFile)(const std::string &)
void * fHandle
handle for shared object library
static void SetLibraryVersion(const char *ver)
static void SetLibraryPath(const char *ver)