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

Constructor & Destructor Documentation

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

Definition at line 132 of file genconf.cpp.

133  :
134  m_pkgName ( pkgName ),
135  m_outputDirName ( outputDirName ),
136  m_pyBuf ( ),
137  m_importGaudiHandles( false ),
138  m_dbBuf ( ),
139  m_configurable ( )
140  {}
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:129
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:112
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:122
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:109
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:116
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:105

Member Function Documentation

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

Definition at line 192 of file genconf.cpp.

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

Definition at line 741 of file genconf.cpp.

746 {
747  string cname = componentName;
748  pythonizeName(cname);
749 
750  typedef GaudiUtils::HashMap<std::string, std::string> PropertyDoc_t;
751  PropertyDoc_t propDoc;
752 
753  m_pyBuf << "\n";
754  m_pyBuf << "class " << cname
755  << "( " << m_configurable[componentType] << " ) :"
756  << "\n";
757  m_pyBuf << " __slots__ = { \n";
758  for ( vector<Property*>::const_iterator it = properties.begin() ;
759  it != properties.end(); ++it ) {
760 
761  const string pname = (*it)->name();
762  // Validate property name (it must be a valid Python identifier)
763  if (!boost::regex_match(pname, pythonIdentifier)) {
764  std::cout << "ERROR: invalid property name \"" << pname
765  << "\" in component " << cname
766  << " (invalid Python identifier)" << std::endl;
767  // try to make the buffer at least more or less valid python code.
768  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
769  << " }\n";
770  return 1;
771  }
772 
773  string pvalue, ptype;
774  pythonizeValue( (*it), pvalue, ptype );
775  m_pyBuf << " '" << pname << "' : " << pvalue <<", # " << ptype << "\n";
776 
777  if ( (*it)->documentation() != "none" ) {
778  propDoc[pname] = (*it)->documentation();
779  }
780 
781  }
782  m_pyBuf << " }\n";
783  m_pyBuf << " _propertyDocDct = { \n";
784  for ( PropertyDoc_t::const_iterator iProp = propDoc.begin();
785  iProp != propDoc.end();
786  ++iProp ) {
787  m_pyBuf << std::setw(5)
788  << "'" << iProp->first << "' : "
789  << "\"\"\" " << iProp->second << " \"\"\",\n";
790  }
791  m_pyBuf << " }\n";
792 
793  m_pyBuf
794  << " def __init__(self, name = " << m_configurable["DefaultName"]
795  << ", **kwargs):\n"
796  << " super(" << cname << ", self).__init__(name)\n"
797  << " for n,v in kwargs.items():\n"
798  << " setattr(self, n, v)\n"
799  << " def getDlls( self ):\n"
800  << " return '" << libName << "'\n"
801  << " def getType( self ):\n"
802  << " return '" << componentName << "'\n"
803  << " pass # class " << cname << "\n"
804  << flush;
805 
806  // name of the auto-generated module
807  const string pyName = ( fs::path(m_outputDirName) /
808  fs::path(libName+"Conf.py") ).string();
809  const string modName = fs::basename( fs::path( pyName ).leaf() );
810 
811  // now the db part
812  m_dbBuf
813  << m_pkgName << "." << modName << " "
814  << libName << " " << cname
815  << "\n"
816  << flush;
817 
818  return 0;
819 }
void pythonizeValue(const Property *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:833
void pythonizeName(string &name)
Translates a valid C++ typename into a valid python one.
Definition: genconf.cpp:821
list path
Definition: __init__.py:15
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:129
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:112
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:122
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:109
def basename(url)
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:105
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 479 of file genconf.cpp.

481 {
482  //--- Disable checking StatusCode -------------------------------------------
484 
485  const Strings_t::const_iterator endLib = libs.end();
486 
487  const std::string gaudiSvc = "GaudiCoreSvc";
488  const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != endLib );
489 
490  //--- Instantiate ApplicationMgr --------------------------------------------
491  if ( !isGaudiSvc && createAppMgr() ) {
492  cout << "ERROR: ApplicationMgr can not be created. Check environment" << endl;
493  return EXIT_FAILURE;
494  }
495 
496  //--- Iterate over component factories --------------------------------------
498  Registry& registry = Registry::instance();
499 
500  std::set<std::string> bkgNames = registry.loadedFactories();
501 
502  ISvcLocator* svcLoc = Gaudi::svcLocator();
503  IInterface* dummySvc = new Service( "DummySvc", svcLoc );
504  dummySvc->addRef();
505 
506  bool allGood = true;
507 
508  // iterate over all the requested libraries
509  for ( Strings_t::const_iterator iLib=libs.begin(); iLib != endLib; ++iLib ) {
510 
511  LOG_INFO << ":::: processing library: " << *iLib << "...";
512 
513  // reset state
514  m_importGaudiHandles = false;
515  m_pyBuf.str("");
516  m_dbBuf.str("");
517 
518  //--- Load component library ----------------------------------------------
519  System::ImageHandle handle;
520  unsigned long err = System::loadDynamicLib( *iLib, &handle );
521  if ( err != 1 ) {
523  allGood = false;
524  continue;
525  }
526 
527  std::set<std::string> factories = registry.loadedFactories();
528 
529  for ( std::set<std::string>::iterator it = factories.begin();
530  it != factories.end(); ++it ) {
531  const string ident = *it;
532  if ( bkgNames.find(ident) != bkgNames.end() ) {
534  LOG_INFO << "\t==> skipping [" << ident << "]...";
535  }
536  continue;
537  }
538 
539  const Registry::FactoryInfo info = registry.getInfo(*it);
540  const string rtype = info.rtype;
541 
542  // do not generate configurables for the Reflex-compatible aliases
543  if (info.properties.find("ReflexName") != info.properties.end())
544  continue;
545 
546  // Atlas contributed code (patch #1247)
547  // Skip the generation of configurables if the component does not come
548  // from the same library we are processing (i.e. we found a symbol that
549  // is coming from a library loaded by the linker).
550  if ( !DsoUtils::inDso( info.ptr, DsoUtils::libNativeName(*iLib) ) ) {
551  LOG_WARNING << "library [" << *iLib << "] exposes factory ["
552  << ident << "] which is declared in ["
553  << DsoUtils::dsoName(info.ptr) << "] !!";
554  continue;
555  }
556 
557  string type;
558  bool known = true;
559  if ( ident == "ApplicationMgr" ) type = "ApplicationMgr";
560  else if ( rtype == typeid(IInterface*).name() ) type = "IInterface";
561  else if ( rtype == typeid(IAlgorithm*).name() ) type = "Algorithm";
562  else if ( rtype == typeid(IService* ).name() ) type = "Service";
563  else if ( rtype == typeid(IAlgTool* ).name() ) type = "AlgTool";
564  else if ( rtype == typeid(IAuditor* ).name() ) type = "Auditor";
565  else if ( rtype == typeid(IConverter*).name() ) type = "Converter";
566  else if ( rtype == typeid(DataObject*).name() ) type = "DataObject";
567  else type = "Unknown", known = false;
568  string name = ident;
569  // handle possible problems with templated components
570  boost::trim(name);
571 
572  if ( type == "IInterface" ) {
575  continue;
576  }
577 
578  if ( type == "Converter" || type == "DataObject" ) {
580  continue;
581  }
582 
583  if ( !known ) {
584  LOG_WARNING << "Unknown (return) type [" << System::typeinfoName(rtype.c_str()) << "] !!"
585  << " Component [" << ident << "] is skipped !";
586  continue;
587  }
588 
589  LOG_INFO << " - component: " << info.className
590  << " (" << (info.className != name ? (name + ": ")
591  : std::string())
592  << type << ")";
593 
594  string cname = "DefaultName";
595  SmartIF<IProperty> prop;
596  try {
597  if ( type == "Algorithm" ) {
598  prop = SmartIF<IAlgorithm>(Algorithm::Factory::create(ident, cname, svcLoc));
599  }
600  else if ( type == "Service") {
601  prop = SmartIF<IService>(Service::Factory::create(ident, cname, svcLoc));
602  }
603  else if ( type == "AlgTool") {
604  prop = SmartIF<IAlgTool>(AlgTool::Factory::create(ident, cname, type, dummySvc));
605  // FIXME: AlgTool base class increase artificially by 1 the refcount.
606  prop->release();
607  }
608  else if ( type == "Auditor") {
609  prop = SmartIF<IAuditor>(Auditor::Factory::create(ident, cname, svcLoc));
610  }
611  else if ( type == "ApplicationMgr") {
612  prop = SmartIF<ISvcLocator>(svcLoc);
613  }
614  else {
615  continue; // unknown
616  }
617  }
618  catch ( exception& e ) {
619  LOG_ERROR << "Error instantiating " << name
620  << " from " << *iLib;
621  LOG_ERROR << "Got exception: " << e.what();
622  allGood = false;
623  continue;
624  }
625  catch ( ... ) {
626  LOG_ERROR << "Error instantiating " << name
627  << " from " << *iLib;
628  allGood = false;
629  continue;
630  }
631  if( prop ) {
632  if (genComponent( *iLib, name, type, prop->getProperties() )) {
633  allGood = false;
634  }
635  prop.reset();
636  } else {
637  LOG_ERROR << "could not cast IInterface* object to an IProperty* !";
638  LOG_ERROR << "return type from PluginSvc is [" << rtype << "]...";
639  LOG_ERROR << "NO Configurable will be generated for ["
640  << name << "] !";
641  allGood = false;
642  }
643  } //> end loop over factories
644 
648  const std::string pyName = ( fs::path(m_outputDirName) /
649  fs::path(*iLib+"Conf.py") ).string();
650  const std::string dbName = ( fs::path(m_outputDirName) /
651  fs::path(*iLib+".confdb") ).string();
652 
653  std::fstream py( pyName.c_str(),
654  std::ios_base::out|std::ios_base::trunc );
655  std::fstream db( dbName.c_str(),
656  std::ios_base::out|std::ios_base::trunc );
657 
658  genHeader ( py, db );
659  if (!userModule.empty())
660  py << "from " << userModule << " import *" <<endl;
661  genBody ( py, db );
662  genTrailer( py, db );
663 
664  } //> end loop over libraries
665 
666  dummySvc->release();
667  dummySvc = 0;
668 
669  return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
670 }
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
virtual const std::vector< Property * > & getProperties() const =0
Get list of properties.
int genComponent(const std::string &libName, const std::string &componentName, const std::string &componentType, const vector< Property * > &properties)
Definition: genconf.cpp:741
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:299
list path
Definition: __init__.py:15
#define LOG_ERROR
Definition: genconf.cpp:81
GAUDIPS_API Logger & logger()
Return the current logger instance.
void * ImageHandle
Definition of an image handle.
Definition: ModuleInfo.h:30
stringstream m_pyBuf
buffer of auto-generated configurables
Definition: genconf.cpp:112
GAUDI_API ISvcLocator * svcLocator()
#define LOG_INFO
Definition: genconf.cpp:83
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:708
stringstream m_dbBuf
buffer of generated configurables informations for the "Db" file The "Db" file is holding information...
Definition: genconf.cpp:122
The IAlgorithm is the interface implemented by the Algorithm base class.
Definition: IAlgorithm.h:20
void reset(TYPE *ptr=0)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:74
string m_outputDirName
absolute path to the directory where genconf will store auto-generated files (Configurables and Confi...
Definition: genconf.cpp:109
virtual unsigned long release()=0
Release Interface instance.
#define LOG_WARNING
Definition: genconf.cpp:82
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:116
The interface implemented by the AlgTool base class.
Definition: IAlgTool.h:23
GAUDI_API const std::string getLastErrorString()
Get last system error as string.
Definition: System.cpp:254
In-memory database of the loaded factories.
GAUDI_API unsigned long loadDynamicLib(const std::string &name, ImageHandle *handle)
Load dynamic link library.
Definition: System.cpp:124
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:730
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:905
The IAuditor is the interface implmented by the AlgAuditor base class.
Definition: IAuditor.h:18
std::string libNativeName(const std::string &libName)
Definition: DsoUtils.h:18
void genBody(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:192
string type
Definition: gaudirun.py:151
void configGenerator::genHeader ( std::ostream &  pyOut,
std::ostream &  dbOut 
)
private

Definition at line 708 of file genconf.cpp.

711 {
712  // python file part
713  std::string now = Gaudi::Time::current().format(true);
714  py << "#" << now //<< "\n"
715  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n";
716  if ( m_importGaudiHandles ) {
717  py << "from GaudiKernel.GaudiHandles import *\n";
718  }
719 
720  genImport(py,boost::format("from %1%.Configurable import *"));
721 
722  // db file part
723  db << "## -*- ascii -*- \n"
724  << "# db file automatically generated by genconf on: "
725  << now
726  << "\n"
727  << flush;
728 }
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:672
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:116
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
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 672 of file genconf.cpp.

674  {
675 
676  std::string::size_type pos = 0, nxtpos = 0;
677  std::string mod;
678 
679  while ( std::string::npos != pos ){
680  // find end of module name
681  nxtpos = m_configurable["Module"].find_first_of(',',pos);
682 
683  // Prepare import string
684  mod = m_configurable["Module"].substr(pos,nxtpos-pos);
685  std::ostringstream import;
686  import << boost::format(frmt) % mod;
687 
688  // append a normal import or a try/except enclosed one depending
689  // on availability of a fall-back module (next in the list)
690  if ( std::string::npos == nxtpos ) {
691  // last possible module
692  s << indent << import.str() << "\n" << flush;
693  pos = std::string::npos;
694  } else {
695  // we have a fallback for this
696  s << indent << "try:\n"
697  << indent << py_tab << import.str() << "\n"
698  << indent << "except ImportError:\n"
699  << flush;
700  pos = nxtpos+1;
701  }
702  // increase indentation level for next iteration
703  indent += py_tab;
704  }
705 }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:129
string s
Definition: gaudirun.py:244
GAUDI_API std::string format(const char *,...)
MsgStream format utility "a la sprintf(...)".
Definition: MsgStream.cpp:133
void configGenerator::genTrailer ( std::ostream &  pyOut,
std::ostream &  dbOut 
)
private

Definition at line 730 of file genconf.cpp.

733 {
734  // db file part
735  db << "## " << m_pkgName << "\n"
736  << std::flush;
737 }
string m_pkgName
name of the package we are processing
Definition: genconf.cpp:105
void configGenerator::pythonizeName ( string &  name)
private

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

Definition at line 821 of file genconf.cpp.

823 {
824  static string in("<>&*,: ().");
825  static string out("__rp__s___");
826  boost::algorithm::replace_all(name, ", ", ",");
827  for ( string::iterator i = name.begin(); i != name.end(); ++i ) {
828  if ( in.find(*i) != string::npos ) *i = out[in.find(*i)];
829  }
830 }
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 833 of file genconf.cpp.

836 {
837  const std::string cvalue = p->toString();
838  const type_info& ti = *p->type_info();
839  if ( ti == typeid(bool) ) {
840  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" )
841  ? "False"
842  : "True";
843  ptype = "bool";
844  }
845  else if ( ti == typeid(char) || ti == typeid(signed char)
846  || ti == typeid(unsigned char) ||
847  ti == typeid(short) || ti == typeid(unsigned short) ||
848  ti == typeid(int) || ti == typeid(unsigned int) ||
849  ti == typeid(long) || ti == typeid(unsigned long) ) {
850  pvalue = cvalue;
851  ptype = "int";
852  }
853  else if ( ti == typeid(long long) || ti == typeid(unsigned long long) ) {
854  pvalue = cvalue + "L";
855  ptype = "long";
856  }
857  else if ( ti == typeid(float) || ti == typeid(double) ) {
858  // forces python to handle this as a float: put a dot in there...
859  pvalue = boost::to_lower_copy(cvalue);
860  if ( pvalue == "nan" ) {
861  pvalue = "float('nan')";
862  std::cout << "WARNING: default value for ["
863  << p->name() << "] is NaN !!"
864  << std::endl;
865  } else if ( std::string::npos == pvalue.find(".") &&
866  std::string::npos == pvalue.find("e") ) {
867  pvalue = cvalue + ".0";
868  }
869  ptype = "float";
870  }
871  else if ( ti == typeid(string) ) {
872 
873  pvalue = "'"+cvalue+"'";
874  ptype = "str";
875  }
876  else if ( ti == typeid(GaudiHandleBase) ) {
877  m_importGaudiHandles = true;
878  const GaudiHandleProperty& hdl
879  = dynamic_cast<const GaudiHandleProperty&>(*p);
880  const GaudiHandleBase& base = hdl.value();
881 
882  pvalue = base.pythonRepr();
883  ptype = "GaudiHandle";
884  }
885  else if ( ti == typeid(GaudiHandleArrayBase) ) {
886  m_importGaudiHandles = true;
887  const GaudiHandleArrayProperty& hdl
888  = dynamic_cast<const GaudiHandleArrayProperty&>(*p);
889  const GaudiHandleArrayBase& base = hdl.value();
890 
891  pvalue = base.pythonRepr();
892  ptype = "GaudiHandleArray";
893  }
894  else {
895  std::ostringstream v_str;
896  v_str.setf(std::ios::fixed); // to correctly display floats
897  p->toStream(v_str);
898  pvalue = v_str.str();
899  ptype = "list";
900  }
901 }
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:303
bool m_importGaudiHandles
switch to decide if the generated configurables need to import GaudiHandles (ie: if one of the compon...
Definition: genconf.cpp:116
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 161 of file genconf.cpp.

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

customize the configurable base class for AlgTool component

Definition at line 167 of file genconf.cpp.

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

customize the configurable base class for AlgTool component

Definition at line 173 of file genconf.cpp.

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

customize the default name for configurable instances

Definition at line 155 of file genconf.cpp.

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

customize the Module name where configurable base classes are defined

Definition at line 149 of file genconf.cpp.

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

customize the configurable base class for Service component

Definition at line 179 of file genconf.cpp.

180  {
181  m_configurable[ "Service" ] = cfgService;
182  m_configurable[ "ApplicationMgr" ] = cfgService;
183  }
GaudiUtils::HashMap< std::string, std::string > m_configurable
Configurable customization.
Definition: genconf.cpp:129

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 129 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 122 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 116 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 109 of file genconf.cpp.

string configGenerator::m_pkgName
private

name of the package we are processing

Definition at line 105 of file genconf.cpp.

stringstream configGenerator::m_pyBuf
private

buffer of auto-generated configurables

Definition at line 112 of file genconf.cpp.


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