The Gaudi Framework  v32r2 (46d42edc)
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)
 
void genImport (std::ostream &s, const boost::format &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_importDataObjectHandles = 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...
 
std::map< component_t, std::stringm_configurable
 Configurable customization. More...
 

Detailed Description

Definition at line 154 of file genconf.cpp.

Constructor & Destructor Documentation

◆ configGenerator()

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

Definition at line 184 of file genconf.cpp.

185  : m_pkgName( pkgName ), m_outputDirName( outputDirName ) {}
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:160
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:156

Member Function Documentation

◆ genBody()

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

Definition at line 223 of file genconf.cpp.

223  {
224  pyOut << m_pyBuf.str() << flush;
225  dbOut << m_dbBuf.str() << flush;
226  }
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:163
T str(T... args)
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:174
T flush(T... args)

◆ genComponent()

bool configGenerator::genComponent ( const std::string libName,
const std::string componentName,
component_t  componentType,
const vector< PropertyBase * > &  properties 
)
private

Definition at line 662 of file genconf.cpp.

665 {
666  auto cname = pythonizeName( componentName );
667 
669  propDoc.reserve( properties.size() );
670 
671  m_pyBuf << "\nclass " << cname << "( " << m_configurable[componentType] << " ) :\n";
672  m_pyBuf << " __slots__ = { \n";
673  for ( const auto& prop : properties ) {
674  const string& pname = prop->name();
675  // Validate property name (it must be a valid Python identifier)
676  if ( !boost::regex_match( pname, pythonIdentifier ) ) {
677  std::cout << "ERROR: invalid property name \"" << pname << "\" in component " << cname
678  << " (invalid Python identifier)" << std::endl;
679  // try to make the buffer at least more or less valid python code.
680  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
681  << " }\n";
682  return false;
683  }
684 
685  string pvalue, ptype;
686  pythonizeValue( prop, pvalue, ptype );
687  m_pyBuf << " '" << pname << "' : " << pvalue << ", # " << ptype << "\n";
688 
689  if ( prop->documentation() != "none" ) {
690  propDoc.emplace_back( pname, prop->documentation() + " [" + prop->ownerTypeName() + "]" );
691  }
692  }
693  m_pyBuf << " }\n";
694  m_pyBuf << " _propertyDocDct = { \n";
695  for ( const auto& prop : propDoc ) {
696  m_pyBuf << std::setw( 5 ) << "'" << prop.first << "' : "
697  << "\"\"\" " << prop.second << " \"\"\",\n";
698  }
699  m_pyBuf << " }\n";
700 
701  m_pyBuf << " def __init__(self, name = " << m_configurable[component_t::DefaultName] << ", **kwargs):\n"
702  << " super(" << cname << ", self).__init__(name)\n"
703  << " for n,v in kwargs.items():\n"
704  << " setattr(self, n, v)\n"
705  << " def getDlls( self ):\n"
706  << " return '" << libName << "'\n"
707  << " def getType( self ):\n"
708  << " return '" << componentName << "'\n"
709  << " pass # class " << cname << "\n"
710  << flush;
711 
712  // name of the auto-generated module
713  const string pyName = ( fs::path( m_outputDirName ) / fs::path( libName + "Conf.py" ) ).string();
714  const string modName = fs::basename( fs::path( pyName ).leaf() );
715 
716  // now the db part
717  m_dbBuf << m_pkgName << "." << modName << " " << libName << " " << cname << "\n" << flush;
718 
719  return true;
720 }
T endl(T... args)
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:163
T setw(T... args)
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:174
T flush(T... args)
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:160
STL class.
void pythonizeValue(const PropertyBase *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:723
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:156
T reserve(T... args)
T emplace_back(T... args)

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

438 {
439  //--- Disable checking StatusCode -------------------------------------------
441 
442  const auto endLib = libs.end();
443 
444  static const std::string gaudiSvc = "GaudiCoreSvc";
445  const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != endLib );
446 
447  //--- Instantiate ApplicationMgr --------------------------------------------
448  if ( !isGaudiSvc && createAppMgr() ) {
449  cout << "ERROR: ApplicationMgr can not be created. Check environment" << endl;
450  return EXIT_FAILURE;
451  }
452 
453  //--- Iterate over component factories --------------------------------------
454  using Gaudi::PluginService::Details::Registry;
455  const Registry& registry = Registry::instance();
456 
457  auto bkgNames = registry.loadedFactoryNames();
458 
459  ISvcLocator* svcLoc = Gaudi::svcLocator();
460  IInterface* dummySvc = new Service( "DummySvc", svcLoc );
461  dummySvc->addRef();
462 
463  bool allGood = true;
464 
465  // iterate over all the requested libraries
466  for ( const auto& iLib : libs ) {
467 
468  LOG_INFO << ":::: processing library: " << iLib << "...";
469 
470  // reset state
471  m_importGaudiHandles = false;
473  m_pyBuf.str( "" );
474  m_dbBuf.str( "" );
475 
476  //--- Load component library ----------------------------------------------
477  System::ImageHandle handle;
478  unsigned long err = System::loadDynamicLib( iLib, &handle );
479  if ( err != 1 ) {
481  allGood = false;
482  continue;
483  }
484 
485  const auto& factories = registry.factories();
486  for ( const auto& factoryName : registry.loadedFactoryNames() ) {
487  if ( bkgNames.find( factoryName ) != bkgNames.end() ) {
489  LOG_INFO << "\t==> skipping [" << factoryName << "]...";
490  }
491  continue;
492  }
493  auto entry = factories.find( factoryName );
494  if ( entry == end( factories ) ) {
495  LOG_ERROR << "inconsistency in component factories list: I cannot find anymore " << factoryName;
496  continue;
497  }
498  const auto& info = entry->second;
499  if ( !info.is_set() ) continue;
500 
501  // do not generate configurables for the Reflex-compatible aliases
502  if ( !info.getprop( "ReflexName" ).empty() ) continue;
503 
504  // Atlas contributed code (patch #1247)
505  // Skip the generation of configurables if the component does not come
506  // from the same library we are processing (i.e. we found a symbol that
507  // is coming from a library loaded by the linker).
508  if ( libNativeName( iLib ) != info.library ) {
509  LOG_WARNING << "library [" << iLib << "] exposes factory [" << factoryName << "] which is declared in ["
510  << info.library << "] !!";
511  continue;
512  }
513 
514  component_t type = component_t::Unknown;
515  {
516  const auto ft = allowedFactories.find( info.factory.type().name() );
517  if ( ft != allowedFactories.end() ) {
518  type = ft->second;
519  } else if ( factoryName == "ApplicationMgr" ) {
520  type = component_t::ApplicationMgr;
521  } else
522  continue;
523  }
524 
525  // handle possible problems with templated components
526  std::string name = boost::trim_copy( factoryName );
527 
528  const auto className = info.getprop( "ClassName" );
529  LOG_INFO << " - component: " << className << " (" << ( className != name ? ( name + ": " ) : std::string() )
530  << type << ")";
531 
532  string cname = "DefaultName";
533  SmartIF<IProperty> prop;
534  try {
535  switch ( type ) {
536  case component_t::Algorithm:
537  prop = SmartIF<IAlgorithm>( Gaudi::Algorithm::Factory::create( factoryName, cname, svcLoc ).release() );
538  break;
539  case component_t::Service:
540  prop = SmartIF<IService>( Service::Factory::create( factoryName, cname, svcLoc ).release() );
541  break;
542  case component_t::AlgTool:
543  prop =
544  SmartIF<IAlgTool>( AlgTool::Factory::create( factoryName, cname, toString( type ), dummySvc ).release() );
545  // FIXME: AlgTool base class increase artificially by 1 the refcount.
546  prop->release();
547  break;
548  case component_t::Auditor:
549  prop = SmartIF<IAuditor>( Auditor::Factory::create( factoryName, cname, svcLoc ).release() );
550  break;
551  case component_t::ApplicationMgr:
552  prop = SmartIF<ISvcLocator>( svcLoc );
553  break;
554  default:
555  continue; // unknown
556  }
557  } catch ( exception& e ) {
558  LOG_ERROR << "Error instantiating " << name << " from " << iLib;
559  LOG_ERROR << "Got exception: " << e.what();
560  allGood = false;
561  continue;
562  } catch ( ... ) {
563  LOG_ERROR << "Error instantiating " << name << " from " << iLib;
564  allGood = false;
565  continue;
566  }
567  if ( prop ) {
568  if ( !genComponent( iLib, name, type, prop->getProperties() ) ) { allGood = false; }
569  prop.reset();
570  } else {
571  LOG_ERROR << "could not cast IInterface* object to an IProperty* !";
572  LOG_ERROR << "NO Configurable will be generated for [" << name << "] !";
573  allGood = false;
574  }
575  } //> end loop over factories
576 
580  const std::string pyName = ( fs::path( m_outputDirName ) / fs::path( iLib + "Conf.py" ) ).string();
581  const std::string dbName = ( fs::path( m_outputDirName ) / fs::path( iLib + ".confdb" ) ).string();
582 
583  std::fstream py( pyName, std::ios_base::out | std::ios_base::trunc );
584  std::fstream db( dbName, std::ios_base::out | std::ios_base::trunc );
585 
586  genHeader( py, db );
587  if ( !userModule.empty() ) py << "from " << userModule << " import *" << endl;
588  genBody( py, db );
589  genTrailer( py, db );
590 
591  } //> end loop over libraries
592 
593  dummySvc->release();
594  dummySvc = 0;
595 
596  return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
597 }
T empty(T... args)
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
component_t
Definition: genconf.cpp:95
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:334
#define LOG_ERROR
Definition: genconf.cpp:73
T endl(T... args)
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:30
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:163
STL class.
bool m_importDataObjectHandles
Definition: genconf.cpp:168
GAUDI_API ISvcLocator * svcLocator()
GAUDIPS_API Logger & logger()
Return the current logger instance.
T what(T... args)
#define LOG_INFO
Definition: genconf.cpp:75
Definition of the basic interface.
Definition: IInterface.h:244
STL class.
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:630
T str(T... args)
def end
Definition: IOTest.py:113
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:174
STL class.
T find(T... args)
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:160
virtual unsigned long release()=0
Release Interface instance.
#define LOG_WARNING
Definition: genconf.cpp:74
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:167
virtual const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const =0
Get list of properties.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:44
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:86
void genTrailer(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:654
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:262
bool genComponent(const std::string &libName, const std::string &componentName, component_t componentType, const vector< PropertyBase * > &properties)
Definition: genconf.cpp:662
Base class for all services.
Definition: Service.h:36
int createAppMgr()
Definition: genconf.cpp:783
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:223
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
Definition: System.cpp:135

◆ genHeader()

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

Definition at line 630 of file genconf.cpp.

632 {
633  // python file part
634  std::string now = Gaudi::Time::current().format( true );
635  py << "#" << now //<< "\n"
636  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n"
637  << "import sys\n"
638  << "if sys.version_info >= (3,):\n"
639  << " # Python 2 compatibility\n"
640  << " long = int\n";
641 
642  if ( m_importGaudiHandles ) { py << "from GaudiKernel.GaudiHandles import *\n"; }
643 
644  if ( m_importDataObjectHandles ) { py << "from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase\n"; }
645 
646  genImport( py, boost::format( "from %1%.Configurable import *" ) );
647 
648  // db file part
649  db << "## -*- ascii -*- \n"
650  << "# db file automatically generated by genconf on: " << now << "\n"
651  << flush;
652 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
static Time current()
Returns the current time.
Definition: Time.cpp:109
STL class.
bool m_importDataObjectHandles
Definition: genconf.cpp:168
T flush(T... args)
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:252
void genImport(std::ostream &s, const boost::format &frmt, std::string indent)
Definition: genconf.cpp:599
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:167

◆ genImport()

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

Definition at line 599 of file genconf.cpp.

599  {
600 
601  std::string::size_type pos = 0, nxtpos = 0;
603 
604  while ( std::string::npos != pos ) {
605  // find end of module name
606  nxtpos = m_configurable[component_t::Module].find_first_of( ',', pos );
607 
608  // Prepare import string
609  mod = m_configurable[component_t::Module].substr( pos, nxtpos - pos );
610  std::ostringstream import;
611  import << boost::format( frmt ) % mod;
612 
613  // append a normal import or a try/except enclosed one depending
614  // on availability of a fall-back module (next in the list)
615  if ( std::string::npos == nxtpos ) {
616  // last possible module
617  s << indent << import.str() << "\n" << flush;
618  pos = std::string::npos;
619  } else {
620  // we have a fallback for this
621  s << indent << "try:\n" << indent << py_tab << import.str() << "\n" << indent << "except ImportError:\n" << flush;
622  pos = nxtpos + 1;
623  }
624  // increase indentation level for next iteration
625  indent += py_tab;
626  }
627 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:109
STL class.
T flush(T... args)
string s
Definition: gaudirun.py:318
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

◆ genTrailer()

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

Definition at line 654 of file genconf.cpp.

656 {
657  // db file part
658  db << "## " << m_pkgName << "\n" << std::flush;
659 }
T flush(T... args)
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:156

◆ pythonizeValue()

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

handle the "marshalling" of Properties

Definition at line 723 of file genconf.cpp.

725 {
726  const std::string cvalue = p->toString();
727  const std::type_index ti = std::type_index( *p->type_info() );
728  if ( ti == typeIndex<bool>() ) {
729  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" ) ? "False" : "True";
730  ptype = "bool";
731  } else if ( ti == typeIndex<char>() || ti == typeIndex<signed char>() || ti == typeIndex<unsigned char>() ||
732  ti == typeIndex<short>() || ti == typeIndex<unsigned short>() || ti == typeIndex<int>() ||
733  ti == typeIndex<unsigned int>() || ti == typeIndex<long>() || ti == typeIndex<unsigned long>() ) {
734  pvalue = cvalue;
735  ptype = "int";
736  } else if ( ti == typeIndex<long long>() || ti == typeIndex<unsigned long long>() ) {
737  pvalue = "long(" + cvalue + ")";
738  ptype = "long";
739  } else if ( ti == typeIndex<float>() || ti == typeIndex<double>() ) {
740  // forces python to handle this as a float: put a dot in there...
741  pvalue = boost::to_lower_copy( cvalue );
742  if ( pvalue == "nan" ) {
743  pvalue = "float('nan')";
744  std::cout << "WARNING: default value for [" << p->name() << "] is NaN !!" << std::endl;
745  } else if ( std::string::npos == pvalue.find( "." ) && std::string::npos == pvalue.find( "e" ) ) {
746  pvalue = cvalue + ".0";
747  }
748  ptype = "float";
749  } else if ( ti == typeIndex<string>() ) {
750  pvalue = "'" + cvalue + "'";
751  ptype = "str";
752  } else if ( ti == typeIndex<GaudiHandleBase>() ) {
753  const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p );
754  const GaudiHandleBase& base = hdl.value();
755 
756  pvalue = base.pythonRepr();
757  ptype = "GaudiHandle";
758  m_importGaudiHandles = true;
759  } else if ( ti == typeIndex<GaudiHandleArrayBase>() ) {
760  const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p );
761  const GaudiHandleArrayBase& base = hdl.value();
762 
763  pvalue = base.pythonRepr();
764  ptype = "GaudiHandleArray";
765  m_importGaudiHandles = true;
766  } else if ( ti == typeIndex<DataObjectHandleBase>() ) {
767  const DataObjectHandleProperty& hdl = dynamic_cast<const DataObjectHandleProperty&>( *p );
768  const DataObjectHandleBase& base = hdl.value();
769 
770  pvalue = base.pythonRepr();
771  ptype = "DataObjectHandleBase";
773  } else {
774  std::ostringstream v_str;
775  v_str.setf( std::ios::showpoint ); // to correctly display floats
776  p->toStream( v_str );
777  pvalue = v_str.str();
778  ptype = "list";
779  }
780 }
T setf(T... args)
const GaudiHandleArrayBase & value() const
Definition: Property.h:903
std::string pythonRepr() const override
T endl(T... args)
std::string pythonRepr() const override
Python representation of handle, i.e.
Definition: GaudiHandle.cpp:48
DataObjectHandleProperty.h GaudiKernel/DataObjectHandleProperty.h.
STL class.
bool m_importDataObjectHandles
Definition: genconf.cpp:168
T str(T... args)
const DataObjectHandleBase & value() const
T find(T... args)
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:330
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:167
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:89
const GaudiHandleBase & value() const
Definition: Property.h:866
std::string pythonRepr() const override
Python representation of array of handles, i.e.
Definition: GaudiHandle.cpp:78

◆ setConfigurableAlgorithm()

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

customize the configurable base class for Algorithm component

Definition at line 202 of file genconf.cpp.

202  {
203  m_configurable[component_t::Algorithm] = cfgAlgorithm;
204  }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

◆ setConfigurableAlgTool()

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

customize the configurable base class for AlgTool component

Definition at line 207 of file genconf.cpp.

207 { m_configurable[component_t::AlgTool] = cfgAlgTool; }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

◆ setConfigurableAuditor()

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

customize the configurable base class for AlgTool component

Definition at line 210 of file genconf.cpp.

210 { m_configurable[component_t::Auditor] = cfgAuditor; }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

◆ setConfigurableDefaultName()

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

customize the default name for configurable instances

Definition at line 197 of file genconf.cpp.

197  {
198  m_configurable[component_t::DefaultName] = defaultName;
199  }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

◆ setConfigurableModule()

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

customize the Module name where configurable base classes are defined

Definition at line 194 of file genconf.cpp.

194 { m_configurable[component_t::Module] = moduleName; }
GAUDI_API const std::string & moduleName()
Get the name of the (executable/DLL) file without file-type.
Definition: ModuleInfo.cpp:54
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

◆ setConfigurableService()

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

customize the configurable base class for Service component

Definition at line 213 of file genconf.cpp.

213  {
214  m_configurable[component_t::Service] = cfgService;
215  m_configurable[component_t::ApplicationMgr] = cfgService;
216  }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:181

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

◆ m_importDataObjectHandles

bool configGenerator::m_importDataObjectHandles = false
private

Definition at line 168 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 167 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 160 of file genconf.cpp.

◆ m_pkgName

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 156 of file genconf.cpp.

◆ m_pyBuf

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 163 of file genconf.cpp.


The documentation for this class was generated from the following file: