The Gaudi Framework  v37r1 (a7f61348)
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 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 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
 
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
 
std::map< component_t, std::stringm_configurable
 Configurable customization. More...
 

Detailed Description

Definition at line 175 of file genconf.cpp.

Constructor & Destructor Documentation

◆ configGenerator()

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

Definition at line 207 of file genconf.cpp.

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

Member Function Documentation

◆ genBody()

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

Definition at line 247 of file genconf.cpp.

247  {
248  pyOut << m_pyBuf.str() << flush;
249  dbOut << m_dbBuf.str() << flush;
250  }

◆ genComponent()

bool configGenerator::genComponent ( const std::string libName,
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 679 of file genconf.cpp.

684 {
685  auto cname = pythonizeName( componentName );
686  const auto decl_loc = info.getprop( "declaration_location" );
687 
689  propDoc.reserve( properties.size() );
690 
691  m_db2Buf << " '" << componentName << "': {\n";
692  m_db2Buf << " '__component_type__': '";
693  switch ( componentType ) {
694  case component_t::Algorithm:
695  m_db2Buf << "Algorithm";
696  break;
697  case component_t::AlgTool:
698  m_db2Buf << "AlgTool";
699  break;
700  case component_t::ApplicationMgr: // FALLTROUGH
701  case component_t::Service:
702  m_db2Buf << "Service";
703  break;
704  case component_t::Auditor:
705  m_db2Buf << "Auditor";
706  break;
707  default:
708  m_db2Buf << "Unknown";
709  }
710  if ( !decl_loc.empty() ) { m_db2Buf << "',\n '__declaration_location__': '" << decl_loc; }
711  m_db2Buf << "',\n '__interfaces__': (";
712  for ( const auto& intf : std::set<std::string>{ begin( interfaces ), end( interfaces ) } ) {
713  if ( ignored_interfaces.find( intf ) == end( ignored_interfaces ) ) { m_db2Buf << '\'' << intf << "', "; }
714  }
715  m_db2Buf << "),\n 'properties': {\n";
716 
717  m_pyBuf << "\nclass " << cname << "( " << m_configurable[componentType] << " ) :\n";
718  m_pyBuf << " __slots__ = { \n";
719  for ( const auto& prop : properties ) {
720  const string& pname = prop->name();
721  // Validate property name (it must be a valid Python identifier)
722  if ( !boost::regex_match( pname, pythonIdentifier ) ) {
723  std::cout << "ERROR: invalid property name \"" << pname << "\" in component " << cname
724  << " (invalid Python identifier)" << std::endl;
725  // try to make the buffer at least more or less valid python code.
726  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
727  << " }\n";
728  return false;
729  }
730 
731  string pvalue, ptype;
732  pythonizeValue( prop, pvalue, ptype );
733  m_pyBuf << " '" << pname << "' : " << pvalue << ",\n";
734 
735  m_db2Buf << " '" << pname << "': ('" << ptype << "', " << pvalue << ", '''" << prop->documentation()
736  << " [" << prop->ownerTypeName() << "]'''";
737  auto sem = prop->semantics();
738  if ( !sem.empty() ) { m_db2Buf << ", '" << sem << '\''; }
739  m_db2Buf << "),\n";
740 
741  if ( prop->documentation() != "none" ) {
742  propDoc.emplace_back( pname, prop->documentation() + " [" + prop->ownerTypeName() + "]" );
743  }
744  }
745  m_pyBuf << " }\n";
746  m_pyBuf << " _propertyDocDct = { \n";
747  for ( const auto& prop : propDoc ) {
748  m_pyBuf << std::setw( 5 ) << "'" << prop.first << "' : "
749  << "\"\"\" " << prop.second << " \"\"\",\n";
750  }
751  m_pyBuf << " }\n";
752 
753  if ( !decl_loc.empty() ) { m_pyBuf << " __declaration_location__ = '" << decl_loc << "'\n"; }
754  m_pyBuf << " def __init__(self, name = " << m_configurable[component_t::DefaultName] << ", **kwargs):\n"
755  << " super(" << cname << ", self).__init__(name)\n"
756  << " for n,v in kwargs.items():\n"
757  << " setattr(self, n, v)\n"
758  << " def getDlls( self ):\n"
759  << " return '" << libName << "'\n"
760  << " def getType( self ):\n"
761  << " return '" << componentName << "'\n"
762  << " pass # class " << cname << "\n"
763  << flush;
764 
765  // name of the auto-generated module
766  const string pyName = ( fs::path( m_outputDirName ) / fs::path( libName + "Conf.py" ) ).string();
767  const string modName = fs::path( pyName ).filename().stem().string();
768 
769  m_db2Buf << " },\n },\n";
770 
771  // now the db part
772  m_dbBuf << m_pkgName << "." << modName << " " << libName << " " << cname << "\n" << flush;
773 
774  return true;
775 }

◆ 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 441 of file genconf.cpp.

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

◆ genHeader()

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

Definition at line 647 of file genconf.cpp.

649 {
650  // python file part
651  std::string now = Gaudi::Time::current().format( true );
652  py << "#" << now //<< "\n"
653  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n"
654  << "import sys\n"
655  << "if sys.version_info >= (3,):\n"
656  << " # Python 2 compatibility\n"
657  << " long = int\n";
658 
659  if ( m_importGaudiHandles ) { py << "from GaudiKernel.GaudiHandles import *\n"; }
660 
661  if ( m_importDataHandles ) { py << "from GaudiKernel.DataHandle import DataHandle\n"; }
662 
663  genImport( py, "from {}.Configurable import *" );
664 
665  // db file part
666  db << "## -*- ascii -*- \n"
667  << "# db file automatically generated by genconf on: " << now << "\n"
668  << flush;
669 }

◆ genImport()

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

Definition at line 616 of file genconf.cpp.

616  {
617 
618  std::string::size_type pos = 0, nxtpos = 0;
620 
621  while ( std::string::npos != pos ) {
622  // find end of module name
623  nxtpos = m_configurable[component_t::Module].find_first_of( ',', pos );
624 
625  // Prepare import string
626  mod = m_configurable[component_t::Module].substr( pos, nxtpos - pos );
627  std::ostringstream import;
628  import << fmt::format( fmt::runtime( frmt ), mod );
629 
630  // append a normal import or a try/except enclosed one depending
631  // on availability of a fall-back module (next in the list)
632  if ( std::string::npos == nxtpos ) {
633  // last possible module
634  s << indent << import.str() << "\n" << flush;
635  pos = std::string::npos;
636  } else {
637  // we have a fallback for this
638  s << indent << "try:\n" << indent << py_tab << import.str() << "\n" << indent << "except ImportError:\n" << flush;
639  pos = nxtpos + 1;
640  }
641  // increase indentation level for next iteration
642  indent += py_tab;
643  }
644 }

◆ genTrailer()

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

Definition at line 671 of file genconf.cpp.

673 {
674  // db file part
675  db << "## " << m_pkgName << "\n" << std::flush;
676 }

◆ pythonizeValue()

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

handle the "marshalling" of Properties

Definition at line 778 of file genconf.cpp.

780 {
781  const std::string cvalue = p->toString();
782  const std::type_index ti = std::type_index( *p->type_info() );
783  ptype = System::typeinfoName( *p->type_info() );
784 
785  if ( ti == typeIndex<bool>() ) {
786  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" ) ? "False" : "True";
787  } else if ( ti == typeIndex<char>() || ti == typeIndex<signed char>() || ti == typeIndex<unsigned char>() ||
788  ti == typeIndex<short>() || ti == typeIndex<unsigned short>() || ti == typeIndex<int>() ||
789  ti == typeIndex<unsigned int>() || ti == typeIndex<long>() || ti == typeIndex<unsigned long>() ||
790  ti == typeIndex<long long>() || ti == typeIndex<unsigned long long>() ) {
791  pvalue = cvalue;
792  } else if ( ti == typeIndex<float>() || ti == typeIndex<double>() ) {
793  // forces python to handle this as a float: put a dot in there...
794  pvalue = boost::to_lower_copy( cvalue );
795  if ( std::string::npos != pvalue.find( "nan" ) ) {
796  pvalue = "float('nan')";
797  } else if ( std::string::npos == pvalue.find( "." ) && std::string::npos == pvalue.find( "e" ) ) {
798  pvalue = cvalue + ".0";
799  }
800  } else if ( ti == typeIndex<string>() ) {
801  pvalue = quote( cvalue );
802  } else if ( ti == typeIndex<GaudiHandleBase>() ) {
803  const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p );
804  const GaudiHandleBase& base = hdl.value();
805 
806  pvalue = base.pythonRepr();
807  ptype = base.pythonPropertyClassName();
808  m_importGaudiHandles = true;
809  } else if ( ti == typeIndex<GaudiHandleArrayBase>() ) {
810  const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p );
811  const GaudiHandleArrayBase& base = hdl.value();
812 
813  pvalue = base.pythonRepr();
814  ptype = base.pythonPropertyClassName();
815  m_importGaudiHandles = true;
816  } else if ( auto hdl = dynamic_cast<const DataHandleProperty*>( p ); hdl ) {
817  // dynamic_cast to support also classes derived from DataHandleProperty
818  const Gaudi::DataHandle& base = hdl->value();
819 
820  pvalue = base.pythonRepr();
821  m_importDataHandles = true;
822  } else {
823  std::ostringstream v_str;
824  v_str.setf( std::ios::showpoint ); // to correctly display floats
825  p->toStream( v_str );
826  pvalue = v_str.str();
827  }
828 }

