not enough information... skip it
{
const Strings_t::const_iterator endLib = libs.end();
const std::string gaudiSvc = "GaudiCoreSvc";
const bool isGaudiSvc = ( std::find( libs.begin(), endLib, gaudiSvc ) != endLib );
cout << "ERROR: ApplicationMgr can not be created. Check environment" << endl;
return EXIT_FAILURE;
}
using Gaudi::PluginService::Details::Registry;
Registry&
registry = Registry::instance();
std::set<std::string> bkgNames = registry.loadedFactories();
bool allGood = true;
for ( Strings_t::const_iterator iLib=libs.begin(); iLib != endLib; ++iLib ) {
std::cout << ":::: processing library: " << *iLib << "..." << std::endl;
if ( err != 1 ) {
allGood = false;
continue;
}
std::set<std::string>
factories = registry.loadedFactories();
for ( std::set<std::string>::iterator it = factories.begin();
it != factories.end(); ++it ) {
const string ident = *it;
if ( bkgNames.find(ident) != bkgNames.end() ) {
cout << "\t==> skipping [" << ident << "]..." << endl;
}
continue;
}
const Registry::FactoryInfo info = registry.getInfo(*it);
const string rtype = info.rtype;
if (info.properties.find("ReflexName") != info.properties.end())
continue;
cout << "WARNING: library [" << *iLib << "] exposes factory ["
<< ident << "] which is declared in ["
<< DsoUtils::dsoName(info.ptr) << "] !!" << endl;
continue;
}
bool known = true;
if ( ident == "ApplicationMgr" ) type = "ApplicationMgr";
else if ( rtype ==
typeid(
IInterface*).name() ) type =
"IInterface";
else if ( rtype ==
typeid(
IAlgorithm*).name() ) type =
"Algorithm";
else if ( rtype ==
typeid(
IService* ).name() ) type =
"Service";
else if ( rtype ==
typeid(
IAlgTool* ).name() ) type =
"AlgTool";
else if ( rtype ==
typeid(
IAuditor* ).name() ) type =
"Auditor";
else if ( rtype ==
typeid(
IConverter*).name() ) type =
"Converter";
else if ( rtype ==
typeid(
DataObject*).name() ) type =
"DataObject";
else type = "Unknown", known = false;
string name = ident;
boost::trim(name);
if ( type == "IInterface" ) {
continue;
}
if ( type == "Converter" || type == "DataObject" ) {
continue;
}
if ( !known ) {
<< " Component [" << ident << "] is skipped !"
<< endl;
continue;
}
cout << " - component: " << info.className << " (";
if (info.className != name)
cout << name << ": ";
cout << type << ")" << endl;
string cname = "DefaultName";
try {
if ( type == "Algorithm" ) {
}
else if ( type == "Service") {
}
else if ( type == "AlgTool") {
prop->release();
}
else if ( type == "Auditor") {
}
else if ( type == "ApplicationMgr") {
}
else {
continue;
}
}
catch ( exception& e ) {
cout << "ERROR: Error instantiating " << name
<< " from " << *iLib << endl;
cout << "ERROR: Got exception: " << e.what() << endl;
allGood = false;
continue;
}
catch ( ... ) {
cout << "ERROR: Error instantiating " << name
<< " from " << *iLib << endl;
allGood = false;
continue;
}
if( prop ) {
if (
genComponent( *iLib, name, type, prop->getProperties() )) {
allGood = false;
}
} else {
cout << "ERROR: could not cast IInterface* object to an IProperty* !\n"
<< "ERROR: return type from PluginSvc is [" << rtype << "]...\n"
<< "ERROR: NO Configurable will be generated for ["
<< name << "] !"
<< endl;
allGood = false;
}
}
std::fstream py( pyName.c_str(),
std::ios_base::out|std::ios_base::trunc );
std::fstream db( dbName.c_str(),
std::ios_base::out|std::ios_base::trunc );
if (!userModule.empty())
py << "from " << userModule << " import *" <<endl;
}
dummySvc = 0;
return allGood ? EXIT_SUCCESS : EXIT_FAILURE;
}