Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:37

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 #include <string>
0014 #include <sstream>
0015 #include <map>
0016 #include <set>
0017 #include <typeinfo>
0018 #include <utility>
0019 
0020 #define Gaudi DD4hep_Flavor
0021 
0022 #ifdef __clang__
0023 #pragma clang diagnostic push
0024 #pragma clang diagnostic ignored "-Wkeyword-macro"
0025 #endif
0026 
0027 #define private public
0028 // This define will give us a version of the gaudi plugin manager,
0029 // which will NOT clash with Gaudi! It of course has a correspondance in the
0030 // compiler options of the GaudiPluginService package.
0031 #include "Gaudi/PluginService.h"
0032 #undef private
0033 
0034 #ifdef __clang__
0035 #pragma clang diagnostic pop
0036 #endif
0037 
0038 extern "C"  {
0039   /// Access debug level
0040   int dd4hep_pluginmgr_getdebug()   {
0041     return (int)Gaudi::PluginService::Debug();
0042   }
0043   /// Set debug level
0044   int dd4hep_pluginmgr_setdebug(int value)   {
0045     int debug = dd4hep_pluginmgr_getdebug();
0046     Gaudi::PluginService::SetDebug(value);
0047     return debug;
0048   }
0049   /// Access factory by name
0050   void* dd4hep_pluginmgr_create(const char* id, const char* sig)   {
0051     return Gaudi::PluginService::Details::getCreator(id,sig);
0052   }
0053   /// Add a new factory to the registry
0054   void dd4hep_pluginmgr_add_factory(const char* id, void* stub, const char* sig, const char* ret)   {
0055     Gaudi::PluginService::Details::Registry::instance().add(id,stub,sig,ret,id);
0056   }
0057 }
0058