The Gaudi Framework  master (37c0b60a)
configGenerator Class Reference
Collaboration diagram for configGenerator:

Public Member Functions

 configGenerator (const string &pkgName, const string &outputDirName)
 
int genConfig (const Strings_t &modules, const string &userModule)
 main entry point of this class: More...
 
void setConfigurableTypes (const std::set< conf_t > &types)
 customize configurable types to generate More...
 
void setConfigurableModule (const std::string &moduleName)
 customize the Module name where configurable base classes are defined More...
 
void setConfigurableDefaultName (const std::string &defaultName)
 customize the default name for configurable instances More...
 
void setConfigurableAlgorithm (const std::string &cfgAlgorithm)
 customize the configurable base class for Algorithm component More...
 
void setConfigurableAlgTool (const std::string &cfgAlgTool)
 customize the configurable base class for AlgTool component More...
 
void setConfigurableAuditor (const std::string &cfgAuditor)
 customize the configurable base class for AlgTool component More...
 
void setConfigurableService (const std::string &cfgService)
 customize the configurable base class for Service component More...
 

Private Member Functions

bool genComponent (const std::string &libName, const std::string &componentName, component_t componentType, const vector< PropertyBase * > &properties, const Gaudi::PluginService::Details::Registry::FactoryInfo &info)
 
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)
 
void genImport (std::ostream &s, std::string_view frmt, std::string indent)
 
void genHeader (std::ostream &pyOut, std::ostream &dbOut)
 
void genBody (std::ostream &pyOut, std::ostream &dbOut)
 
void genTrailer (std::ostream &pyOut, std::ostream &dbOut)
 
void pythonizeValue (const PropertyBase *prop, string &pvalue, string &ptype)
 handle the "marshalling" of Properties More...
 

Private Attributes

string m_pkgName
 name of the package we are processing More...
 
string m_outputDirName
 absolute path to the directory where genconf will store auto-generated files (Configurables and ConfigurableDb) More...
 
stringstream m_pyBuf
 buffer of auto-generated configurables More...
 
bool m_importGaudiHandles = false
 switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the components has a XyzHandle<T>) More...
 
bool m_importDataHandles = false
 
std::set< conf_t > m_confTypes
 Types of configurables to generate. More...
 
stringstream m_dbBuf
 buffer of generated configurables informations for the "Db" file The "Db" file is holding informations about the generated configurables This file is later one used by the PropertyProxy.py to locate Configurables and know their default values, host module,... More...
 
stringstream m_db2Buf
 buffer of generated GaudiConfig2 configurables More...
 
std::map< component_t, std::stringm_configurable
 Configurable customization. More...
 

Detailed Description

Definition at line 170 of file genconf.cpp.

Constructor & Destructor Documentation

◆ configGenerator()

configGenerator::configGenerator ( const string pkgName,
const string outputDirName 
)
inline

Definition at line 206 of file genconf.cpp.

207  : m_pkgName( pkgName ), m_outputDirName( outputDirName ) {}

Member Function Documentation

◆ genBody()

void configGenerator::genBody ( std::ostream pyOut,
std::ostream dbOut 
)
inlineprivate

Definition at line 254 of file genconf.cpp.

254  {
255  pyOut << m_pyBuf.str() << flush;
256  dbOut << m_dbBuf.str() << flush;
257  }

◆ genComponent()

bool configGenerator::genComponent ( const std::string libName,
const std::string componentName,
component_t  componentType,
const vector< PropertyBase * > &  properties,
const Gaudi::PluginService::Details::Registry::FactoryInfo &  info 
)
private

Definition at line 704 of file genconf.cpp.

708 {
709  auto cname = pythonizeName( componentName );
710  const auto decl_loc = info.getprop( "declaration_location" );
711 
713  propDoc.reserve( properties.size() );
714 
715  m_pyBuf << "\nclass " << cname << "( " << m_configurable[componentType] << " ) :\n";
716  m_pyBuf << " __slots__ = { \n";
717  for ( const auto& prop : properties ) {
718  const string& pname = prop->name();
719  // Validate property name (it must be a valid Python identifier)
720  if ( !boost::regex_match( pname, pythonIdentifier ) ) {
721  LOG_ERROR << "invalid property name \"" << pname << "\" in component " << cname << " (invalid Python identifier)"
722  << std::endl;
723  // try to make the buffer at least more or less valid python code.
724  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
725  << " }\n";
726  return false;
727  }
728 
729  string pvalue, ptype;
730  pythonizeValue( prop, pvalue, ptype );
731  m_pyBuf << " '" << pname << "' : " << pvalue << ",\n";
732 
733  if ( prop->documentation() != "none" ) {
734  propDoc.emplace_back( pname, prop->documentation() + " [" + prop->ownerTypeName() + "]" );
735  }
736  }
737  m_pyBuf << " }\n";
738  m_pyBuf << " _propertyDocDct = { \n";
739  for ( const auto& prop : propDoc ) {
740  m_pyBuf << std::setw( 5 ) << "'" << prop.first << "' : "
741  << "\"\"\" " << prop.second << " \"\"\",\n";
742  }
743  m_pyBuf << " }\n";
744 
745  if ( !decl_loc.empty() ) { m_pyBuf << " __declaration_location__ = '" << decl_loc << "'\n"; }
746  m_pyBuf << " def __init__(self, name = " << m_configurable[component_t::DefaultName] << ", **kwargs):\n"
747  << " super(" << cname << ", self).__init__(name)\n"
748  << " for n,v in kwargs.items():\n"
749  << " setattr(self, n, v)\n"
750  << " def getDlls( self ):\n"
751  << " return '" << libName << "'\n"
752  << " def getType( self ):\n"
753  << " return '" << componentName << "'\n"
754  << " pass # class " << cname << "\n"
755  << flush;
756 
757  // name of the auto-generated module
758  const string pyName = ( fs::path( m_outputDirName ) / fs::path( libName + "Conf.py" ) ).string();
759  const string modName = fs::path( pyName ).filename().stem().string();
760 
761  // now the db part
762  m_dbBuf << m_pkgName << "." << modName << " " << libName << " " << cname << "\n" << flush;
763 
764  return true;
765 }

◆ genComponent2()

bool configGenerator::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 
)
private

Definition at line 768 of file genconf.cpp.

772 {
773  m_db2Buf << " '" << componentName << "': {\n";
774  m_db2Buf << " '__component_type__': '";
775  switch ( componentType ) {
776  case component_t::Algorithm:
777  m_db2Buf << "Algorithm";
778  break;
779  case component_t::AlgTool:
780  m_db2Buf << "AlgTool";
781  break;
782  case component_t::ApplicationMgr: // FALLTROUGH
783  case component_t::Service:
784  m_db2Buf << "Service";
785  break;
786  case component_t::Auditor:
787  m_db2Buf << "Auditor";
788  break;
789  default:
790  m_db2Buf << "Unknown";
791  }
792 
793  const auto decl_loc = info.getprop( "declaration_location" );
794  if ( !decl_loc.empty() ) { m_db2Buf << "',\n '__declaration_location__': '" << decl_loc; }
795 
796  m_db2Buf << "',\n '__interfaces__': (";
797  for ( const auto& intf : std::set<std::string>{ begin( interfaces ), end( interfaces ) } ) {
798  if ( ignored_interfaces.find( intf ) == end( ignored_interfaces ) ) { m_db2Buf << '\'' << intf << "', "; }
799  }
800  m_db2Buf << "),\n 'properties': {\n";
801 
802  bool success = true;
803  for ( const auto& prop : properties ) {
804  const string& pname = prop->name();
805  // Validate property name (it must be a valid Python identifier)
806  if ( !boost::regex_match( pname, pythonIdentifier ) ) {
807  LOG_ERROR << "invalid property name \"" << pname << "\" in component " << componentName
808  << " (invalid Python identifier)" << std::endl;
809  m_db2Buf << " #ERROR-invalid identifier '" << pname << "'\n";
810  success = false;
811  break;
812  }
813 
814  string pvalue, ptype;
815  pythonizeValue( prop, pvalue, ptype );
816 
817  m_db2Buf << " '" << pname << "': ('" << ptype << "', " << pvalue << ", '''" << prop->documentation()
818  << " [" << prop->ownerTypeName() << "]'''";
819  auto sem = prop->semantics();
820  if ( !sem.empty() ) { m_db2Buf << ", '" << sem << '\''; }
821  m_db2Buf << "),\n";
822  }
823 
824  m_db2Buf << " },\n },\n";
825 
826  return success;
827 }

◆ genConfig()

int configGenerator::genConfig ( const Strings_t modules,
const string userModule 
)

main entry point of this class:

  • iterate over all the modules (ie: library names)
  • for each module extract component informations
  • eventually generate the header/body/trailer python file and "Db" file

write-out files for this library

Definition at line 465 of file genconf.cpp.

467 {
468  const auto endLib = libs.end();
469 
470  static const std::string gaudiSvc = "GaudiCoreSvc";
471  const bool isGaudiSvc =
472  std::find_if( libs.begin(), endLib, []( const auto& s ) {
473  return s.find( gaudiSvc ) != std::string::npos; // libs can be <name> or path/to/lib<name>.so
474  } ) != endLib;
475 
476  //--- Instantiate ApplicationMgr --------------------------------------------
477  if ( !isGaudiSvc && createAppMgr() ) {
478  cout << "ERROR: ApplicationMgr can not be created. Check environment" << endl;
479  return EXIT_FAILURE;
480  }
481 
482  //--- Iterate over component factories --------------------------------------
483  using Gaudi::PluginService::Details::Registry;
484  const Registry& registry = Registry::instance();
485 
486  auto bkgNames = registry.loadedFactoryNames();
487 
488  ISvcLocator* svcLoc = Gaudi::svcLocator();
489  IInterface* dummySvc = new Service( "DummySvc", svcLoc );
490  dummySvc->addRef();
491 
492  bool allGood = true;
493 
494  // iterate over all the requested libraries
495  for ( const auto& iLib : libs ) {
496  std::string lib = fs::path( iLib ).stem().string();
497  if ( lib.compare( 0, 3, "lib" ) == 0 ) {
498  lib = lib.substr( 3 ); // For *NIX remove "lib"
499  }
500  LOG_INFO << ":::: processing library: " << iLib << "...";
501 
502  // reset state
503  m_importGaudiHandles = false;
504  m_importDataHandles = false;
505  m_pyBuf.str( "" );
506  m_dbBuf.str( "" );
507  m_db2Buf.str( "" );
508 
509  //--- Load component library ----------------------------------------------
510  System::ImageHandle handle;
511  unsigned long err = System::loadDynamicLib( iLib, &handle );
512  if ( err != 1 ) {
514  allGood = false;
515  continue;
516  }
517 
518  const auto& factories = registry.factories();
519  for ( const auto& factoryName : registry.loadedFactoryNames() ) {
520  if ( bkgNames.find( factoryName ) != bkgNames.end() ) {
522  LOG_INFO << "\t==> skipping [" << factoryName << "]...";
523  }
524  continue;
525  }
526  auto entry = factories.find( factoryName );
527  if ( entry == end( factories ) ) {
528  LOG_ERROR << "inconsistency in component factories list: I cannot find anymore " << factoryName;
529  continue;
530  }
531  const auto& info = entry->second;
532  if ( !info.is_set() ) continue;
533 
534  // do not generate configurables for the Reflex-compatible aliases
535  if ( !info.getprop( "ReflexName" ).empty() ) continue;
536 
537  // Atlas contributed code (patch #1247)
538  // Skip the generation of configurables if the component does not come
539  // from the same library we are processing (i.e. we found a symbol that
540  // is coming from a library loaded by the linker).
541  if ( libNativeName( lib ) != info.library ) {
542  LOG_WARNING << "library [" << lib << "] exposes factory [" << factoryName << "] which is declared in ["
543  << info.library << "] !!";
544  continue;
545  }
546 
547  component_t type = component_t::Unknown;
548  {
549  const auto ft = allowedFactories.find( info.factory.type().name() );
550  if ( ft != allowedFactories.end() ) {
551  type = ft->second;
552  } else if ( factoryName == "ApplicationMgr" ) {
553  type = component_t::ApplicationMgr;
554  } else
555  continue;
556  }
557 
558  // handle possible problems with templated components
559  std::string name = boost::trim_copy( factoryName );
560 
561  const auto className = info.getprop( "ClassName" );
562  LOG_INFO << " - component: " << className << " (" << ( className != name ? ( name + ": " ) : std::string() )
563  << type << ")";
564 
565  string cname = "DefaultName";
566  SmartIF<IProperty> prop;
567  try {
568  switch ( type ) {
569  case component_t::Algorithm:
570  prop = SmartIF<IAlgorithm>( Gaudi::Algorithm::Factory::create( factoryName, cname, svcLoc ).release() );
571  break;
572  case component_t::Service:
573  prop = SmartIF<IService>( Service::Factory::create( factoryName, cname, svcLoc ).release() );
574  break;
575  case component_t::AlgTool:
576  prop =
577  SmartIF<IAlgTool>( AlgTool::Factory::create( factoryName, cname, toString( type ), dummySvc ).release() );
578  // FIXME: AlgTool base class increase artificially by 1 the refcount.
579  prop->release();
580  break;
581  case component_t::Auditor:
582  prop = SmartIF<IAuditor>( Auditor::Factory::create( factoryName, cname, svcLoc ).release() );
583  break;
584  case component_t::ApplicationMgr:
585  prop = SmartIF<ISvcLocator>( svcLoc );
586  break;
587  default:
588  continue; // unknown
589  }
590  } catch ( exception& e ) {
591  LOG_ERROR << "Error instantiating " << name << " from " << iLib;
592  LOG_ERROR << "Got exception: " << e.what();
593  allGood = false;
594  continue;
595  } catch ( ... ) {
596  LOG_ERROR << "Error instantiating " << name << " from " << iLib;
597  allGood = false;
598  continue;
599  }
600  if ( prop ) {
601  if ( m_confTypes.contains( conf_t::CONF ) && !genComponent( lib, name, type, prop->getProperties(), info ) ) {
602  allGood = false;
603  }
604  if ( m_confTypes.contains( conf_t::CONF2 ) &&
605  !genComponent2( name, type, prop->getProperties(), prop->getInterfaceNames(), info ) ) {
606  allGood = false;
607  }
608  prop.reset();
609  } else {
610  LOG_ERROR << "could not cast IInterface* object to an IProperty* !";
611  LOG_ERROR << "NO Configurable will be generated for [" << name << "] !";
612  allGood = false;
613  }
614  } //> end loop over factories
615 
619  if ( m_confTypes.contains( conf_t::CONF ) ) {
620  const std::string pyName = ( fs::path( m_outputDirName ) / fs::path( lib + "Conf.py" ) ).string();
621  const std::string dbName = ( fs::path( m_outputDirName ) / fs::path( lib + ".confdb" ) ).string();
622 
623  std::fstream py( pyName, std::ios_base::out | std::ios_base::trunc );
624  std::fstream db( dbName, std::ios_base::out | std::ios_base::trunc );
625 
626  genHeader( py, db );
627  if ( !userModule.empty() ) py << "from " << userModule << " import *" << endl;
628  genBody( py, db );
629  genTrailer( py, db );
630  }
631  if ( m_confTypes.contains( conf_t::CONF2 ) ) {
632  const std::string db2Name = ( fs::path( m_outputDirName ) / fs::path( lib + ".confdb2_part" ) ).string();
633  std::fstream db2( db2Name, std::ios_base::out | std::ios_base::trunc );
634  db2 << "{\n" << m_db2Buf.str() << "}\n";
635  }
636 
637  } //> end loop over libraries
638 
639  dummySvc->release();
640  dummySvc = 0;
641 
642  return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
643 }

◆ genHeader()

void configGenerator::genHeader ( std::ostream pyOut,
std::ostream dbOut 
)
private

Definition at line 676 of file genconf.cpp.

678 {
679  // python file part
680  std::string now = Gaudi::Time::current().format( true );
681  py << "#" << now //<< "\n"
682  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n";
683 
684  if ( m_importGaudiHandles ) { py << "from GaudiKernel.GaudiHandles import *\n"; }
685 
686  if ( m_importDataHandles ) { py << "from GaudiKernel.DataHandle import DataHandle\n"; }
687 
688  genImport( py, "from {}.Configurable import *" );
689 
690  // db file part
691  db << "## -*- ascii -*- \n"
692  << "# db file automatically generated by genconf on: " << now << "\n"
693  << flush;
694 }

◆ genImport()

void configGenerator::genImport ( std::ostream s,
std::string_view  frmt,
std::string  indent = "" 
)
private

Definition at line 645 of file genconf.cpp.

645  {
646 
647  std::string::size_type pos = 0, nxtpos = 0;
649 
650  while ( std::string::npos != pos ) {
651  // find end of module name
652  nxtpos = m_configurable[component_t::Module].find_first_of( ',', pos );
653 
654  // Prepare import string
655  mod = m_configurable[component_t::Module].substr( pos, nxtpos - pos );
656  std::ostringstream import;
657  import << fmt::format( fmt::runtime( frmt ), mod );
658 
659  // append a normal import or a try/except enclosed one depending
660  // on availability of a fall-back module (next in the list)
661  if ( std::string::npos == nxtpos ) {
662  // last possible module
663  s << indent << import.str() << "\n" << flush;
664  pos = std::string::npos;
665  } else {
666  // we have a fallback for this
667  s << indent << "try:\n" << indent << py_tab << import.str() << "\n" << indent << "except ImportError:\n" << flush;
668  pos = nxtpos + 1;
669  }
670  // increase indentation level for next iteration
671  indent += py_tab;
672  }
673 }

