2 #include "GaudiKernel/Tokenizer.h"
3 #include "GaudiKernel/IRegistry.h"
4 #include "GaudiKernel/IAlgManager.h"
5 #include "GaudiKernel/ISvcLocator.h"
6 #include "GaudiKernel/IConversionSvc.h"
7 #include "GaudiKernel/IDataManagerSvc.h"
8 #include "GaudiKernel/IDataProviderSvc.h"
9 #include "GaudiKernel/IPersistencySvc.h"
10 #include "GaudiKernel/IOpaqueAddress.h"
11 #include "GaudiKernel/Incident.h"
12 #include "GaudiKernel/IIncidentSvc.h"
14 #include "GaudiKernel/MsgStream.h"
15 #include "GaudiKernel/strcasecmp.h"
16 #include "GaudiKernel/DataObject.h"
17 #include "GaudiKernel/DataStoreItem.h"
26 #define ON_DEBUG if (log.level() <= MSG::DEBUG)
149 for ( ItemNames::const_iterator
i = a->second.begin();
150 i != a->second.end(); ++
i )
236 if ( sel->begin() != sel->end() )
243 for ( IDataSelector::iterator j = sel->begin(); j != sel->end(); ++j )
256 catch (
const std::exception & excpt )
259 const std::string loc = ( (*j)->registry() ?
260 (*j)->registry()->identifier() :
"UnRegistered" );
262 <<
"std::exception during createRep for '" << loc <<
"' "
269 for ( IDataSelector::iterator j = sel->begin(); j != sel->end(); ++j )
280 catch (
const std::exception & excpt )
283 const std::string loc = ( (*j)->registry() ?
284 (*j)->registry()->identifier() :
"UnRegistered" );
286 <<
"std::exception during fillRepRefs for '" << loc <<
"'"
310 if ( level < m_currentItem->depth() ) {
311 if ( dir->
object() != 0 ) {
343 log <<
MSG::ERROR <<
"Cannot write mandatory object(s) (Not found) "
359 log <<
MSG::DEBUG <<
"Ignore request to write non-mandatory object(s) "
369 const Items& items = iAlgItems->second;
374 for ( Items::const_iterator
i = items.begin();
i != items.end(); ++
i )
382 if ( !iret.
isSuccess() ) { status = iret; }
386 log <<
MSG::ERROR <<
"Cannot write mandatory (algorithm dependent) object(s) (Not found) "
397 std::set<DataObject*> unique;
398 std::vector<DataObject*> tmp;
400 for (std::vector<DataObject*>::iterator o =
m_objects.begin(); o !=
m_objects.end(); ++o) {
401 if (!unique.count(*o)) {
420 for ( Items::iterator
i = itms.begin();
i != itms.end();
i++ ) {
423 itms.erase(itms.begin(), itms.end());
430 if ( (*i)->path() ==
path )
return (*
i);
433 if ( (*j)->path() ==
path )
return (*j);
442 size_t sep = descriptor.rfind(
"#");
443 std::string obj_path (descriptor,0,sep);
444 std::string slevel (descriptor,sep+1,descriptor.length());
445 if ( slevel ==
"*" ) {
449 level = atoi(slevel.c_str());
452 size_t idx = obj_path.find(
"/",1);
453 while(idx != std::string::npos) {
454 std::string sub_item = obj_path.substr(0,idx);
458 idx = obj_path.find(
"/",idx+1);
464 <<
" with " << item->
depth()
465 <<
" level(s)." <<
endmsg;
466 itms.push_back( item );
474 std::string dbType, svc, shr;
477 for(Tokenizer::Items::iterator
i = tok.
items().begin();
i != tok.
items().end(); ++
i) {
478 const std::string& tag = (*i).tag();
479 const std::string& val = (*i).value();
489 case 'V': svc = val;
break;
490 case 'H': shr =
"YES";
break;
496 if ( ::strncasecmp(val.c_str(),
"RECREATE",3)==0 )
498 else if ( ::strncasecmp(val.c_str(),
"READ",3)==0 )
523 if ( dbType.length() > 0 || svc.length() > 0 ) {
524 std::string typ = dbType.length()>0 ? dbType : svc;
531 status = ipers->getService(typ, cnvSvc);
533 log <<
MSG::FATAL <<
"Unable to locate IConversionSvc interface of database type " << typ <<
endmsg;
542 <<
"Unable to locate IConversionSvc interface (Unknown technology) " <<
endmsg
543 <<
"You either have to specify a technology name or a service name!" <<
endmsg
544 <<
"Please correct the job option \"" <<
name() <<
".Output\" !" <<
endmsg;
561 "OutputStream::acceptAlgsHandler",sc);
576 "OutputStream::requireAlgsHandler",sc);
591 "OutputStream::vetoAlgsHandler",sc);
627 <<
"Failed to decode Algorithm name " << theName <<
endmsg;
634 std::vector<Algorithm*>* theAlgs )
642 const std::vector<std::string> nameList = theNames.
value( );
643 for ( std::vector<std::string>::const_iterator it = nameList.begin();
644 it != nameList.end(); ++it )
651 for ( std::vector<Algorithm*>::iterator ita = theAlgs->begin();
652 ita != theAlgs->end(); ++ita )
655 if ( theAlgorithm == existAlgorithm )
663 theAlgorithm->addRef();
664 theAlgs->push_back( theAlgorithm );
680 typedef std::vector<Algorithm*>::iterator AlgIter;
690 if ( (*i)->isExecuted() && (*i)->filterPassed() ) {
703 if ( !(*i)->isExecuted() || !(*i)->filterPassed() ) {
716 if ( (*i)->isExecuted() && (*i)->filterPassed() ) {