35 #define ON_DEBUG if (UNLIKELY(outputLevel() <= MSG::DEBUG))
36 #define ON_VERBOSE if (UNLIKELY(outputLevel() <= MSG::VERBOSE))
57 return (key < rhs.
key);
66 m_isInitialized(false),
72 m_log(msgSvc(), name ),
73 m_outputFileTypeXML(false)
110 (
const_cast<Algorithm*
> (algitr->first))->release();
119 (
const_cast<AlgTool*
> (atitr->first))->release();
120 delete atitr->second;
127 (
const_cast<IService*
> (svitr->first))->release();
128 delete svitr->second;
154 static const bool CREATEIF(
true);
177 const bool rethrow =
false;
178 const bool oneShot =
true;
200 if (
service(
"JobOptionsSvc",jo).isFailure()) {
202 <<
"Could not get jobOptionsSvc - "
203 <<
"not adding properties to JobHistory" <<
endmsg;
206 bool foundAppMgr(
false);
211 for (it=clients.
begin(); it!=clients.
end(); ++it) {
212 if (*it ==
"ApplicationMgr") {
216 for (itr=props->
begin(); itr != props->
end(); ++itr) {
223 if (
service(
"ApplicationMgr",ap).isFailure()) {
228 for (itr2=props.
begin(); itr2 != props.
end(); ++itr2) {
242 pp_cast<void>(&algMgr) );
251 for (itr=algs.
begin(); itr!=algs.
end(); ++itr) {
255 <<
" does not inherit from Algorithm. Not registering it."
272 (
const_cast<IAlgTool*
>(*itra))->addRef();
284 for (itrs=svcs.
begin(); itrs!=svcs.
end(); ++itrs) {
358 <<
" already registered with HistorySvc" <<
endmsg;
362 (
const_cast<Algorithm*
>(&alg))->addRef();
435 return ( itr2->second );
490 const AlgTool* alg = itr_a->first;
511 m_log <<
"Dumping properties for Job";
532 for (itrj=props.
begin(); itrj != props.
end(); ++itrj) {
538 ofs << std::endl <<
"SERVICES" <<
std::endl;
547 ofs << std::endl <<
"ALGORITHMS" <<
std::endl;
556 ofs << std::endl <<
"ALGTOOLS" <<
std::endl;
559 const AlgTool* alg = itr_a->first;
581 <<
"HistorySvc has been initialized" <<
endmsg;
605 <<
"Could not discover current Algorithm:" <<
endl
606 <<
" object CLID: " <<
id <<
" key: \"" << key
615 <<
"Could not extract concrete Algorithm:"
617 <<
" object CLID: " <<
id <<
" key: \"" << key
649 algName = ialg->
name();
686 return mitr.
first->second;
717 if ( svc.
name() ==
"HistoryStore" ) {
762 return ( itr->second );
843 <<
"\" to an AlgTool" <<
endmsg;
849 <<
" already registered in HistorySvc" <<
endmsg;
854 (
const_cast<AlgTool*
>(alg))->addRef();
928 return ( itr2->second );
954 <<
"Will try again at next BeginEvent incident" <<
endmsg;
971 ost <<
"<PROPERTY name=\"" << prop->
name()
989 ofs <<
"<?xml version=\"1.0\" ?> " <<
std::endl;
1000 for (itrj=props.
begin(); itrj != props.
end(); ++itrj) {
1003 const Property* prp = itrj->second;
1007 if (client != client_currently_open) {
1008 if(client_currently_open!=
"start") ofs <<
" </COMPONENT>" <<
endl;
1009 ofs <<
" <COMPONENT name=\""
1010 << client <<
"\" class=\"undefined\">" <<
std::endl;
1013 ofs << client <<
" ";
1018 client_currently_open = client;
1021 ofs <<
" </COMPONENT>" << endl;
1026 ofs <<
"</GLOBAL>" <<
endl <<
"<SERVICES>" <<
endl;
1033 const IService* svc = itr_s->first;
1040 ofs <<
"</SERVICES>" <<
endl <<
"<ALGORITHMS> " <<
endl;
1055 ofs <<
"</ALGORITHMS>" <<
endl <<
"<ALGTOOLS> " <<
endl;
1062 const AlgTool* alg = itr_a->first;
1069 ofs <<
"</ALGTOOLS>" <<
endl <<
"</SETUP>" <<
endl;
1085 if ( (is=dynamic_cast<const IService*>(in)) != 0) {
1091 }
else if ( (ia = dynamic_cast<const Algorithm*>(in)) != 0 ) {
1097 }
else if ( (it = dynamic_cast<const IAlgTool*>(in)) != 0 ) {
1105 <<
"Could not dcast interface to accepted History Obj type for "
1106 << in->
name() << endreq;
1110 if (hist == 0 || vhist == 0) {
1111 m_log <<
MSG::ERROR <<
"Could not dcast recognized object to HistoryObj or IVersHistoryObj. This should never happen."
1117 hist->
dump(ofs,
true);
1119 ofs <<
">> " << vhist->
name() <<
endl << *hist <<
endl;