◆ genTrailer()

void configGenerator::genTrailer ( std::ostream pyOut,
std::ostream dbOut 
)
private

Definition at line 696 of file genconf.cpp.

698 {
699  // db file part
700  db << "## " << m_pkgName << "\n" << std::flush;
701 }

◆ pythonizeValue()

void configGenerator::pythonizeValue ( const PropertyBase prop,
string pvalue,
string ptype 
)
private

handle the "marshalling" of Properties

Definition at line 830 of file genconf.cpp.

832 {
833  const std::string cvalue = p->toString();
834  const std::type_index ti = std::type_index( *p->type_info() );
835  ptype = System::typeinfoName( *p->type_info() );
836 
837  if ( ti == typeIndex<bool>() ) {
838  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" ) ? "False" : "True";
839  } else if ( ti == typeIndex<char>() || ti == typeIndex<signed char>() || ti == typeIndex<unsigned char>() ||
840  ti == typeIndex<short>() || ti == typeIndex<unsigned short>() || ti == typeIndex<int>() ||
841  ti == typeIndex<unsigned int>() || ti == typeIndex<long>() || ti == typeIndex<unsigned long>() ||
842  ti == typeIndex<long long>() || ti == typeIndex<unsigned long long>() ) {
843  pvalue = cvalue;
844  } else if ( ti == typeIndex<float>() || ti == typeIndex<double>() ) {
845  // forces python to handle this as a float: put a dot in there...
846  pvalue = boost::to_lower_copy( cvalue );
847  if ( std::string::npos != pvalue.find( "nan" ) ) {
848  pvalue = "float('nan')";
849  } else if ( std::string::npos == pvalue.find( "." ) && std::string::npos == pvalue.find( "e" ) ) {
850  pvalue = cvalue + ".0";
851  }
852  } else if ( ti == typeIndex<string>() ) {
853  pvalue = quote( cvalue );
854  } else if ( ti == typeIndex<GaudiHandleBase>() ) {
855  const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p );
856  const GaudiHandleBase& base = hdl.value();
857 
858  pvalue = base.pythonRepr();
859  ptype = base.pythonPropertyClassName();
860  m_importGaudiHandles = true;
861  } else if ( ti == typeIndex<GaudiHandleArrayBase>() ) {
862  const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p );
863  const GaudiHandleArrayBase& base = hdl.value();
864 
865  pvalue = base.pythonRepr();
866  ptype = base.pythonPropertyClassName();
867  m_importGaudiHandles = true;
868  } else if ( auto hdl = dynamic_cast<const DataHandleProperty*>( p ); hdl ) {
869  // dynamic_cast to support also classes derived from DataHandleProperty
870  const Gaudi::DataHandle& base = hdl->value();
871 
872  pvalue = base.pythonRepr();
873  m_importDataHandles = true;
874  } else {
875  std::ostringstream v_str;
876  v_str.setf( std::ios::showpoint ); // to correctly display floats
877  p->toStream( v_str );
878  pvalue = v_str.str();
879  }
880 }

◆ setConfigurableAlgorithm()

void configGenerator::setConfigurableAlgorithm ( const std::string cfgAlgorithm)
inline

customize the configurable base class for Algorithm component

Definition at line 227 of file genconf.cpp.

227  {
228  m_configurable[component_t::Algorithm] = cfgAlgorithm;
229  }

◆ setConfigurableAlgTool()

void configGenerator::setConfigurableAlgTool ( const std::string cfgAlgTool)
inline

customize the configurable base class for AlgTool component

Definition at line 232 of file genconf.cpp.

232 { m_configurable[component_t::AlgTool] = cfgAlgTool; }

◆ setConfigurableAuditor()

void configGenerator::setConfigurableAuditor ( const std::string cfgAuditor)
inline

customize the configurable base class for AlgTool component

Definition at line 235 of file genconf.cpp.

235 { m_configurable[component_t::Auditor] = cfgAuditor; }

◆ setConfigurableDefaultName()

void configGenerator::setConfigurableDefaultName ( const std::string defaultName)
inline

customize the default name for configurable instances

Definition at line 222 of file genconf.cpp.

222  {
223  m_configurable[component_t::DefaultName] = defaultName;
224  }

◆ setConfigurableModule()

void configGenerator::setConfigurableModule ( const std::string moduleName)
inline

customize the Module name where configurable base classes are defined

Definition at line 219 of file genconf.cpp.

219 { m_configurable[component_t::Module] = moduleName; }

◆ setConfigurableService()

void configGenerator::setConfigurableService ( const std::string cfgService)
inline

customize the configurable base class for Service component

Definition at line 238 of file genconf.cpp.

238  {
239  m_configurable[component_t::Service] = cfgService;
240  m_configurable[component_t::ApplicationMgr] = cfgService;
241  }

◆ setConfigurableTypes()

void configGenerator::setConfigurableTypes ( const std::set< conf_t > &  types)
inline

customize configurable types to generate

Definition at line 216 of file genconf.cpp.

216 { m_confTypes = types; }

Member Data Documentation

◆ m_configurable

std::map<component_t, std::string> configGenerator::m_configurable
private

Configurable customization.

Contains customization for:

  • Name of the module where configurable base classes are defined
  • Name of the configurable base class for the Algorithm component
  • Name of the configurable base class for the AlgTool component
  • Name of the configurable base class for the Service component

Definition at line 203 of file genconf.cpp.

◆ m_confTypes

std::set<conf_t> configGenerator::m_confTypes
private

Types of configurables to generate.

Definition at line 187 of file genconf.cpp.

◆ m_db2Buf

stringstream configGenerator::m_db2Buf
private

buffer of generated GaudiConfig2 configurables

Definition at line 196 of file genconf.cpp.

◆ m_dbBuf

stringstream configGenerator::m_dbBuf
private

buffer of generated configurables informations for the "Db" file The "Db" file is holding informations about the generated configurables This file is later one used by the PropertyProxy.py to locate Configurables and know their default values, host module,...

Definition at line 193 of file genconf.cpp.

◆ m_importDataHandles

bool configGenerator::m_importDataHandles = false
private

Definition at line 184 of file genconf.cpp.

◆ m_importGaudiHandles

bool configGenerator::m_importGaudiHandles = false
private

switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the components has a XyzHandle<T>)

Definition at line 183 of file genconf.cpp.

◆ m_outputDirName

string configGenerator::m_outputDirName
private

absolute path to the directory where genconf will store auto-generated files (Configurables and ConfigurableDb)

Definition at line 176 of file genconf.cpp.

◆ m_pkgName

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 172 of file genconf.cpp.

◆ m_pyBuf

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 179 of file genconf.cpp.


The documentation for this class was generated from the following file:
configGenerator::genTrailer
void genTrailer(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:696
System::loadDynamicLib
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
Definition: System.cpp:150
std::string
STL class.
std::exception
STL class.
std::fstream
STL class.
cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:83
GaudiHandleArrayProperty::value
const GaudiHandleArrayBase & value() const
Definition: Property.h:636
AtlasMCRecoFullPrecedenceDump.path
path
Definition: AtlasMCRecoFullPrecedenceDump.py:49
std::vector::reserve
T reserve(T... args)
configGenerator::genComponent
bool genComponent(const std::string &libName, const std::string &componentName, component_t componentType, const vector< PropertyBase * > &properties, const Gaudi::PluginService::Details::Registry::FactoryInfo &info)
Definition: genconf.cpp:704
gaudirun.s
string s
Definition: gaudirun.py:346
std::vector
STL class.
SmartIF::reset
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:96
std::find_if
T find_if(T... args)
ISvcLocator
Definition: ISvcLocator.h:46
DataHandleProperty
DataHandleProperty.h GaudiKernel/DataHandleProperty.h.
Definition: DataHandleProperty.h:34
configGenerator::m_confTypes
std::set< conf_t > m_confTypes
Types of configurables to generate.
Definition: genconf.cpp:187
std::type_index
Gaudi::DataHandle
Definition: DataHandle.h:38
createAppMgr
int createAppMgr()
Definition: genconf.cpp:883
System::ImageHandle
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:40
conf.release
string release
Definition: conf.py:27
ProduceConsume.types
types
Definition: ProduceConsume.py:59
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:315
configGenerator::m_dbBuf
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:193
GaudiHandleBase
Definition: GaudiHandle.h:105
configGenerator::m_importGaudiHandles
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:183
configGenerator::m_pyBuf
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:179
Gaudi.CommonGaudiConfigurables.mod
mod
Definition: CommonGaudiConfigurables.py:39
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:136
Gaudi::Time::format
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:262
configGenerator::genComponent2
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)
Definition: genconf.cpp:768
std::cout
std::string::compare
T compare(T... args)
std::ostringstream::setf
T setf(T... args)
configGenerator::m_importDataHandles
bool m_importDataHandles
Definition: genconf.cpp:184
LOG_ERROR
#define LOG_ERROR
Definition: genconf.cpp:75
std::flush
T flush(T... args)
cpluginsvc.factories
def factories()
Definition: cpluginsvc.py:93
SmartIF< IProperty >
format
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:119
GaudiHandleProperty::value
const GaudiHandleBase & value() const
Definition: Property.h:599
configGenerator::m_pkgName
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:172
gaudirun.level
level
Definition: gaudirun.py:364
configGenerator::genImport
void genImport(std::ostream &s, std::string_view frmt, std::string indent)
Definition: genconf.cpp:645
configGenerator::m_configurable
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:203
System::moduleName
GAUDI_API const std::string & moduleName()
Get the name of the (executable/DLL) file without file-type.
Definition: ModuleInfo.cpp:64
GaudiHandleArrayBase
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:348
GaudiHandleProperty
Definition: Property.h:578
gaudiComponentHelp.properties
properties
Definition: gaudiComponentHelp.py:68
std::string::substr
T substr(T... args)
std::ostringstream
STL class.
LOG_WARNING
#define LOG_WARNING
Definition: genconf.cpp:76
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:353
gaudirun.type
type
Definition: gaudirun.py:160
std::vector::emplace_back
T emplace_back(T... args)
Gaudi::PluginService::v1::Details::logger
GAUDIPS_API Logger & logger()
Return the current logger instance.
Definition: PluginServiceV1.cpp:318
ConditionsStallTest.name
name
Definition: ConditionsStallTest.py:77
configGenerator::genHeader
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:676
std::endl
T endl(T... args)
LOG_INFO
#define LOG_INFO
Definition: genconf.cpp:77
Gaudi::Time::current
static Time current()
Returns the current time.
Definition: Time.cpp:119
IInterface
Definition: IInterface.h:239
configGenerator::m_outputDirName
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:176
std::string::empty
T empty(T... args)
compareOutputFiles.pname
pname
Definition: compareOutputFiles.py:482
std::stringstream::str
T str(T... args)
configGenerator::m_db2Buf
stringstream m_db2Buf
buffer of generated GaudiConfig2 configurables
Definition: genconf.cpp:196
check_ParticleID.base
base
Definition: check_ParticleID.py:24
IOTest.end
end
Definition: IOTest.py:125
std::setw
T setw(T... args)
IInterface::release
virtual unsigned long release()=0
Release Interface instance.
System::getLastErrorString
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:279
configGenerator::pythonizeValue
void pythonizeValue(const PropertyBase *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:830
configGenerator::genBody
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:254
IInterface::addRef
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
GaudiHandleArrayProperty
Definition: Property.h:615
std::set< std::string >
std::exception::what
T what(T... args)
PrepareBase.out
out
Definition: PrepareBase.py:20