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

744 {
745  string cname = componentName;
746  pythonizeName(cname);
747 
748  typedef GaudiUtils::HashMap<std::string, std::string> PropertyDoc_t;
749  PropertyDoc_t propDoc;
750 
751  m_pyBuf << "\n";
752  m_pyBuf << "class " << cname
753  << "( " << m_configurable[componentType] << " ) :"
754  << "\n";
755  m_pyBuf << " __slots__ = { \n";
756  for ( vector<Property*>::const_iterator it = properties.begin() ;
757  it != properties.end(); ++it ) {
758 
759  const string pname = (*it)->name();
760  // Validate property name (it must be a valid Python identifier)
761  if (!boost::regex_match(pname, pythonIdentifier)) {
762  std::cout << "ERROR: invalid property name \"" << pname
763  << "\" in component " << cname
764  << " (invalid Python identifier)" << std::endl;
765  // try to make the buffer at least more or less valid python code.
766  m_pyBuf << " #ERROR-invalid identifier '" << pname << "'\n"
767  << " }\n";
768  return 1;
769  }
770 
771  string pvalue, ptype;
772  pythonizeValue( (*it), pvalue, ptype );
773  m_pyBuf << " '" << pname << "' : " << pvalue <<", # " << ptype << "\n";
774 
775  if ( (*it)->documentation() != "none" ) {
776  propDoc[pname] = (*it)->documentation();
777  }
778 
779  }
780  m_pyBuf << " }\n";
781  m_pyBuf << " _propertyDocDct = { \n";
782  for ( PropertyDoc_t::const_iterator iProp = propDoc.begin();
783  iProp != propDoc.end();
784  ++iProp ) {
785  m_pyBuf << std::setw(5)
786  << "'" << iProp->first << "' : "
787  << "\"\"\" " << iProp->second << " \"\"\",\n";
788  }
789  m_pyBuf << " }\n";
790 
791  m_pyBuf
792  << " def __init__(self, name = " << m_configurable["DefaultName"]
793  << ", **kwargs):\n"
794  << " super(" << cname << ", self).__init__(name)\n"
795  << " for n,v in kwargs.items():\n"
796  << " setattr(self, n, v)\n"
797  << " def getDlls( self ):\n"
798  << " return '" << libName << "'\n"
799  << " def getType( self ):\n"
800  << " return '" << componentName << "'\n"
801  << " pass # class " << cname << "\n"
802  << flush;
803 
804  // name of the auto-generated module
805  const string pyName = ( fs::path(m_outputDirName) /
806  fs::path(libName+"Conf.py") ).string();
807  const string modName = fs::basename( fs::path( pyName ).leaf() );
808 
809  // now the db part
810  m_dbBuf
811  << m_pkgName << "." << modName << " "
812  << libName << " " << cname
813  << "\n"
814  << flush;
815 
816  return 0;
817 }
void pythonizeValue(const Property *prop, string &pvalue, string &ptype)
handle the "marshalling" of Properties
Definition: genconf.cpp:831
void pythonizeName(string &name)
Translates a valid C++ typename into a valid python one.
Definition: genconf.cpp:819
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, std::ios_base::out|std::ios_base::trunc );
654  std::fstream db( dbName, std::ios_base::out|std::ios_base::trunc );
655 
656  genHeader ( py, db );
657  if (!userModule.empty())
658  py << "from " << userModule << " import *" <<endl;
659  genBody ( py, db );
660  genTrailer( py, db );
661 
662  } //> end loop over libraries
663 
664  dummySvc->release();
665  dummySvc = 0;
666 
667  return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
668 }
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
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:739
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:18
Definition of the basic interface.
Definition: IInterface.h:234
void genHeader(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:706
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:19
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:22
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 reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
Definition: SmartIF.h:88
void genTrailer(std::ostream &pyOut, std::ostream &dbOut)
Definition: genconf.cpp:728
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:30
int createAppMgr()
Definition: genconf.cpp:903
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 706 of file genconf.cpp.

709 {
710  // python file part
711  std::string now = Gaudi::Time::current().format(true);
712  py << "#" << now //<< "\n"
713  << "\"\"\"Automatically generated. DO NOT EDIT please\"\"\"\n";
714  if ( m_importGaudiHandles ) {
715  py << "from GaudiKernel.GaudiHandles import *\n";
716  }
717 
718  genImport(py,boost::format("from %1%.Configurable import *"));
719 
720  // db file part
721  db << "## -*- ascii -*- \n"
722  << "# db file automatically generated by genconf on: "
723  << now
724  << "\n"
725  << flush;
726 }
static Time current(void)
Returns the current time.
Definition: Time.cpp:113
void genImport(std::ostream &s, const boost::format &frmt, std::string indent)
Definition: genconf.cpp:670
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:120
std::string format(bool local, std::string spec="%c") const
Format the time using strftime.
Definition: Time.cpp:279
void configGenerator::genImport ( std::ostream &  s,
const boost::format frmt,
std::string  indent = "" 
)
private

Definition at line 670 of file genconf.cpp.

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

Definition at line 728 of file genconf.cpp.

731 {
732  // db file part
733  db << "## " << m_pkgName << "\n"
734  << std::flush;
735 }
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 819 of file genconf.cpp.

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

834 {
835  const std::string cvalue = p->toString();
836  const type_info& ti = *p->type_info();
837  if ( ti == typeid(bool) ) {
838  pvalue = ( cvalue == "0" || cvalue == "False" || cvalue == "false" )
839  ? "False"
840  : "True";
841  ptype = "bool";
842  }
843  else if ( ti == typeid(char) || ti == typeid(signed char)
844  || ti == typeid(unsigned char) ||
845  ti == typeid(short) || ti == typeid(unsigned short) ||
846  ti == typeid(int) || ti == typeid(unsigned int) ||
847  ti == typeid(long) || ti == typeid(unsigned long) ) {
848  pvalue = cvalue;
849  ptype = "int";
850  }
851  else if ( ti == typeid(long long) || ti == typeid(unsigned long long) ) {
852  pvalue = cvalue + "L";
853  ptype = "long";
854  }
855  else if ( ti == typeid(float) || ti == typeid(double) ) {
856  // forces python to handle this as a float: put a dot in there...
857  pvalue = boost::to_lower_copy(cvalue);
858  if ( pvalue == "nan" ) {
859  pvalue = "float('nan')";
860  std::cout << "WARNING: default value for ["
861  << p->name() << "] is NaN !!"
862  << std::endl;
863  } else if ( std::string::npos == pvalue.find(".") &&
864  std::string::npos == pvalue.find("e") ) {
865  pvalue = cvalue + ".0";
866  }
867  ptype = "float";
868  }
869  else if ( ti == typeid(string) ) {
870 
871  pvalue = "'"+cvalue+"'";
872  ptype = "str";
873  }
874  else if ( ti == typeid(GaudiHandleBase) ) {
875  m_importGaudiHandles = true;
876  const GaudiHandleProperty& hdl
877  = dynamic_cast<const GaudiHandleProperty&>(*p);
878  const GaudiHandleBase& base = hdl.value();
879 
880  pvalue = base.pythonRepr();
881  ptype = "GaudiHandle";
882  }
883  else if ( ti == typeid(GaudiHandleArrayBase) ) {
884  m_importGaudiHandles = true;
885  const GaudiHandleArrayProperty& hdl
886  = dynamic_cast<const GaudiHandleArrayProperty&>(*p);
887  const GaudiHandleArrayBase& base = hdl.value();
888 
889  pvalue = base.pythonRepr();
890  ptype = "GaudiHandleArray";
891  }
892  else {
893  std::ostringstream v_str;
894  v_str.setf(std::ios::fixed); // to correctly display floats
895  p->toStream(v_str);
896  pvalue = v_str.str();
897  ptype = "list";
898  }
899 }
const GaudiHandleArrayBase & value() const
Definition: Property.h:892
virtual 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:304
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:832
Base class to handles to be used in lieu of naked pointers to various Gaudi components.
Definition: GaudiHandle.h:81
std::string pythonRepr() const override
Python representation of array of handles, i.e.
Definition: GaudiHandle.cpp:94
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:54
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: