14# pragma warning( disable : 279 )
37#include <boost/algorithm/string/case_conv.hpp>
38#include <boost/algorithm/string/classification.hpp>
39#include <boost/algorithm/string/replace.hpp>
40#include <boost/algorithm/string/split.hpp>
41#include <boost/algorithm/string/trim.hpp>
42#include <boost/filesystem/exception.hpp>
43#include <boost/filesystem/operations.hpp>
44#include <boost/log/core.hpp>
45#include <boost/log/expressions.hpp>
46#include <boost/log/trivial.hpp>
47#include <boost/log/utility/setup/common_attributes.hpp>
48#include <boost/log/utility/setup/console.hpp>
49#include <boost/program_options.hpp>
50#include <boost/regex.hpp>
51#include <boost/tokenizer.hpp>
54#include <fmt/format.h>
62namespace po = boost::program_options;
63namespace fs = boost::filesystem;
65#define LOG_ERROR BOOST_LOG_TRIVIAL( error )
66#define LOG_WARNING BOOST_LOG_TRIVIAL( warning )
67#define LOG_INFO BOOST_LOG_TRIVIAL( info )
80 std::string quote( std::string_view sv ) {
82 s << std::quoted( sv,
'\'' );
86 const std::string py_tab =
" ";
90 const boost::regex pythonIdentifier(
"^[a-zA-Z_][a-zA-Z0-9_]*$" );
93 enum class component_t {
112 const std::map<std::string, component_t> allowedFactories{
113 {
typeid( Gaudi::Algorithm::Factory::FactoryType ).name(), component_t::Algorithm },
114 {
typeid( Service::Factory::FactoryType ).name(), component_t::Service },
115 {
typeid( AlgTool::Factory::FactoryType ).name(), component_t::AlgTool },
117 {
typeid( Gaudi::Auditor::Factory::FactoryType ).name(), component_t::Auditor },
120 const std::string& toString( component_t type ) {
121 static const std::array<std::string, 11> names = {
"Module",
"DefaultName",
"Algorithm",
"AlgTool",
122 "Auditor",
"Service",
"ApplicationMgr",
"IInterface",
123 "Converter",
"DataObject",
"Unknown" };
124 return names.at(
static_cast<std::underlying_type_t<component_t>
>( type ) );
126 std::ostream&
operator<<( std::ostream& os, component_t type ) {
return os << toString( type ); }
128 std::set<std::string> ignored_interfaces{
129 {
"IInterface",
"IProperty",
"INamedInterface",
"IAlgorithm",
"IAlgTool",
"IService",
"IAuditor" } };
133 std::string pythonizeName(
const std::string& name ) {
134 static const string in(
"<>&*,: ()." );
135 static const string out(
"__rp__s___" );
136 auto r = boost::algorithm::replace_all_copy( name,
", ",
"," );
137 for (
auto& c : r ) {
138 auto rep = in.find( c );
139 if ( rep != string::npos ) c = out[rep];
144 template <
typename T>
145 std::type_index typeIndex() {
146 return std::type_index{
typeid( T ) };
149 inline std::string libNativeName(
const std::string& libName ) {
150#if defined( __linux ) || defined( __APPLE__ )
151 return "lib" + libName +
".so";
233 bool genComponent(
const std::string& libName,
const std::string& componentName, component_t componentType,
234 const vector<PropertyBase*>& properties,
235 const Gaudi::PluginService::Details::Registry::FactoryInfo& info );
237 bool genComponent2(
const std::string& componentName, component_t componentType,
238 const vector<PropertyBase*>& properties,
const std::vector<std::string>& interfaces,
239 const Gaudi::PluginService::Details::Registry::FactoryInfo& info );
241 void genImport( std::ostream& s, std::string_view frmt, std::string indent );
242 void genHeader( std::ostream& pyOut, std::ostream& dbOut );
243 void genBody( std::ostream& pyOut, std::ostream& dbOut ) {
244 pyOut <<
m_pyBuf.str() << flush;
245 dbOut <<
m_dbBuf.str() << flush;
247 void genTrailer( std::ostream& pyOut, std::ostream& dbOut );
256 namespace logging = boost::log;
257 namespace keywords = boost::log::keywords;
258 namespace expr = boost::log::expressions;
260 logging::add_console_log( std::cout, keywords::format =
261 ( expr::stream <<
"[" << std::setw( 7 ) << std::left
262 << logging::trivial::severity <<
"] " << expr::smessage ) );
264 logging::core::get()->set_filter( logging::trivial::severity >= level );
268int main(
int argc,
char** argv )
272 ? boost::log::trivial::info
273 : boost::log::trivial::warning );
275 fs::path pwd = fs::initial_path();
279 std::string userModule;
282 po::options_description
generic(
"Generic options" );
283 generic.add_options()(
"help,h",
"produce this help message" )(
284 "package-name,p", po::value<string>(),
"name of the package for which we create the configurables file" )(
285 "input-libraries,i", po::value<string>(),
"libraries to extract the component configurables from" )(
286 "input-cfg,c", po::value<string>(),
287 "path to the cfg file holding the description of the Configurable base "
288 "classes, the python module holding the Configurable definitions, etc..." )(
289 "output-dir,o", po::value<string>()->default_value(
"../genConfDir" ),
290 "output directory for genconf files." )(
"debug-level,d", po::value<int>()->default_value( 0 ),
"debug level" )(
291 "load-library,l", po::value<Strings_t>()->composing(),
"preloading library" )(
292 "user-module,m", po::value<string>(),
"user-defined module to be imported by the genConf-generated one" )(
293 "no-init",
"do not generate the (empty) __init__.py [deprecated]" )(
294 "type", po::value<string>()->default_value(
"conf,conf2" ),
"comma-separate types of configurables to generate" );
298 po::options_description config(
"Configuration" );
299 config.add_options()(
"configurable-module", po::value<string>()->default_value(
"AthenaCommon" ),
300 "Name of the module holding the configurable classes" )(
301 "configurable-default-name", po::value<string>()->default_value(
"Configurable.DefaultName" ),
302 "Default name for the configurable instance" )(
"configurable-algorithm",
303 po::value<string>()->default_value(
"ConfigurableAlgorithm" ),
304 "Name of the configurable base class for Algorithm components" )(
305 "configurable-algtool", po::value<string>()->default_value(
"ConfigurableAlgTool" ),
306 "Name of the configurable base class for AlgTool components" )(
307 "configurable-auditor", po::value<string>()->default_value(
"ConfigurableAuditor" ),
308 "Name of the configurable base class for Auditor components" )(
309 "configurable-service", po::value<string>()->default_value(
"ConfigurableService" ),
310 "Name of the configurable base class for Service components" );
312 po::options_description cmdline_options;
313 cmdline_options.add( generic ).add( config );
315 po::options_description config_file_options;
316 config_file_options.add( config );
318 po::options_description visible(
"Allowed options" );
319 visible.add( generic ).add( config );
321 po::variables_map vm;
324 po::store( po::command_line_parser( argc, argv ).options( cmdline_options ).run(), vm );
329 if ( vm.contains(
"input-cfg" ) ) {
330 string cfgFileName = vm[
"input-cfg"].as<
string>();
331 cfgFileName = fs::system_complete( fs::path( cfgFileName ) ).string();
332 std::ifstream ifs( cfgFileName );
333 po::store( parse_config_file( ifs, config_file_options ), vm );
337 }
catch ( po::error& err ) {
338 LOG_ERROR <<
"error detected while parsing command options: " << err.what();
343 if ( vm.contains(
"help" ) ) {
344 cout << visible << endl;
348 if ( vm.contains(
"no-init" ) ) { cout <<
"WARNING: option --no-init is deprecated as it is not needed anymore.\n"; }
350 if ( vm.contains(
"package-name" ) ) {
351 pkgName = vm[
"package-name"].as<
string>();
354 cout << visible << endl;
358 if ( vm.contains(
"user-module" ) ) {
359 userModule = vm[
"user-module"].as<
string>();
360 LOG_INFO <<
"INFO: will import user module " << userModule;
363 if ( vm.contains(
"input-libraries" ) ) {
367 std::string tmp = vm[
"input-libraries"].as<std::string>();
369 boost::split( libs, tmp, boost::is_any_of(
" " ), boost::token_compress_on );
371 LOG_ERROR <<
"input component library(ies) required";
372 cout << visible << endl;
376 if ( vm.contains(
"output-dir" ) ) { out = fs::system_complete( fs::path( vm[
"output-dir"].as<string>() ) ); }
378 if ( vm.contains(
"debug-level" ) ) { Gaudi::PluginService::SetDebug( vm[
"debug-level"].as<int>() ); }
380 if ( vm.contains(
"load-library" ) ) {
381 for (
const auto& lLib : vm[
"load-library"].as<Strings_t>() ) {
385 if ( err != 1 )
LOG_WARNING <<
"failed to load: " << lLib;
389 std::set<conf_t> confTypes;
390 if ( vm.contains(
"type" ) ) {
391 for (
const std::string& type : boost::tokenizer{ vm[
"type"].as<std::string>(), boost::char_separator{
"," } } ) {
392 if ( type ==
"conf" ) {
393 confTypes.insert( conf_t::CONF );
394 }
else if ( type ==
"conf2" ) {
395 confTypes.insert( conf_t::CONF2 );
397 LOG_ERROR <<
"unknown configurable type: " << type;
398 cout << visible << endl;
404 if ( !fs::exists( out ) ) {
406 fs::create_directory( out );
407 }
catch ( fs::filesystem_error& err ) {
408 LOG_ERROR <<
"error creating directory: " << err.what();
414 std::ostringstream msg;
415 msg <<
":::::: libraries : [ ";
416 std::copy( libs.begin(), libs.end(), std::ostream_iterator<std::string>( msg,
" " ) );
430 int sc = EXIT_FAILURE;
433 }
catch ( exception& e ) {
434 cout <<
"ERROR: Could not generate Configurable(s) !\n"
435 <<
"ERROR: Got exception: " << e.what() << endl;
440 std::ostringstream msg;
441 msg <<
":::::: libraries : [ ";
442 std::copy( libs.begin(), libs.end(), std::ostream_iterator<std::string>( msg,
" " ) );
443 msg <<
"] :::::: [DONE]";
453 const auto endLib = libs.end();
455 static const std::string gaudiSvc =
"GaudiCoreSvc";
456 const bool isGaudiSvc =
457 std::find_if( libs.begin(), endLib, [](
const auto& s ) {
458 return s.find( gaudiSvc ) != std::string::npos;
463 cout <<
"ERROR: ApplicationMgr can not be created. Check environment" << endl;
468 using Gaudi::PluginService::Details::Registry;
469 const Registry& registry = Registry::instance();
471 auto bkgNames = registry.loadedFactoryNames();
480 for (
const auto& iLib : libs ) {
481 std::string lib = fs::path( iLib ).stem().string();
482 if ( lib.compare( 0, 3,
"lib" ) == 0 ) {
483 lib = lib.substr( 3 );
485 LOG_INFO <<
":::: processing library: " << iLib <<
"...";
503 const auto& factories = registry.factories();
504 for (
const auto& factoryName : registry.loadedFactoryNames() ) {
505 if ( bkgNames.find( factoryName ) != bkgNames.end() ) {
506 if ( Gaudi::PluginService::Details::logger().level() <= 1 ) {
507 LOG_INFO <<
"\t==> skipping [" << factoryName <<
"]...";
511 auto entry = factories.find( factoryName );
512 if ( entry == end( factories ) ) {
513 LOG_ERROR <<
"inconsistency in component factories list: I cannot find anymore " << factoryName;
516 const auto& info = entry->second;
517 if ( !info.is_set() )
continue;
520 if ( !info.getprop(
"ReflexName" ).empty() )
continue;
526 if ( libNativeName( lib ) != info.library ) {
527 LOG_WARNING <<
"library [" << lib <<
"] exposes factory [" << factoryName <<
"] which is declared in ["
528 << info.library <<
"] !!";
532 component_t type = component_t::Unknown;
534 const auto ft = allowedFactories.find( info.factory.type().name() );
535 if ( ft != allowedFactories.end() ) {
537 }
else if ( factoryName ==
"ApplicationMgr" ) {
538 type = component_t::ApplicationMgr;
544 std::string name = boost::trim_copy( factoryName );
546 const auto className = info.getprop(
"ClassName" );
547 LOG_INFO <<
" - component: " << className <<
" (" << ( className != name ? ( name +
": " ) : std::string() )
550 string cname =
"DefaultName";
554 case component_t::Algorithm:
555 prop =
SmartIF<IAlgorithm>( Gaudi::Algorithm::Factory::create( factoryName, cname, svcLoc ).release() );
557 case component_t::Service:
558 prop =
SmartIF<IService>( Service::Factory::create( factoryName, cname, svcLoc ).release() );
560 case component_t::AlgTool:
562 SmartIF<IAlgTool>( AlgTool::Factory::create( factoryName, cname, toString( type ), dummySvc ).release() );
566 case component_t::Auditor:
569 case component_t::ApplicationMgr:
575 }
catch ( exception& e ) {
576 LOG_ERROR <<
"Error instantiating " << name <<
" from " << iLib;
577 LOG_ERROR <<
"Got exception: " << e.what();
581 LOG_ERROR <<
"Error instantiating " << name <<
" from " << iLib;
590 !
genComponent2( name, type, prop->getProperties(), prop->getInterfaceNames(), info ) ) {
595 LOG_ERROR <<
"could not cast IInterface* object to an IProperty* !";
596 LOG_ERROR <<
"NO Configurable will be generated for [" << name <<
"] !";
605 const std::string pyName = ( fs::path(
m_outputDirName ) / fs::path( lib +
"Conf.py" ) ).
string();
606 const std::string dbName = ( fs::path(
m_outputDirName ) / fs::path( lib +
".confdb" ) ).
string();
608 std::fstream py( pyName, std::ios_base::out | std::ios_base::trunc );
609 std::fstream db( dbName, std::ios_base::out | std::ios_base::trunc );
612 if ( !userModule.empty() ) py <<
"from " << userModule <<
" import *" << endl;
617 const std::string db2Name = ( fs::path(
m_outputDirName ) / fs::path( lib +
".confdb2_part" ) ).
string();
618 std::fstream db2( db2Name, std::ios_base::out | std::ios_base::trunc );
619 db2 <<
"{\n" <<
m_db2Buf.str() <<
"}\n";
627 return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
632 std::string::size_type pos = 0, nxtpos = 0;
635 while ( std::string::npos != pos ) {
637 nxtpos =
m_configurable[component_t::Module].find_first_of(
',', pos );
640 mod =
m_configurable[component_t::Module].substr( pos, nxtpos - pos );
641 std::ostringstream
import;
642 import << fmt::format( fmt::runtime( frmt ), mod );
646 if ( std::string::npos == nxtpos ) {
648 s << indent << import.str() << "\n
" << flush;
649 pos = std::string::npos;
651 // we have a fallback for this
652 s << indent << "try:\n
" << indent << py_tab << import.str() << "\n
" << indent << "except ImportError:\n
" << flush;
655 // increase indentation level for next iteration
660//-----------------------------------------------------------------------------
661void configGenerator::genHeader( std::ostream& py, std::ostream& db )
662//-----------------------------------------------------------------------------
665 std::string now = Gaudi::Time::current().format( true );
666 py << "#
" << now //<< "\n
"
667 << "\
"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n";
673 genImport( py,
"from {}.Configurable import *" );
676 db <<
"## -*- ascii -*- \n"
677 <<
"# db file automatically generated by genconf on: " << now <<
"\n"
685 db <<
"## " <<
m_pkgName <<
"\n" << std::flush;
690 component_t componentType,
const vector<PropertyBase*>& properties,
691 const Gaudi::PluginService::Details::Registry::FactoryInfo& info )
694 auto cname = pythonizeName( componentName );
695 const auto decl_loc = info.getprop(
"declaration_location" );
697 std::vector<std::pair<std::string, std::string>> propDoc;
698 propDoc.reserve( properties.size() );
701 m_pyBuf <<
" __slots__ = { \n";
702 for (
const auto& prop : properties ) {
703 const string& pname = prop->name();
705 if ( !boost::regex_match( pname, pythonIdentifier ) ) {
706 LOG_ERROR <<
"invalid property name \"" << pname <<
"\" in component " << cname <<
" (invalid Python identifier)"
709 m_pyBuf <<
" #ERROR-invalid identifier '" << pname <<
"'\n"
714 string pvalue, ptype;
716 m_pyBuf <<
" '" << pname <<
"' : " << pvalue <<
",\n";
718 if ( prop->documentation() !=
"none" ) {
719 propDoc.emplace_back( pname, prop->documentation() +
" [" + prop->ownerTypeName() +
"]" );
723 m_pyBuf <<
" _propertyDocDct = { \n";
724 for (
const auto& prop : propDoc ) {
725 m_pyBuf << std::setw( 5 ) <<
"'" << prop.first <<
"' : "
726 <<
"\"\"\" " << prop.second <<
" \"\"\",\n";
730 if ( !decl_loc.empty() ) {
m_pyBuf <<
" __declaration_location__ = '" << decl_loc <<
"'\n"; }
731 m_pyBuf <<
" def __init__(self, name = " <<
m_configurable[component_t::DefaultName] <<
", **kwargs):\n"
732 <<
" super(" << cname <<
", self).__init__(name)\n"
733 <<
" for n,v in kwargs.items():\n"
734 <<
" setattr(self, n, v)\n"
735 <<
" def getDlls( self ):\n"
736 <<
" return '" << libName <<
"'\n"
737 <<
" def getType( self ):\n"
738 <<
" return '" << componentName <<
"'\n"
739 <<
" pass # class " << cname <<
"\n"
743 const string pyName = ( fs::path(
m_outputDirName ) / fs::path( libName +
"Conf.py" ) ).
string();
744 const string modName = fs::path( pyName ).filename().stem().string();
747 m_dbBuf <<
m_pkgName <<
"." << modName <<
" " << libName <<
" " << cname <<
"\n" << flush;
754 const vector<PropertyBase*>& properties,
const vector<std::string>& interfaces,
755 const Gaudi::PluginService::Details::Registry::FactoryInfo& info )
758 m_db2Buf <<
" '" << componentName <<
"': {\n";
759 m_db2Buf <<
" '__component_type__': '";
760 switch ( componentType ) {
761 case component_t::Algorithm:
764 case component_t::AlgTool:
767 case component_t::ApplicationMgr:
768 case component_t::Service:
771 case component_t::Auditor:
778 const auto decl_loc = info.getprop(
"declaration_location" );
779 if ( !decl_loc.empty() ) {
m_db2Buf <<
"',\n '__declaration_location__': '" << decl_loc; }
781 m_db2Buf <<
"',\n '__interfaces__': (";
782 for (
const auto& intf : std::set<std::string>{ begin( interfaces ), end( interfaces ) } ) {
783 if ( ignored_interfaces.find( intf ) == end( ignored_interfaces ) ) {
m_db2Buf <<
'\'' << intf <<
"', "; }
785 m_db2Buf <<
"),\n 'properties': {\n";
788 for (
const auto& prop : properties ) {
789 const string& pname = prop->name();
791 if ( !boost::regex_match( pname, pythonIdentifier ) ) {
792 LOG_ERROR <<
"invalid property name \"" << pname <<
"\" in component " << componentName
793 <<
" (invalid Python identifier)" << std::endl;
794 m_db2Buf <<
" #ERROR-invalid identifier '" << pname <<
"'\n";
799 string pvalue, ptype;
802 m_db2Buf <<
" '" << pname <<
"': ('" << ptype <<
"', " << pvalue <<
", '''" << prop->documentation()
803 <<
" [" << prop->ownerTypeName() <<
"]'''";
804 auto sem = prop->semantics();
805 if ( !sem.empty() ) {
m_db2Buf <<
", '" << sem <<
'\''; }
818 const std::string cvalue = p->
toString();
819 const std::type_index ti = std::type_index( *p->
type_info() );
822 if ( ti == typeIndex<bool>() ) {
823 pvalue = ( cvalue ==
"0" || cvalue ==
"False" || cvalue ==
"false" ) ?
"False" :
"True";
824 }
else if ( ti == typeIndex<char>() || ti == typeIndex<signed char>() || ti == typeIndex<unsigned char>() ||
825 ti == typeIndex<short>() || ti == typeIndex<unsigned short>() || ti == typeIndex<int>() ||
826 ti == typeIndex<unsigned int>() || ti == typeIndex<long>() || ti == typeIndex<unsigned long>() ||
827 ti == typeIndex<long long>() || ti == typeIndex<unsigned long long>() ) {
829 }
else if ( ti == typeIndex<float>() || ti == typeIndex<double>() ) {
831 pvalue = boost::to_lower_copy( cvalue );
832 if ( std::string::npos != pvalue.find(
"nan" ) ) {
833 pvalue =
"float('nan')";
834 }
else if ( std::string::npos == pvalue.find(
"." ) && std::string::npos == pvalue.find(
"e" ) ) {
835 pvalue = cvalue +
".0";
837 }
else if ( ti == typeIndex<string>() ) {
838 pvalue = quote( cvalue );
839 }
else if ( ti == typeIndex<GaudiHandleBase>() ) {
843 pvalue = base.pythonRepr();
844 ptype = base.pythonPropertyClassName();
846 }
else if ( ti == typeIndex<GaudiHandleArrayBase>() ) {
850 pvalue = base.pythonRepr();
851 ptype = base.pythonPropertyClassName();
857 pvalue = base.pythonRepr();
860 std::ostringstream v_str;
861 v_str.setf( std::ios::showpoint );
863 pvalue = v_str.str();
874 if ( !propMgr || !appUI )
return EXIT_FAILURE;
878 propMgr->setProperty(
"AppName",
"" ).
ignore( );
880 propMgr->setProperty(
"OutputLevel", 7 ).
ignore( );
882 appUI->configure().ignore( );
884 msgSvc->setPropertyRepr(
"setWarning",
"['DefaultName', 'PropertyHolder']" )
886 msgSvc->setProperty(
"Format",
"%T %0W%M" ).ignore( );
std::ostream & operator<<(std::ostream &s, AlgsExecutionStates::State x)
Streaming of State values.
Alias for backward compatibility.
The Application Manager class.
DataHandleProperty.h GaudiKernel/DataHandleProperty.h.
A DataObject is the base class of any identifiable object on any data store.
PropertyBase base class allowing PropertyBase* collections to be "homogeneous".
const std::type_info * type_info() const
property type-info
virtual std::string toString() const =0
value -> string
virtual void toStream(std::ostream &out) const =0
value -> stream
Base class of array's of various gaudihandles.
const GaudiHandleArrayBase & value() const
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
const GaudiHandleBase & value() const
The data converters are responsible to translate data from one representation into another.
Definition of the basic interface.
virtual unsigned long addRef() const =0
Increment the reference count of Interface instance.
virtual unsigned long release() const =0
Release Interface instance.
The IProperty is the basic interface for all components which have properties that can be set or get.
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Base class for all services.
Small smart pointer class with automatic reference counting for IInterface.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
void pythonizeValue(const PropertyBase *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
void setConfigurableDefaultName(const std::string &defaultName)
customize the default name for configurable instances
void setConfigurableTypes(const std::set< conf_t > &types)
customize configurable types to generate
configGenerator(const string &pkgName, const string &outputDirName)
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
void setConfigurableAuditor(const std::string &cfgAuditor)
customize the configurable base class for AlgTool component
void genImport(std::ostream &s, std::string_view frmt, std::string indent)
std::set< conf_t > m_confTypes
Types of configurables to generate.
stringstream m_pyBuf
buffer of auto-generated configurables
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
void genTrailer(std::ostream &pyOut, std::ostream &dbOut)
bool genComponent2(const std::string &componentName, component_t componentType, const vector< PropertyBase * > &properties, const std::vector< std::string > &interfaces, const Gaudi::PluginService::Details::Registry::FactoryInfo &info)
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
std::map< component_t, std::string > m_configurable
Configurable customization.
int genConfig(const Strings_t &modules, const string &userModule)
main entry point of this class:
void setConfigurableModule(const std::string &moduleName)
customize the Module name where configurable base classes are defined
void genBody(std::ostream &pyOut, std::ostream &dbOut)
stringstream m_db2Buf
buffer of generated GaudiConfig2 configurables
void setConfigurableService(const std::string &cfgService)
customize the configurable base class for Service component
void setConfigurableAlgorithm(const std::string &cfgAlgorithm)
customize the configurable base class for Algorithm component
bool genComponent(const std::string &libName, const std::string &componentName, component_t componentType, const vector< PropertyBase * > &properties, const Gaudi::PluginService::Details::Registry::FactoryInfo &info)
void setConfigurableAlgTool(const std::string &cfgAlgTool)
customize the configurable base class for AlgTool component
string m_pkgName
name of the package we are processing
std::vector< std::string > Strings_t
void init_logging(boost::log::trivial::severity_level level)
std::vector< fs::path > LibPathNames_t
GAUDI_API ISvcLocator * svcLocator()
GAUDI_API IAppMgrUI * createApplicationMgr()
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
void * ImageHandle
Definition of an image handle.
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)