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

Detailed Description

Definition at line 160 of file genconf.cpp.

Constructor & Destructor Documentation

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

Definition at line 192 of file genconf.cpp.

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

Member Function Documentation

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

Definition at line 236 of file genconf.cpp.

237  {
238  pyOut << m_pyBuf.str() << flush;
239  dbOut << m_dbBuf.str() << flush;
240  }
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:170
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:182
T flush(T...args)
bool configGenerator::genComponent ( const std::string libName,
const std::string componentName,
component_t  componentType,
const vector< PropertyBase * > &  properties 
)
private

Definition at line 689 of file genconf.cpp.

692 {
693  auto cname = pythonizeName( componentName );
694 
696  propDoc.reserve( properties.size() );
697 
698  m_pyBuf << "\nclass " << cname << "( " << m_configurable[componentType] << " ) :\n";
699  m_pyBuf << " __slots__ = { \n";
700  for ( const auto& prop : properties ) {
701  const string& pname = prop->name();
702  // Validate property name (it must be a valid Python identifier)
703  if ( !boost::regex_match( pname, pythonIdentifier ) ) {
704  std::cout << "ERROR: invalid property name \"" << pname << "\" in component " << cname
705  << " (invalid Python identifier)" << std::endl;
706  // try to make the buffer at least more or less valid python code.
707  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
708  << " }\n";
709  return false;
710  }
711 
712  string pvalue, ptype;
713  pythonizeValue( prop, pvalue, ptype );
714  m_pyBuf << " '" << pname << "' : " << pvalue << ", # " << ptype << "\n";
715 
716  if ( prop->documentation() != "none" ) {
717  propDoc.emplace_back( pname, prop->documentation() + " [" + prop->ownerTypeName() + "]" );
718  }
719  }
720  m_pyBuf << " }\n";
721  m_pyBuf << " _propertyDocDct = { \n";
722  for ( const auto& prop : propDoc ) {
723  m_pyBuf << std::setw( 5 ) << "'" << prop.first << "' : "
724  << "\"\"\" " << prop.second << " \"\"\",\n";
725  }
726  m_pyBuf << " }\n";
727 
728  m_pyBuf << " def __init__(self, name = " << m_configurable[component_t::DefaultName] << ", **kwargs):\n"
729  << " super(" << cname << ", self).__init__(name)\n"
730  << " for n,v in kwargs.items():\n"
731  << " setattr(self, n, v)\n"
732  << " def getDlls( self ):\n"
733  << " return '" << libName << "'\n"
734  << " def getType( self ):\n"
735  << " return '" << componentName << "'\n"
736  << " pass # class " << cname << "\n"
737  << flush;
738 
739  // name of the auto-generated module
740  const string pyName = ( fs::path( m_outputDirName ) / fs::path( libName + "Conf.py" ) ).string();
741  const string modName = fs::basename( fs::path( pyName ).leaf() );
742 
743  // now the db part
744  m_dbBuf << m_pkgName << "." << modName << " " << libName << " " << cname << "\n" << flush;
745 
746  return true;
747 }
T endl(T...args)
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:170
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:182
T flush(T...args)
T size(T...args)
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:167
STL class.
void pythonizeValue(const PropertyBase *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:750
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:163
T reserve(T...args)
T emplace_back(T...args)
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 456 of file genconf.cpp.

458 {
459  //--- Disable checking StatusCode -------------------------------------------
461 
462  const auto endLib = libs.end();
463 
464  static const std::string gaudiSvc = "GaudiCoreSvc";
465  const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != endLib );
466 
467  //--- Instantiate ApplicationMgr --------------------------------------------
468  if ( !isGaudiSvc && createAppMgr() ) {
469  cout << "ERROR: ApplicationMgr can not be created. Check environment" << endl;
470  return EXIT_FAILURE;
471  }
472 
473  //--- Iterate over component factories --------------------------------------
474  using Gaudi::PluginService::Details::Registry;
475  const Registry& registry = Registry::instance();
476 
477  auto bkgNames = registry.loadedFactoryNames();
478 
479  ISvcLocator* svcLoc = Gaudi::svcLocator();
480  IInterface* dummySvc = new Service( "DummySvc", svcLoc );
481  dummySvc->addRef();
482 
483  bool allGood = true;
484 
485  // iterate over all the requested libraries
486  for ( const auto& iLib : libs ) {
487 
488  LOG_INFO << ":::: processing library: " << iLib << "...";
489 
490  // reset state
491  m_importGaudiHandles = false;
493  m_importDataHandles = false;
494  m_pyBuf.str( "" );
495  m_dbBuf.str( "" );
496 
497  //--- Load component library ----------------------------------------------
498  System::ImageHandle handle;
499  unsigned long err = System::loadDynamicLib( iLib, &handle );
500  if ( err != 1 ) {
502  allGood = false;
503  continue;
504  }
505 
506  const auto& factories = registry.factories();
507  for ( const auto& factoryName : registry.loadedFactoryNames() ) {
508  if ( bkgNames.find( factoryName ) != bkgNames.end() ) {
510  LOG_INFO << "\t==> skipping [" << factoryName << "]...";
511  }
512  continue;
513  }
514  auto entry = factories.find( factoryName );
515  if ( entry == end( factories ) ) {
516  LOG_ERROR << "inconsistency in component factories list: I cannot find anymore " << factoryName;
517  continue;
518  }
519  const auto& info = entry->second;
520  if ( !info.is_set() ) continue;
521 
522  // do not generate configurables for the Reflex-compatible aliases
523  if ( !info.getprop( "ReflexName" ).empty() ) continue;
524 
525  // Atlas contributed code (patch #1247)
526  // Skip the generation of configurables if the component does not come
527  // from the same library we are processing (i.e. we found a symbol that
528  // is coming from a library loaded by the linker).
529  if ( libNativeName( iLib ) != info.library ) {
530  LOG_WARNING << "library [" << iLib << "] exposes factory [" << factoryName << "] which is declared in ["
531  << info.library << "] !!";
532  continue;
533  }
534 
535  component_t type = component_t::Unknown;
536  {
537  const auto ft = allowedFactories.find( info.factory.type().name() );
538  if ( ft != allowedFactories.end() ) {
539  type = ft->second;
540  } else if ( factoryName == "ApplicationMgr" ) {
541  type = component_t::ApplicationMgr;
542  } else
543  continue;
544  }
545 
546  // handle possible problems with templated components
547  std::string name = boost::trim_copy( factoryName );
548 
549  const auto className = info.getprop( "ClassName" );
550  LOG_INFO << " - component: " << className << " (" << ( className != name ? ( name + ": " ) : std::string() )
551  << type << ")";
552 
553  string cname = "DefaultName";
554  SmartIF<IProperty> prop;
555  try {
556  switch ( type ) {
557  case component_t::Algorithm:
558  prop = SmartIF<IAlgorithm>( Algorithm::Factory::create( factoryName, cname, svcLoc ).release() );
559  break;
560  case component_t::Service:
561  prop = SmartIF<IService>( Service::Factory::create( factoryName, cname, svcLoc ).release() );
562  break;
563  case component_t::AlgTool:
564  prop =
565  SmartIF<IAlgTool>( AlgTool::Factory::create( factoryName, cname, toString( type ), dummySvc ).release() );
566  // FIXME: AlgTool base class increase artificially by 1 the refcount.
567  prop->release();
568  break;
569  case component_t::Auditor:
570  prop = SmartIF<IAuditor>( Auditor::Factory::create( factoryName, cname, svcLoc ).release() );
571  break;
572  case component_t::ApplicationMgr:
573  prop = SmartIF<ISvcLocator>( svcLoc );
574  break;
575  default:
576  continue; // unknown
577  }
578  } catch ( exception& e ) {
579  LOG_ERROR << "Error instantiating " << name << " from " << iLib;
580  LOG_ERROR << "Got exception: " << e.what();
581  allGood = false;
582  continue;
583  } catch ( ... ) {
584  LOG_ERROR << "Error instantiating " << name << " from " << iLib;
585  allGood = false;
586  continue;
587  }
588  if ( prop ) {
589  if ( !genComponent( iLib, name, type, prop->getProperties() ) ) {
590  allGood = false;
591  }
592  prop.reset();
593  } else {
594  LOG_ERROR << "could not cast IInterface* object to an IProperty* !";
595  LOG_ERROR << "NO Configurable will be generated for [" << name << "] !";
596  allGood = false;
597  }
598  } //> end loop over factories
599 
603  const std::string pyName = ( fs::path( m_outputDirName ) / fs::path( iLib + "Conf.py" ) ).string();
604  const std::string dbName = ( fs::path( m_outputDirName ) / fs::path( iLib + ".confdb" ) ).string();
605 
606  std::fstream py( pyName, std::ios_base::out | std::ios_base::trunc );
607  std::fstream db( dbName, std::ios_base::out | std::ios_base::trunc );
608 
609  genHeader( py, db );
610  if ( !userModule.empty() ) py << "from " << userModule << " import *" << endl;
611  genBody( py, db );
612  genTrailer( py, db );
613 
614  } //> end loop over libraries
615 
616  dummySvc->release();
617  dummySvc = 0;
618 
619  return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
620 }
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:97
#define LOG_ERROR
Definition: genconf.cpp:74
T endl(T...args)
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:31
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:170
STL class.
bool m_importDataObjectHandles
Definition: genconf.cpp:175
GAUDI_API ISvcLocator * svcLocator()
GAUDIPS_API Logger & logger()
Return the current logger instance.
T what(T...args)
#define LOG_INFO
Definition: genconf.cpp:76
Definition of the basic interface.
Definition: IInterface.h:277
STL class.
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:654
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:182
STL class.
virtual const std::vector< Gaudi::Details::PropertyBase * > & getProperties() const =0
Get list of properties.
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:167
virtual unsigned long release()=0
Release Interface instance.
#define LOG_WARNING
Definition: genconf.cpp:75
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:174
bool m_importDataHandles
Definition: genconf.cpp:176
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:42
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:92
void genTrailer(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:681
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:294
bool genComponent(const std::string &libName, const std::string &componentName, component_t componentType, const vector< PropertyBase * > &properties)
Definition: genconf.cpp:689
Base class for all services.
Definition: Service.h:36
int createAppMgr()
Definition: genconf.cpp:815
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:236
std::string toString(const Type &)
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
Definition: System.cpp:154
void configGenerator::genHeader ( std::ostream pyOut,
std::ostream dbOut 
)
private

Definition at line 654 of file genconf.cpp.

656 {
657  // python file part
658  std::string now = Gaudi::Time::current().format( true );
659  py << "#" << now //<< "\n"
660  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n";
661  if ( m_importGaudiHandles ) {
662  py << "from GaudiKernel.GaudiHandles import *\n";
663  }
664 
666  py << "from GaudiKernel.DataObjectHandleBase import DataObjectHandleBase\n";
667  }
668 
669  if ( m_importDataHandles ) {
670  py << "from GaudiKernel.DataHandle import DataHandle\n";
671  }
672 
673  genImport( py, boost::format( "from %1%.Configurable import *" ) );
674 
675  // db file part
676  db << "## -*- ascii -*- \n"
677  << "# db file automatically generated by genconf on: " << now << "\n"
678  << flush;
679 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
static Time current()
Returns the current time.
Definition: Time.cpp:112
STL class.
bool m_importDataObjectHandles
Definition: genconf.cpp:175
T flush(T...args)
void genImport(std::ostream &s, const boost::format &frmt, std::string indent)
Definition: genconf.cpp:622
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:174
bool m_importDataHandles
Definition: genconf.cpp:176
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:260
void configGenerator::genImport ( std::ostream s,
const boost::format frmt,
std::string  indent = "" 
)
private

Definition at line 622 of file genconf.cpp.

623 {
624 
625  std::string::size_type pos = 0, nxtpos = 0;
627 
628  while ( std::string::npos != pos ) {
629  // find end of module name
630  nxtpos = m_configurable[component_t::Module].find_first_of( ',', pos );
631 
632  // Prepare import string
633  mod = m_configurable[component_t::Module].substr( pos, nxtpos - pos );
634  std::ostringstream import;
635  import << boost::format( frmt ) % mod;
636 
637  // append a normal import or a try/except enclosed one depending
638  // on availability of a fall-back module (next in the list)
639  if ( std::string::npos == nxtpos ) {
640  // last possible module
641  s << indent << import.str() << "\n" << flush;
642  pos = std::string::npos;
643  } else {
644  // we have a fallback for this
645  s << indent << "try:\n" << indent << py_tab << import.str() << "\n" << indent << "except ImportError:\n" << flush;
646  pos = nxtpos + 1;
647  }
648  // increase indentation level for next iteration
649  indent += py_tab;
650  }
651 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:120
STL class.
T flush(T...args)
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189
void configGenerator::genTrailer ( std::ostream pyOut,
std::ostream dbOut 
)
private

Definition at line 681 of file genconf.cpp.

683 {
684  // db file part
685  db << "## " << m_pkgName << "\n" << std::flush;
686 }
T flush(T...args)
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:163
void configGenerator::pythonizeValue ( const PropertyBase prop,
string pvalue,
string ptype 
)
private

handle the "marshalling" of Properties

Definition at line 750 of file genconf.cpp.

752 {
753  const std::string cvalue = p->toString();
754  const std::type_index ti = std::type_index( *p->type_info() );
755  if ( ti == typeIndex<bool>() ) {
756  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" ) ? "False" : "True";
757  ptype = "bool";
758  } else if ( ti == typeIndex<char>() || ti == typeIndex<signed char>() || ti == typeIndex<unsigned char>() ||
759  ti == typeIndex<short>() || ti == typeIndex<unsigned short>() || ti == typeIndex<int>() ||
760  ti == typeIndex<unsigned int>() || ti == typeIndex<long>() || ti == typeIndex<unsigned long>() ) {
761  pvalue = cvalue;
762  ptype = "int";
763  } else if ( ti == typeIndex<long long>() || ti == typeIndex<unsigned long long>() ) {
764  pvalue = cvalue + "L";
765  ptype = "long";
766  } else if ( ti == typeIndex<float>() || ti == typeIndex<double>() ) {
767  // forces python to handle this as a float: put a dot in there...
768  pvalue = boost::to_lower_copy( cvalue );
769  if ( pvalue == "nan" ) {
770  pvalue = "float('nan')";
771  std::cout << "WARNING: default value for [" << p->name() << "] is NaN !!" << std::endl;
772  } else if ( std::string::npos == pvalue.find( "." ) && std::string::npos == pvalue.find( "e" ) ) {
773  pvalue = cvalue + ".0";
774  }
775  ptype = "float";
776  } else if ( ti == typeIndex<string>() ) {
777  pvalue = "'" + cvalue + "'";
778  ptype = "str";
779  } else if ( ti == typeIndex<GaudiHandleBase>() ) {
780  const GaudiHandleProperty& hdl = dynamic_cast<const GaudiHandleProperty&>( *p );
781  const GaudiHandleBase& base = hdl.value();
782 
783  pvalue = base.pythonRepr();
784  ptype = "GaudiHandle";
785  m_importGaudiHandles = true;
786  } else if ( ti == typeIndex<GaudiHandleArrayBase>() ) {
787  const GaudiHandleArrayProperty& hdl = dynamic_cast<const GaudiHandleArrayProperty&>( *p );
788  const GaudiHandleArrayBase& base = hdl.value();
789 
790  pvalue = base.pythonRepr();
791  ptype = "GaudiHandleArray";
792  m_importGaudiHandles = true;
793  } else if ( ti == typeIndex<DataObjectHandleBase>() ) {
794  const DataObjectHandleProperty& hdl = dynamic_cast<const DataObjectHandleProperty&>( *p );
795  const DataObjectHandleBase& base = hdl.value();
796 
797  pvalue = base.pythonRepr();
798  ptype = "DataObjectHandleBase";
800  } else {
801  std::ostringstream v_str;
802  v_str.setf( std::ios::showpoint ); // to correctly display floats
803  p->toStream( v_str );
804  pvalue = v_str.str();
805  ptype = "list";
806 
807  // To load the Python configuration module associated with DataHandles
808  if ( ti == typeIndex<Gaudi::DataHandleConfigurable>() ) {
809  m_importDataHandles = true;
810  }
811  }
812 }
T setf(T...args)
T endl(T...args)
DataObjectHandleProperty.h GaudiKernel/DataObjectHandleProperty.h.
STL class.
bool m_importDataObjectHandles
Definition: genconf.cpp:175
const GaudiHandleBase & value() const
Definition: Property.h:984
const GaudiHandleArrayBase & value() const
Definition: Property.h:1024
std::string pythonRepr() const override
Python representation of array of handles, i.e.
Definition: GaudiHandle.cpp:86
T find(T...args)
Base class of array&#39;s of various gaudihandles.
Definition: GaudiHandle.h:354
DataObjectHandleBase GaudiKernel/DataObjectHandleBase.h.
std::string pythonRepr() const override
Python representation of handle, i.e.
Definition: GaudiHandle.cpp:53
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:174
std::string pythonRepr() const override
bool m_importDataHandles
Definition: genconf.cpp:176
const DataObjectHandleBase & value() const
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:94
void configGenerator::setConfigurableAlgorithm ( const std::string cfgAlgorithm)
inline

customize the configurable base class for Algorithm component

Definition at line 213 of file genconf.cpp.

214  {
215  m_configurable[component_t::Algorithm] = cfgAlgorithm;
216  }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189
void configGenerator::setConfigurableAlgTool ( const std::string cfgAlgTool)
inline

customize the configurable base class for AlgTool component

Definition at line 219 of file genconf.cpp.

219 { m_configurable[component_t::AlgTool] = cfgAlgTool; }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189
void configGenerator::setConfigurableAuditor ( const std::string cfgAuditor)
inline

customize the configurable base class for AlgTool component

Definition at line 222 of file genconf.cpp.

222 { m_configurable[component_t::Auditor] = cfgAuditor; }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189
void configGenerator::setConfigurableDefaultName ( const std::string defaultName)
inline

customize the default name for configurable instances

Definition at line 207 of file genconf.cpp.

208  {
209  m_configurable[component_t::DefaultName] = defaultName;
210  }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189
void configGenerator::setConfigurableModule ( const std::string moduleName)
inline

customize the Module name where configurable base classes are defined

Definition at line 204 of file genconf.cpp.

204 { 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:189
void configGenerator::setConfigurableService ( const std::string cfgService)
inline

customize the configurable base class for Service component

Definition at line 225 of file genconf.cpp.

226  {
227  m_configurable[component_t::Service] = cfgService;
228  m_configurable[component_t::ApplicationMgr] = cfgService;
229  }
std::map< component_t, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:189

Member Data Documentation

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

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

bool configGenerator::m_importDataHandles = false
private

Definition at line 176 of file genconf.cpp.

bool configGenerator::m_importDataObjectHandles = false
private

Definition at line 175 of file genconf.cpp.

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

string configGenerator::m_outputDirName
private

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

Definition at line 167 of file genconf.cpp.

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 163 of file genconf.cpp.

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 170 of file genconf.cpp.


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