Commit 1e84323d authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Sort components by name in HistorySvc dump

parent 4eba1583
...@@ -118,20 +118,20 @@ Algs: 1 ...@@ -118,20 +118,20 @@ Algs: 1
AlgExecStateSvc VERBOSE reset(0) AlgExecStateSvc VERBOSE reset(0)
EventLoopMgr DEBUG ---> Loop Finished - WSS 46.0273 | total time (skipping 1st evt) 31410 ns EventLoopMgr DEBUG ---> Loop Finished - WSS 46.0273 | total time (skipping 1st evt) 31410 ns
ServiceManager DEBUG Stopping service HistorySvc ServiceManager DEBUG Stopping service HistorySvc
HistorySvc VERBOSE MessageSvc is Service HistorySvc VERBOSE AlgContextSvc is Service
HistorySvc VERBOSE JobOptionsSvc is Service HistorySvc VERBOSE AlgExecStateSvc is Service
HistorySvc VERBOSE StatusCodeSvc is Service
HistorySvc VERBOSE EventLoopMgr is Service
HistorySvc VERBOSE AppMgrRunable is Service HistorySvc VERBOSE AppMgrRunable is Service
HistorySvc VERBOSE HistorySvc is Service
HistorySvc VERBOSE IncidentSvc is Service
HistorySvc VERBOSE EventDataSvc is Service HistorySvc VERBOSE EventDataSvc is Service
HistorySvc VERBOSE EventLoopMgr is Service
HistorySvc VERBOSE EventPersistencySvc is Service HistorySvc VERBOSE EventPersistencySvc is Service
HistorySvc VERBOSE TimelineSvc is Service
HistorySvc VERBOSE AlgExecStateSvc is Service
HistorySvc VERBOSE HistogramDataSvc is Service HistorySvc VERBOSE HistogramDataSvc is Service
HistorySvc VERBOSE HistogramPersistencySvc is Service HistorySvc VERBOSE HistogramPersistencySvc is Service
HistorySvc VERBOSE AlgContextSvc is Service HistorySvc VERBOSE HistorySvc is Service
HistorySvc VERBOSE IncidentSvc is Service
HistorySvc VERBOSE JobOptionsSvc is Service
HistorySvc VERBOSE MessageSvc is Service
HistorySvc VERBOSE StatusCodeSvc is Service
HistorySvc VERBOSE TimelineSvc is Service
HistorySvc VERBOSE ToolSvc is Service HistorySvc VERBOSE ToolSvc is Service
HistorySvc VERBOSE History is Alg HistorySvc VERBOSE History is Alg
ServiceManager DEBUG Stopping service EventLoopMgr ServiceManager DEBUG Stopping service EventLoopMgr
......
...@@ -770,10 +770,14 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const ...@@ -770,10 +770,14 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const
ofs << "SERVICES" << std::endl; ofs << "SERVICES" << std::endl;
} }
for ( auto& item : m_svcmap ) { // helper to dump monitored components sorted by name
const IService* svc = item.first; auto sortedDump = [&ofs, this]( const auto& map ) {
dumpState( svc, ofs ); std::map<std::string, const INamedInterface*> sorted;
} for ( const auto& item : map ) sorted[item.first->name()] = item.first;
for ( const auto& item : sorted ) dumpState( item.second, ofs );
};
sortedDump( m_svcmap );
if ( m_outputFileTypeXML ) { if ( m_outputFileTypeXML ) {
ofs << "</SERVICES>" << endl << "<ALGORITHMS> " << endl; ofs << "</SERVICES>" << endl << "<ALGORITHMS> " << endl;
...@@ -781,10 +785,7 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const ...@@ -781,10 +785,7 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const
ofs << "ALGORITHMS" << std::endl; ofs << "ALGORITHMS" << std::endl;
} }
for ( auto& item : m_algmap ) { sortedDump( m_algmap );
const Algorithm* alg = item.first;
dumpState( alg, ofs );
}
if ( m_outputFileTypeXML ) { if ( m_outputFileTypeXML ) {
ofs << "</ALGORITHMS>" << endl << "<ALGTOOLS> " << endl; ofs << "</ALGORITHMS>" << endl << "<ALGTOOLS> " << endl;
...@@ -792,10 +793,7 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const ...@@ -792,10 +793,7 @@ void HistorySvc::dumpState( std::ofstream& ofs ) const
ofs << "ALGTOOLS" << std::endl; ofs << "ALGTOOLS" << std::endl;
} }
for ( auto& item : m_algtoolmap ) { sortedDump( m_algtoolmap );
const AlgTool* algtool = item.first;
dumpState( algtool, ofs );
}
if ( m_outputFileTypeXML ) { if ( m_outputFileTypeXML ) {
ofs << "</ALGTOOLS>" << endl << "</SETUP>" << endl; ofs << "</ALGTOOLS>" << endl << "</SETUP>" << endl;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment