All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

int genComponent (const std::string &libName, const std::string &componentName, const std::string &componentType, const vector< Property * > &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 Property *prop, string &pvalue, string &ptype)
 handle the "marshalling" of Properties More...
 
void pythonizeName (string &name)
 Translates a valid C++ typename into a valid python one. 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
 switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the components has a XyzHandle<T>) More...
 
stringstream m_dbBuf
 buffer of generated configurables informations for the "Db" file The "Db" file is holding informations about the generated configurables This file is later one used by the PropertyProxy.py to locate Configurables and know their default values, host module,... More...
 
GaudiUtils::HashMap
< std::string, std::string > 
m_configurable
 Configurable customization. More...
 

Detailed Description

Definition at line 91 of file genconf.cpp.

Constructor & Destructor Documentation

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

Definition at line 121 of file genconf.cpp.

122  :
123  m_pkgName ( pkgName ),
124  m_outputDirName ( outputDirName ),
125  m_pyBuf ( ),
126  m_importGaudiHandles( false ),
127  m_dbBuf ( ),
128  m_configurable ( )
129  {}
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:101
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:111
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:98
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:105
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:94

Member Function Documentation

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

Definition at line 181 of file genconf.cpp.

182  {
183  pyOut << m_pyBuf.str() << flush;
184  dbOut << m_dbBuf.str() << flush;
185  }
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:101
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:111
int configGenerator::genComponent ( const std::string &  libName,
const std::string &  componentName,
const std::string &  componentType,
const vector< Property * > &  properties 
)
private

Definition at line 695 of file genconf.cpp.