◆ setConfigurableAlgorithm()

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

customize the configurable base class for Algorithm component

Definition at line 225 of file genconf.cpp.

225  {
226  m_configurable[component_t::Algorithm] = cfgAlgorithm;
227  }

◆ setConfigurableAlgTool()

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

customize the configurable base class for AlgTool component

Definition at line 230 of file genconf.cpp.

230 { 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 233 of file genconf.cpp.

233 { 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 220 of file genconf.cpp.

220  {
221  m_configurable[component_t::DefaultName] = defaultName;
222  }

◆ setConfigurableModule()

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

customize the Module name where configurable base classes are defined

Definition at line 217 of file genconf.cpp.

217 { 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 236 of file genconf.cpp.

236  {
237  m_configurable[component_t::Service] = cfgService;
238  m_configurable[component_t::ApplicationMgr] = cfgService;
239  }

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 204 of file genconf.cpp.

◆ m_db2Buf

stringstream configGenerator::m_db2Buf
private

Definition at line 197 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 195 of file genconf.cpp.

◆ m_importDataHandles

bool configGenerator::m_importDataHandles = false
private

Definition at line 189 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 188 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 181 of file genconf.cpp.

◆ m_pkgName

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 177 of file genconf.cpp.

◆ m_pyBuf

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 184 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:671
GaudiHandleArrayBase::pythonRepr
std::string pythonRepr() const override
Python representation of array of handles, i.e.
Definition: GaudiHandle.cpp:88
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.
GaudiHandleArrayProperty::value
const GaudiHandleArrayBase & value() const
Definition: Property.h:638
GaudiAlg.HistoUtils.path
path
Definition: HistoUtils.py:961
bug_34121.name
name
Definition: bug_34121.py:20
std::vector::reserve
T reserve(T... args)
gaudirun.s
string s
Definition: gaudirun.py:348
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
fmt::runtime
const T & runtime(const T &v)
Definition: MessageSvcSink.cpp:27
DataHandleProperty
DataHandleProperty.h GaudiKernel/DataHandleProperty.h.
Definition: DataHandleProperty.h:34
configGenerator::genComponent
bool genComponent(const std::string &libName, 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:679
std::type_index
Gaudi::DataHandle
Definition: DataHandle.h:38
createAppMgr
int createAppMgr()
Definition: genconf.cpp:831
System::ImageHandle
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:40
conf.release
string release
Definition: conf.py:27
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:313
Service
Definition: Service.h:46
configGenerator::m_dbBuf
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:195
GaudiHandleBase
Definition: GaudiHandle.h:102
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:188
configGenerator::m_pyBuf
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:184
Gaudi.CommonGaudiConfigurables.mod
mod
Definition: CommonGaudiConfigurables.py:40
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:84
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
Gaudi::Time::format
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:262
std::cout
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
GaudiHandleBase::pythonRepr
std::string pythonRepr() const override
Python representation of handle, i.e.
Definition: GaudiHandle.cpp:58
std::string::compare
T compare(T... args)
std::ostringstream::setf
T setf(T... args)
configGenerator::m_importDataHandles
bool m_importDataHandles
Definition: genconf.cpp:189
LOG_ERROR
#define LOG_ERROR
Definition: genconf.cpp:84
std::flush
T flush(T... args)
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:601
configGenerator::m_pkgName
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:177
gaudirun.level
level
Definition: gaudirun.py:366
configGenerator::genImport
void genImport(std::ostream &s, std::string_view frmt, std::string indent)
Definition: genconf.cpp:616
configGenerator::m_configurable
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:204
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:345
GaudiHandleProperty
Definition: Property.h:580
gaudiComponentHelp.properties
properties
Definition: gaudiComponentHelp.py:69
std::string::substr
T substr(T... args)
std::ostringstream
STL class.
LOG_WARNING
#define LOG_WARNING
Definition: genconf.cpp:85
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:162
std::vector::emplace_back
T emplace_back(T... args)
GaudiHandleBase::pythonPropertyClassName
std::string pythonPropertyClassName() const override
Name of the componentType with "Handle" appended.
Definition: GaudiHandle.cpp:50
Gaudi::PluginService::v1::Details::logger
GAUDIPS_API Logger & logger()
Return the current logger instance.
Definition: PluginServiceV1.cpp:318
configGenerator::genHeader
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:647
std::endl
T endl(T... args)
LOG_INFO
#define LOG_INFO
Definition: genconf.cpp:86
Gaudi::Time::current
static Time current()
Returns the current time.
Definition: Time.cpp:119
IInterface
Definition: IInterface.h:237
Gaudi::DataHandle::pythonRepr
virtual std::string pythonRepr() const
Definition: DataHandle.cpp:19
configGenerator::m_outputDirName
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:181
std::string::empty
T empty(T... args)
compareOutputFiles.pname
pname
Definition: compareOutputFiles.py:482
std::stringstream::str
T str(T... args)
GaudiPluginService.cpluginsvc.factories
def factories()
Definition: cpluginsvc.py:94
GaudiHandleArrayBase::pythonPropertyClassName
std::string pythonPropertyClassName() const override
Name of the componentType with "HandleArray" appended.
Definition: GaudiHandle.cpp:86
configGenerator::m_db2Buf
stringstream m_db2Buf
Definition: genconf.cpp:197
IOTest.end
end
Definition: IOTest.py:123
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:277
configGenerator::pythonizeValue
void pythonizeValue(const PropertyBase *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:778
configGenerator::genBody
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:247
IInterface::addRef
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
GaudiHandleArrayProperty
Definition: Property.h:617
std::set< std::string >
std::exception::what
T what(T... args)
PrepareBase.out
out
Definition: PrepareBase.py:20