The Gaudi Framework  v36r1 (3e2fb5a8)
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)
 
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, string &ptype2)
 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 166 of file genconf.cpp.

Constructor & Destructor Documentation

◆ configGenerator()

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

Definition at line 198 of file genconf.cpp.

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

Member Function Documentation

◆ genBody()

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

Definition at line 237 of file genconf.cpp.

237  {
238  pyOut << m_pyBuf.str() << flush;
239  dbOut << m_dbBuf.str() << flush;
240  }

◆ 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 
)
private

Definition at line 667 of file genconf.cpp.

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

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

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

◆ genHeader()

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

Definition at line 635 of file genconf.cpp.

637 {
638  // python file part
639  std::string now = Gaudi::Time::current().format( true );
640  py << "#" << now //<< "\n"
641  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n"
642  << "import sys\n"
643  << "if sys.version_info >= (3,):\n"
644  << " # Python 2 compatibility\n"
645  << " long = int\n";
646 
647  if ( m_importGaudiHandles ) { py << "from GaudiKernel.GaudiHandles import *\n"; }
648 
649  if ( m_importDataHandles ) { py << "from GaudiKernel.DataHandle import DataHandle\n"; }
650 
651  genImport( py, "from {}.Configurable import *" );
652 
653  // db file part
654  db << "## -*- ascii -*- \n"
655  << "# db file automatically generated by genconf on: " << now << "\n"
656  << flush;
657 }

◆ genImport()

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

Definition at line 604 of file genconf.cpp.

604  {
605 
606  std::string::size_type pos = 0, nxtpos = 0;
608 
609  while ( std::string::npos != pos ) {
610  // find end of module name
611  nxtpos = m_configurable[component_t::Module].find_first_of( ',', pos );
612 
613  // Prepare import string
614  mod = m_configurable[component_t::Module].substr( pos, nxtpos - pos );
615  std::ostringstream import;
616  import << fmt::format( frmt, mod );
617 
618  // append a normal import or a try/except enclosed one depending
619  // on availability of a fall-back module (next in the list)
620  if ( std::string::npos == nxtpos ) {
621  // last possible module
622  s << indent << import.str() << "\n" << flush;
623  pos = std::string::npos;
624  } else {
625  // we have a fallback for this
626  s << indent << "try:\n" << indent << py_tab << import.str() << "\n" << indent << "except ImportError:\n" << flush;
627  pos = nxtpos + 1;
628  }
629  // increase indentation level for next iteration
630  indent += py_tab;
631  }
632 }

◆ genTrailer()

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

Definition at line 659 of file genconf.cpp.

661 {
662  // db file part
663  db << "## " << m_pkgName << "\n" << std::flush;
664 }

◆ pythonizeValue()

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

handle the "marshalling" of Properties

Definition at line 762 of file genconf.cpp.

764 {
765  const std::string cvalue = p->toString();
766  const std::type_index ti = std::type_index( *p->type_info() );
767  ptype2 = System::typeinfoName( *p->type_info() );
768 
769  if ( ti == typeIndex<bool>() ) {
770  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" ) ? "False" : "True";
771  ptype = "bool";
772  } else if ( ti == typeIndex<char>() || ti == typeIndex<signed char>() || ti == typeIndex<unsigned char>() ||
773  ti == typeIndex<short>() || ti == typeIndex<unsigned short>() || ti == typeIndex<int>() ||
774  ti == typeIndex<unsigned int>() || ti == typeIndex<long>() || ti == typeIndex<unsigned long>() ||
775  ti == typeIndex<long long>() || ti == typeIndex<unsigned long long>() ) {
776  pvalue = cvalue;
777  ptype = "int";
778  } else if ( ti == typeIndex<float>() || ti == typeIndex<double>() ) {
779  // forces python to handle this as a float: put a dot in there...
780  pvalue = boost::to_lower_copy( cvalue );
781  if ( std::string::npos != pvalue.find( "nan" ) ) {
782  pvalue = "float('nan')";
783  std::cout << "WARNING: default value for [" << p->name() << "] is NaN !!" << std::endl;
784  } else if ( std::string::npos == pvalue.find( "." ) && std::string::npos == pvalue.find( "e" ) ) {
785  pvalue = cvalue + ".0";
786  }
787  ptype = "float";
788  } else if ( ti == typeIndex<string>() ) {
789  pvalue = quote( cvalue );
790  ptype = "str";
791  } else if ( ti == typeIndex<GaudiHandleBase>() ) {
792  const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p );
793  const GaudiHandleBase& base = hdl.value();
794 
795  pvalue = base.pythonRepr();
796  ptype = "GaudiHandle";
797  ptype2 = base.pythonPropertyClassName();
798  m_importGaudiHandles = true;
799  } else if ( ti == typeIndex<GaudiHandleArrayBase>() ) {
800  const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p );
801  const GaudiHandleArrayBase& base = hdl.value();
802 
803  pvalue = base.pythonRepr();
804  ptype = "GaudiHandleArray";
805  ptype2 = base.pythonPropertyClassName();
806  m_importGaudiHandles = true;
807  } else if ( auto hdl = dynamic_cast<const DataHandleProperty*>( p ); hdl ) {
808  // dynamic_cast to support also classes derived from DataHandleProperty
809  const Gaudi::DataHandle& base = hdl->value();
810 
811  pvalue = base.pythonRepr();
812  ptype = "DataHandle";
813  m_importDataHandles = true;
814  } else {
815  std::ostringstream v_str;
816  v_str.setf( std::ios::showpoint ); // to correctly display floats
817  p->toStream( v_str );
818  pvalue = v_str.str();
819  ptype = "list";
820  }
821 }

◆ setConfigurableAlgorithm()

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

customize the configurable base class for Algorithm component

Definition at line 216 of file genconf.cpp.

216  {
217  m_configurable[component_t::Algorithm] = cfgAlgorithm;
218  }

◆ setConfigurableAlgTool()

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

customize the configurable base class for AlgTool component

Definition at line 221 of file genconf.cpp.

221 { 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 224 of file genconf.cpp.

224 { 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 211 of file genconf.cpp.

211  {
212  m_configurable[component_t::DefaultName] = defaultName;
213  }

◆ setConfigurableModule()

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

customize the Module name where configurable base classes are defined

Definition at line 208 of file genconf.cpp.

208 { 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 227 of file genconf.cpp.

227  {
228  m_configurable[component_t::Service] = cfgService;
229  m_configurable[component_t::ApplicationMgr] = cfgService;
230  }

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

◆ m_db2Buf

stringstream configGenerator::m_db2Buf
private

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

◆ m_importDataHandles

bool configGenerator::m_importDataHandles = false
private

Definition at line 180 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 179 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 172 of file genconf.cpp.

◆ m_pkgName

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 168 of file genconf.cpp.

◆ m_pyBuf

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 175 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:659
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:145
compareOutputFiles.pname
string pname
Definition: compareOutputFiles.py:482
std::string
STL class.
std::exception
STL class.
std::fstream
STL class.
GaudiHandleArrayProperty::value
const GaudiHandleArrayBase & value() const
Definition: Property.h:643
std::vector::reserve
T reserve(T... args)
gaudirun.s
string s
Definition: gaudirun.py:328
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
std::type_index
Gaudi::DataHandle
Definition: DataHandle.h:38
createAppMgr
int createAppMgr()
Definition: genconf.cpp:824
System::ImageHandle
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:40
conf.release
string release
Definition: conf.py:28
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:308
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:186
GaudiHandleBase
Definition: GaudiHandle.h:99
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:179
configGenerator::m_pyBuf
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:175
Gaudi.CommonGaudiConfigurables.mod
mod
Definition: CommonGaudiConfigurables.py:32
GaudiPluginService.cpluginsvc.registry
def registry()
Definition: cpluginsvc.py:82
Gaudi::svcLocator
GAUDI_API ISvcLocator * svcLocator()
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)
Definition: genconf.cpp:667
Gaudi::Time::format
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:262
TimingHistograms.name
name
Definition: TimingHistograms.py:23
std::cout
CLHEP::begin
double * begin(CLHEP::HepVector &v)
Definition: TupleAlg.cpp:45
configGenerator::pythonizeValue
void pythonizeValue(const PropertyBase *prop, string &pvalue, string &ptype, string &ptype2)
handle the "marshalling" of Properties
Definition: genconf.cpp:762
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)
GaudiPython.HistoUtils.path
path
Definition: HistoUtils.py:943
configGenerator::m_importDataHandles
bool m_importDataHandles
Definition: genconf.cpp:180
LOG_ERROR
#define LOG_ERROR
Definition: genconf.cpp:75
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:606
configGenerator::m_pkgName
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:168
gaudirun.level
level
Definition: gaudirun.py:346
configGenerator::genImport
void genImport(std::ostream &s, std::string_view frmt, std::string indent)
Definition: genconf.cpp:604
configGenerator::m_configurable
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:195
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:342
GaudiHandleProperty
Definition: Property.h:585
gaudiComponentHelp.properties
properties
Definition: gaudiComponentHelp.py:62
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:154
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:635
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: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:172
std::string::empty
T empty(T... args)
std::stringstream::str
T str(T... args)
GaudiPluginService.cpluginsvc.factories
def factories()
Definition: cpluginsvc.py:92
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:188
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:272
configGenerator::genBody
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:237
IInterface::addRef
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
GaudiHandleArrayProperty
Definition: Property.h:622
std::set< std::string >
std::exception::what
T what(T... args)
PrepareBase.out
out
Definition: PrepareBase.py:20