700 {
701  string cname = componentName;
702  pythonizeName(cname);
703 
704  typedef GaudiUtils::HashMap<std::string, std::string> PropertyDoc_t;
705  PropertyDoc_t propDoc;
706 
707  m_pyBuf << "\n";
708  m_pyBuf << "class " << cname
709  << "( " << m_configurable[componentType] << " ) :"
710  << "\n";
711  m_pyBuf << " __slots__ = { \n";
712  for ( vector<Property*>::const_iterator it = properties.begin() ;
713  it != properties.end(); ++it ) {
714 
715  const string pname = (*it)->name();
716  // Validate property name (it must be a valid Python identifier)
717  if (!boost::regex_match(pname, pythonIdentifier)) {
718  std::cout << "ERROR: invalid property name \"" << pname
719  << "\" in component " << cname
720  << " (invalid Python identifier)" << std::endl;
721  // try to make the buffer at least more or less valid python code.
722  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
723  << " }\n";
724  return 1;
725  }
726 
727  string pvalue, ptype;
728  pythonizeValue( (*it), pvalue, ptype );
729  m_pyBuf << " '" << pname << "' : " << pvalue <<", # " << ptype << "\n";
730 
731  if ( (*it)->documentation() != "none" ) {
732  propDoc[pname] = (*it)->documentation();
733  }
734 
735  }
736  m_pyBuf << " }\n";
737  m_pyBuf << " _propertyDocDct = { \n";
738  for ( PropertyDoc_t::const_iterator iProp = propDoc.begin();
739  iProp != propDoc.end();
740  ++iProp ) {
741  m_pyBuf << std::setw(5)
742  << "'" << iProp->first << "' : "
743  << "\"\"\" " << iProp->second << " \"\"\",\n";
744  }
745  m_pyBuf << " }\n";
746 
747  m_pyBuf
748  << " def __init__(self, name = " << m_configurable["DefaultName"]
749  << ", **kwargs):\n"
750  << " super(" << cname << ", self).__init__(name)\n"
751  << " for n,v in kwargs.items():\n"
752  << " setattr(self, n, v)\n"
753  << " def getDlls( self ):\n"
754  << " return '" << libName << "'\n"
755  << " def getType( self ):\n"
756  << " return '" << componentName << "'\n"
757  << " pass # class " << cname << "\n"
758  << flush;
759 
760  // name of the auto-generated module
761  const string pyName = ( fs::path(m_outputDirName) /
762  fs::path(libName+"Conf.py") ).string();
763  const string modName = fs::basename( fs::path( pyName ).leaf() );
764 
765  // now the db part
766  m_dbBuf
767  << m_pkgName << "." << modName << " "
768  << libName << " " << cname
769  << "\n"
770  << flush;
771 
772  return 0;
773 }
void pythonizeValue(const Property *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:787
void pythonizeName(string &name)
Translates a valid C++ typename into a valid python one.
Definition: genconf.cpp:775
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:101
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:111
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:98
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:94
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

not enough information... skip it

no Properties, so don't bother create Configurables...

write-out files for this library

Definition at line 431 of file genconf.cpp.

433 {
434  //--- Disable checking StatusCode -------------------------------------------
436 
437  const Strings_t::const_iterator endLib = libs.end();
438 
439  const std::string gaudiSvc = "GaudiCoreSvc";
440  const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != 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 --------------------------------------
450  Registry& registry = Registry::instance();
451 
452  std::set<std::string> bkgNames = registry.loadedFactories();
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 ( Strings_t::const_iterator iLib=libs.begin(); iLib != endLib; ++iLib ) {
462 
463  std::cout << ":::: processing library: " << *iLib << "..." << std::endl;
464 
465  // reset state
466  m_importGaudiHandles = false;
467  m_pyBuf.str("");
468  m_dbBuf.str("");
469 
470  //--- Load component library ----------------------------------------------
471  System::ImageHandle handle;
472  unsigned long err = System::loadDynamicLib( *iLib, &handle );
473  if ( err != 1 ) {
474  cout << "ERROR: " << System::getLastErrorString() << endl;
475  allGood = false;
476  continue;
477  }
478 
479  std::set<std::string> factories = registry.loadedFactories();
480 
481  for ( std::set<std::string>::iterator it = factories.begin();
482  it != factories.end(); ++it ) {
483  const string ident = *it;
484  if ( bkgNames.find(ident) != bkgNames.end() ) {
486  cout << "\t==> skipping [" << ident << "]..." << endl;
487  }
488  continue;
489  }
490 
491  const Registry::FactoryInfo info = registry.getInfo(*it);
492  const string rtype = info.rtype;
493 
494  // do not generate configurables for the Reflex-compatible aliases
495  if (info.properties.find("ReflexName") != info.properties.end())
496  continue;
497 
498  // Atlas contributed code (patch #1247)
499  // Skip the generation of configurables if the component does not come
500  // from the same library we are processing (i.e. we found a symbol that
501  // is coming from a library loaded by the linker).
502  if ( !DsoUtils::inDso( info.ptr, DsoUtils::libNativeName(*iLib) ) ) {
503  cout << "WARNING: library [" << *iLib << "] exposes factory ["
504  << ident << "] which is declared in ["
505  << DsoUtils::dsoName(info.ptr) << "] !!" << endl;
506  continue;
507  }
508 
509  string type;
510  bool known = true;
511  if ( ident == "ApplicationMgr" ) type = "ApplicationMgr";
512  else if ( rtype == typeid(IInterface*).name() ) type = "IInterface";
513  else if ( rtype == typeid(IAlgorithm*).name() ) type = "Algorithm";
514  else if ( rtype == typeid(IService* ).name() ) type = "Service";
515  else if ( rtype == typeid(IAlgTool* ).name() ) type = "AlgTool";
516  else if ( rtype == typeid(IAuditor* ).name() ) type = "Auditor";
517  else if ( rtype == typeid(IConverter*).name() ) type = "Converter";
518  else if ( rtype == typeid(DataObject*).name() ) type = "DataObject";
519  else type = "Unknown", known = false;
520  string name = ident;
521  // handle possible problems with templated components
522  boost::trim(name);
523 
524  if ( type == "IInterface" ) {
527  continue;
528  }
529 
530  if ( type == "Converter" || type == "DataObject" ) {
532  continue;
533  }
534 
535  if ( !known ) {
536  cout << "WARNING: Unknown (return) type [" << System::typeinfoName(rtype.c_str()) << "] !!"
537  << " Component [" << ident << "] is skipped !"
538  << endl;
539  continue;
540  }
541 
542  cout << " - component: " << info.className << " (";
543  if (info.className != name)
544  cout << name << ": ";
545  cout << type << ")" << endl;
546 
547  string cname = "DefaultName";
548  SmartIF<IProperty> prop;
549  try {
550  if ( type == "Algorithm" ) {
551  prop = SmartIF<IAlgorithm>(Algorithm::Factory::create(ident, cname, svcLoc));
552  }
553  else if ( type == "Service") {
554  prop = SmartIF<IService>(Service::Factory::create(ident, cname, svcLoc));
555  }
556  else if ( type == "AlgTool") {
557  prop = SmartIF<IAlgTool>(AlgTool::Factory::create(ident, cname, type, dummySvc));
558  // FIXME: AlgTool base class increase artificially by 1 the refcount.
559  prop->release();
560  }
561  else if ( type == "Auditor") {
562  prop = SmartIF<IAuditor>(Auditor::Factory::create(ident, cname, svcLoc));
563  }
564  else if ( type == "ApplicationMgr") {
565  prop = SmartIF<ISvcLocator>(svcLoc);
566  }
567  else {
568  continue; // unknown
569  }
570  }
571  catch ( exception& e ) {
572  cout << "ERROR: Error instantiating " << name
573  << " from " << *iLib << endl;
574  cout << "ERROR: Got exception: " << e.what() << endl;
575  allGood = false;
576  continue;
577  }
578  catch ( ... ) {
579  cout << "ERROR: Error instantiating " << name
580  << " from " << *iLib << endl;
581  allGood = false;
582  continue;
583  }
584  if( prop ) {
585  if (genComponent( *iLib, name, type, prop->getProperties() )) {
586  allGood = false;
587  }
588  prop.reset();
589  } else {
590  cout << "ERROR: could not cast IInterface* object to an IProperty* !\n"
591  << "ERROR: return type from PluginSvc is [" << rtype << "]...\n"
592  << "ERROR: NO Configurable will be generated for ["
593  << name << "] !"
594  << endl;
595  allGood = false;
596  }
597  } //> end loop over factories
598 
602  const std::string pyName = ( fs::path(m_outputDirName) /
603  fs::path(*iLib+"Conf.py") ).string();
604  const std::string dbName = ( fs::path(m_outputDirName) /
605  fs::path(*iLib+".confdb") ).string();
606 
607  std::fstream py( pyName.c_str(),
608  std::ios_base::out|std::ios_base::trunc );
609  std::fstream db( dbName.c_str(),
610  std::ios_base::out|std::ios_base::trunc );
611 
612  genHeader ( py, db );
613  if (!userModule.empty())
614  py << "from " << userModule << " import *" <<endl;
615  genBody ( py, db );
616  genTrailer( py, db );
617 
618  } //> end loop over libraries
619 
620  dummySvc->release();
621  dummySvc = 0;
622 
623  return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
624 }
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:26
The data converters are responsible to translate data from one representation into another...
Definition: IConverter.h:57
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
int genComponent(const std::string &libName, const std::string &componentName, const std::string &componentType, const vector< Property * > &properties)
Definition: genconf.cpp:695
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:30
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:101
GAUDIPS_API Logger & logger()
Return the current logger instance.
string type
Definition: gaudirun.py:126
GAUDI_API ISvcLocator * svcLocator()
General service interface definition.
Definition: IService.h:19
Definition of the basic interface.
Definition: IInterface.h:160
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:662
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:111
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
GAUDI_API std::string path(const AIDA::IBaseHistogram *aida)
get the path in THS for AIDA histogram
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:98
virtual unsigned long release()=0
Release Interface instance.
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:105
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
In-memory database of the loaded factories.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
static GAUDI_API void disableChecking()
Definition: StatusCode.cpp:23
void genTrailer(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:684
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:253
Base class for all services.
Definition: Service.h:33
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:31
int createAppMgr()
Definition: genconf.cpp:858
The IAuditor is the interface implmented by the AlgAuditor base class.
Definition: IAuditor.h:18
void reset(TYPE *ptr=0)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:74
std::string libNativeName(const std::string &libName)
Definition: DsoUtils.h:18
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:181
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
Definition: System.cpp:123
void configGenerator::genHeader ( std::ostream &  pyOut,
std::ostream &  dbOut 
)
private

Definition at line 662 of file genconf.cpp.

665 {
666  // python file part
667  std::string now = Gaudi::Time::current().format(true);
668  py << "#" << now //<< "\n"
669  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n";
670  if ( m_importGaudiHandles ) {
671  py << "from GaudiKernel.GaudiHandles import *\n";
672  }
673 
674  genImport(py,boost::format("from %1%.Configurable import *"));
675 
676  // db file part
677  db << "## -*- ascii -*- \n"
678  << "# db file automatically generated by genconf on: "
679  << now
680  << "\n"
681  << flush;
682 }
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
static Time current(void)
Returns the current time.
Definition: Time.cpp:114
void genImport(std::ostream &s, const boost::format &frmt, std::string indent)
Definition: genconf.cpp:626
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:105
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:280
void configGenerator::genImport ( std::ostream &  s,
const boost::format frmt,
std::string  indent = "" 
)
private

Definition at line 626 of file genconf.cpp.

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

Definition at line 684 of file genconf.cpp.

687 {
688  // db file part
689  db << "## " << m_pkgName << "\n"
690  << std::flush;
691 }
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:94
void configGenerator::pythonizeName ( string &  name)
private

Translates a valid C++ typename into a valid python one.

Definition at line 775 of file genconf.cpp.

777 {
778  static string in("<>&*,: ().");
779  static string out("__rp__s___");
780  boost::algorithm::replace_all(name, ", ", ",");
781  for ( string::iterator i = name.begin(); i != name.end(); ++i ) {
782  if ( in.find(*i) != string::npos ) *i = out[in.find(*i)];
783  }
784 }
list i
Definition: ana.py:128
void configGenerator::pythonizeValue ( const Property prop,
string &  pvalue,
string &  ptype 
)
private

handle the "marshalling" of Properties

Definition at line 787 of file genconf.cpp.

790 {
791  const std::string cvalue = p->toString();
792  const type_info& ti = *p->type_info();
793  if ( ti == typeid(bool) ) {
794  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" )
795  ? "False"
796  : "True";
797  ptype = "bool";
798  }
799  else if ( ti == typeid(char) || ti == typeid(signed char)
800  || ti == typeid(unsigned char) ||
801  ti == typeid(short) || ti == typeid(unsigned short) ||
802  ti == typeid(int) || ti == typeid(unsigned int) ||
803  ti == typeid(long) || ti == typeid(unsigned long) ) {
804  pvalue = cvalue;
805  ptype = "int";
806  }
807  else if ( ti == typeid(long long) || ti == typeid(unsigned long long) ) {
808  pvalue = cvalue + "L";
809  ptype = "long";
810  }
811  else if ( ti == typeid(float) || ti == typeid(double) ) {
812  // forces python to handle this as a float: put a dot in there...
813  pvalue = boost::to_lower_copy(cvalue);
814  if ( pvalue == "nan" ) {
815  pvalue = "float('nan')";
816  std::cout << "WARNING: default value for ["
817  << p->name() << "] is NaN !!"
818  << std::endl;
819  } else if ( std::string::npos == pvalue.find(".") &&
820  std::string::npos == pvalue.find("e") ) {
821  pvalue = cvalue + ".0";
822  }
823  ptype = "float";
824  }
825  else if ( ti == typeid(string) ) {
826 
827  pvalue = "'"+cvalue+"'";
828  ptype = "str";
829  }
830  else if ( ti == typeid(GaudiHandleBase) ) {
831  m_importGaudiHandles = true;
832  const GaudiHandleProperty& hdl
833  = dynamic_cast<const GaudiHandleProperty&>(*p);
834  const GaudiHandleBase& base = hdl.value();
835 
836  pvalue = base.pythonRepr();
837  ptype = "GaudiHandle";
838  }
839  else if ( ti == typeid(GaudiHandleArrayBase) ) {
840  m_importGaudiHandles = true;
841  const GaudiHandleArrayProperty& hdl
842  = dynamic_cast<const GaudiHandleArrayProperty&>(*p);
843  const GaudiHandleArrayBase& base = hdl.value();
844 
845  pvalue = base.pythonRepr();
846  ptype = "GaudiHandleArray";
847  }
848  else {
849  std::ostringstream v_str;
850  v_str.setf(std::ios::fixed); // to correctly display floats
851  p->toStream(v_str);
852  pvalue = v_str.str();
853  ptype = "list";
854  }
855 }
const GaudiHandleArrayBase & value() const
Definition: Property.h:917
virtual const std::string pythonRepr() const
Python representation of handle, i.e.
Definition: GaudiHandle.cpp:56
Base class of array's of various gaudihandles.
Definition: GaudiHandle.h:293
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:105
const GaudiHandleBase & value() const
Definition: Property.h:857
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:80
virtual const std::string pythonRepr() const
Python representation of array of handles, i.e.
Definition: GaudiHandle.cpp:99
void configGenerator::setConfigurableAlgorithm ( const std::string &  cfgAlgorithm)
inline

customize the configurable base class for Algorithm component

Definition at line 150 of file genconf.cpp.

151  {
152  m_configurable[ "Algorithm" ] = cfgAlgorithm;
153  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
void configGenerator::setConfigurableAlgTool ( const std::string &  cfgAlgTool)
inline

customize the configurable base class for AlgTool component

Definition at line 156 of file genconf.cpp.

157  {
158  m_configurable[ "AlgTool" ] = cfgAlgTool;
159  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
void configGenerator::setConfigurableAuditor ( const std::string &  cfgAuditor)
inline

customize the configurable base class for AlgTool component

Definition at line 162 of file genconf.cpp.

163  {
164  m_configurable[ "Auditor" ] = cfgAuditor;
165  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
void configGenerator::setConfigurableDefaultName ( const std::string &  defaultName)
inline

customize the default name for configurable instances

Definition at line 144 of file genconf.cpp.

145  {
146  m_configurable[ "DefaultName" ] = defaultName;
147  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
void configGenerator::setConfigurableModule ( const std::string &  moduleName)
inline

customize the Module name where configurable base classes are defined

Definition at line 138 of file genconf.cpp.

139  {
140  m_configurable[ "Module" ] = moduleName;
141  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118
GAUDI_API const std::string & moduleName()
Get the name of the (executable/DLL) file without file-type.
Definition: ModuleInfo.cpp:55
void configGenerator::setConfigurableService ( const std::string &  cfgService)
inline

customize the configurable base class for Service component

Definition at line 168 of file genconf.cpp.

169  {
170  m_configurable[ "Service" ] = cfgService;
171  m_configurable[ "ApplicationMgr" ] = cfgService;
172  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:118

Member Data Documentation

GaudiUtils::HashMap<std::string, 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 118 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 111 of file genconf.cpp.

bool configGenerator::m_importGaudiHandles
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 105 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 98 of file genconf.cpp.

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 94 of file genconf.cpp.

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 101 of file genconf.cpp.


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