The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
ChronoStatSvc.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2025 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11// ============================================================================
12// STD & STL
13// ============================================================================
14#include <algorithm>
15#include <fstream>
16#include <functional>
17#include <iomanip>
18#include <iostream>
19#include <string>
20// ============================================================================
21// GaudiKernel
22// ============================================================================
27#include <GaudiKernel/Kernel.h>
29#include <GaudiKernel/Stat.h>
32// ============================================================================
34// ============================================================================
35#include "ChronoStatSvc.h"
36// ============================================================================
39// ============================================================================
41// ============================================================================
48// ============================================================================
49// ============================================================================
50// comparison functor
51// ============================================================================
53 template <typename S, typename T>
54 inline bool operator()( const std::pair<S*, T*>& p1, const std::pair<S*, T*>& p2 ) const {
55 auto e1 = p1.first;
56 auto e2 = p2.first;
57 return ( !e1 || !e2 ) || *e1 < *e2;
58 }
60// ============================================================================
61// Compound assignment operator.
62// ============================================================================
64
65 // Add the content of the maps, leave the rest unchanged
66
67 auto lock = std::scoped_lock{ m_mutex, css.m_mutex };
68 // Merge Chronomaps
69 for ( auto& item : css.m_chronoEntities ) {
70 const IChronoStatSvc::ChronoTag& key = item.first;
71 const ChronoEntity& val = item.second;
72 if ( m_chronoEntities.count( key ) )
73 m_chronoEntities[key] += val;
74 else
75 m_chronoEntities.insert( std::pair<IChronoStatSvc::ChronoTag, ChronoEntity>( key, val ) );
76 }
77
78 // Merge StatMaps
79 for ( auto& item : css.m_statEntities ) {
80 const IChronoStatSvc::StatTag& key = item.first;
81 const StatEntity& val = item.second;
82 if ( m_statEntities.count( key ) )
83 m_statEntities[key] += val;
84 else
85 m_statEntities.emplace( key, val );
86 }
87}
88// ============================================================================
89// Implementation of IService::initialize()
90// ============================================================================
93 if ( sc.isFailure() ) return sc;
94
95 // only add an EndEvent listener if per-event output requested
96 if ( !m_perEventFile.empty() ) {
97 m_ofd.open( m_perEventFile );
98 if ( !m_ofd.is_open() ) {
99 error() << "unable to open per-event output file \"" << m_perEventFile << "\"" << endmsg;
100 return StatusCode::FAILURE;
101 } else {
102 auto ii = serviceLocator()->service<IIncidentSvc>( "IncidentSvc" );
103 if ( !ii ) {
104 error() << "Unable to find IncidentSvc" << endmsg;
105 return StatusCode::FAILURE;
106 }
107 ii->addListener( this, IncidentType::EndEvent );
108 }
109 }
110
116 chronoStart( name() );
118 return StatusCode::SUCCESS;
119}
120// ============================================================================
121// Implementation of IService::finalize()
122// ============================================================================
124 std::string local = name() + ".finalize()";
126 MsgStream main_log( msgSvc(), local );
129 chronoStop( name() );
130
131 if ( m_ofd.is_open() ) {
132 debug() << "writing per-event timing data to '" << m_perEventFile << "'" << endmsg;
133 for ( const auto& itr : m_perEvtTime ) {
134 m_ofd << itr.first.substr( 0, itr.first.length() - 8 ) << " ";
135 for ( const auto& itt : itr.second ) { m_ofd << " " << (long int)( itt ); }
136 m_ofd << std::endl;
137 }
138
139 m_ofd.close();
140 }
141
146 MsgStream log( msgSvc(), "*****Chrono*****" );
147 const std::string stars( ( m_chronoCoutFlag ) ? 126 : 100, '*' );
148 if ( m_chronoCoutFlag ) {
149 std::cout << stars << std::endl;
150 if ( isMT() ) { std::cout << "WARNING: MT job; statistics are unreliable" << std::endl; }
151 std::cout << local << " The Final CPU consumption (Chrono) Table "
152 << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
153 std::cout << stars << std::endl;
154 } else {
155 log << m_chronoPrintLevel << stars << endmsg;
156 if ( isMT() ) { log << m_chronoPrintLevel << "WARNING: MT job; statistics are unreliable" << endmsg; }
157 log << m_chronoPrintLevel << " The Final CPU consumption ( Chrono ) Table "
158 << ( m_chronoOrderFlag ? "(ordered)" : "(not ordered)" ) << endmsg;
159 log << m_chronoPrintLevel << stars << endmsg;
160 }
162 { // prepare container for printing
163 std::vector<std::pair<ChronoEntity*, const ChronoTag*>> tmpCont;
164 tmpCont.reserve( m_chronoEntities.size() );
165 for ( auto& it : m_chronoEntities ) { tmpCont.emplace_back( &it.second, &it.first ); }
166 // sort it
167 if ( m_chronoOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
168 // print User Time statistics
169 if ( m_printUserTime ) {
170 for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
171 //
172 ChronoEntity* entity = iter->first;
173 if ( !entity ) { continue; }
174 const ChronoTag* tag = iter->second;
175 if ( !tag ) { continue; }
177 entity->stop();
179 if ( m_chronoCoutFlag )
180 {
181 std::cout << *tag << "\t" << entity->outputUserTime() << std::endl;
182 } else
183 {
184 MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputUserTime() << endmsg;
185 }
186 //
187 }
188 }
190 if ( m_printSystemTime ) {
194 std::cout << stars << std::endl;
195 } else if ( m_printUserTime && !m_chronoCoutFlag ) {
196 log << m_chronoPrintLevel << stars << endmsg;
197 }
199 for ( auto iter = tmpCont.begin(); tmpCont.end() != iter; ++iter ) {
201 ChronoEntity* entity = iter->first;
202 if ( !entity ) { continue; }
203 const ChronoTag* tag = iter->second;
204 if ( !tag ) { continue; }
206 entity->stop();
208 if ( m_chronoCoutFlag )
209 {
210 std::cout << *tag << "\t" << entity->outputSystemTime() << std::endl;
211 } else
212 {
213 MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputSystemTime() << endmsg;
214 }
215 //
216 }
217 }
219 if ( m_printEllapsedTime ) {
223 std::cout << stars << std::endl;
224 } else if ( ( m_printUserTime || m_printSystemTime ) && !m_chronoCoutFlag ) {
225 log << m_chronoPrintLevel << stars << endmsg;
226 }
228 for ( const auto& i : tmpCont ) {
230 ChronoEntity* entity = i.first;
231 if ( !entity ) { continue; }
232 const ChronoTag* tag = i.second;
233 if ( !tag ) { continue; }
235 entity->stop();
237 if ( m_chronoCoutFlag )
238 {
239 std::cout << *tag << "\t" << entity->outputElapsedTime() << std::endl;
240 } else
241 {
242 MsgStream( msgSvc(), *tag ) << m_chronoPrintLevel << entity->outputElapsedTime() << endmsg;
243 }
244 //
245 }
246 }
248 tmpCont.clear();
249 }
251 if ( m_chronoCoutFlag ) {
252 std::cout << stars << std::endl;
253 } else {
254 log << m_chronoPrintLevel << stars << endmsg;
255 }
256 }
257
259
261 if ( m_statTableFlag ) { printStats(); }
262
263 if ( !m_statsOutFileName.value().empty() ) { saveStats(); }
264
265 // clear the maps.
266 m_chronoEntities.clear();
267 m_perEvtTime.clear();
268 m_statEntities.clear();
269
270 main_log << MSG::INFO << " Service finalized successfully " << endmsg;
271
272 return Service::finalize();
273}
274// ============================================================================
275// Implementation of IChronoStatSvc::chronoStart
276// ============================================================================
277ChronoEntity* ChronoStatSvc::chronoStart( const ChronoTag& chronoTag ) {
278 ChronoEntity& entity = getEntity( chronoTag );
279 entity.start();
280 return &entity;
281}
282// ============================================================================
283// Implementation of IChronoStatSvc::chronoStop
284// ============================================================================
285const ChronoEntity* ChronoStatSvc::chronoStop( const IChronoStatSvc::ChronoTag& chronoTag ) {
286 ChronoEntity& entity = getEntity( chronoTag );
287 entity.stop();
288 return &entity;
289}
290// ============================================================================
291// Implementation of IChronoStatSvc::chronoDelta
292// ============================================================================
293IChronoStatSvc::ChronoTime ChronoStatSvc::chronoDelta( const IChronoStatSvc::ChronoTag& chronoTag,
294 IChronoStatSvc::ChronoType theType ) {
295 return getEntity( chronoTag ).delta( theType );
296}
297// ============================================================================
298// Implementation of IChronoStatSvc::chronoPrint
299// ============================================================================
300void ChronoStatSvc::chronoPrint( const IChronoStatSvc::ChronoTag& chronoTag ) {
301 MsgStream log( msgSvc(), chronoTag );
302 if ( m_printUserTime ) { log << m_chronoPrintLevel << getEntity( chronoTag ).outputUserTime() << endmsg; }
303 if ( m_printSystemTime ) { log << m_chronoPrintLevel << getEntity( chronoTag ).outputSystemTime() << endmsg; }
304}
305// ============================================================================
306// Implementation of IChronoSvc::chronoStatus
307// ============================================================================
308IChronoStatSvc::ChronoStatus ChronoStatSvc::chronoStatus( const IChronoStatSvc::ChronoTag& chronoTag ) {
309 return getEntity( chronoTag ).status();
310}
311// ============================================================================
312// Implementation of IChronoStatSvc::stat
313// ============================================================================
314void ChronoStatSvc::stat( const IChronoStatSvc::StatTag& statTag, const IChronoStatSvc::StatFlag& statFlag ) {
315 auto theIter = m_statEntities.find( statTag );
316
317 StatEntity* theStat = nullptr;
318 // if new entity, specify the number of events to be skipped
319 if ( theIter == m_statEntities.end() ) {
320 // new stat entity
321 StatEntity& theSe = m_statEntities[statTag];
322 theStat = &theSe;
323 } else {
324 // existing stat entity
325 theStat = &theIter->second;
326 }
327
328 theStat->addFlag( statFlag );
329}
330// ============================================================================
331// Implementation of IChronoStatSvc::statPrint
332// ============================================================================
333void ChronoStatSvc::statPrint( const IChronoStatSvc::StatTag& statTag ) {
334 MsgStream log( msgSvc(), statTag );
335 log << m_statPrintLevel << m_statEntities[statTag] << endmsg;
336}
337// ============================================================================
338/* extract the chrono entity for the given tag (name)
339 * @see IChronoStatSvc
340 * @param t chrono tag(name)
341 * @return pointer to chrono entity
342 */
343// ============================================================================
344const ChronoEntity* ChronoStatSvc::chrono( const IChronoStatSvc::ChronoTag& t ) const {
345 auto lock = std::scoped_lock{ m_mutex };
346 auto it = m_chronoEntities.find( t );
347 return m_chronoEntities.end() != it ? &( it->second ) : nullptr;
348}
349// ============================================================================
350/* extract the stat entity for the given tag (name)
351 * @see IChronoStatSvc
352 * @param t stat tag(name)
353 * @return pointer to stat entity
354 */
355// ============================================================================
356StatEntity* ChronoStatSvc::stat( const IChronoStatSvc::StatTag& t ) {
357 auto it = m_statEntities.find( t );
358 return m_statEntities.end() != it ? &( it->second ) : nullptr;
359}
360// ============================================================================
361// dump all the statistics into an ASCII file
362// ============================================================================
364 std::ofstream out( m_statsOutFileName.value(), std::ios_base::out | std::ios_base::trunc );
365 if ( !out.good() ) {
366 info() << "Could not open the output file for writing chrono statistics [" << m_statsOutFileName.value() << "]"
367 << endmsg;
368 return;
369 } else {
370 // format it our way
371 out << std::scientific << std::setprecision( 8 );
372 }
373
374 // ChronoEntity
375 std::vector<std::pair<const ChronoEntity*, const ChronoTag*>> chronos;
376 {
377 auto lock = std::scoped_lock{ m_mutex };
378 chronos.reserve( m_chronoEntities.size() );
379 std::transform( std::begin( m_chronoEntities ), std::end( m_chronoEntities ), std::back_inserter( chronos ),
380 []( ChronoMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
381 }
382
383 // sort it
384 std::sort( std::begin( chronos ), std::end( chronos ), CompareFirstOfPointerPair );
385
386 // print User Time statistics
387 for ( const auto& iter : chronos ) {
388 //
389 const ChronoEntity* entity = iter.first;
390 if ( !entity ) { continue; }
391
392 const ChronoTag* tag = iter.second;
393 if ( !tag ) { continue; }
394
395 // create an entry in the .INI-like table
396 out << "\n[" << *tag << "]\n";
397
398 // user
399 out << "cpu_user_total = " << entity->uTotalTime() << "\n";
400 out << "cpu_user_min = " << entity->uMinimalTime() << "\n";
401 out << "cpu_user_mean = " << entity->uMeanTime() << "\n";
402 out << "cpu_user_RMS = " << entity->uRMSTime() << "\n";
403 out << "cpu_user_max = " << entity->uMaximalTime() << "\n";
404 out << "cpu_user_nbr = " << entity->nOfMeasurements() << "\n";
405
406 // system
407 out << "\n"; // just for clarity
408 out << "cpu_system_total = " << entity->kTotalTime() << "\n";
409 out << "cpu_system_min = " << entity->kMinimalTime() << "\n";
410 out << "cpu_system_mean = " << entity->kMeanTime() << "\n";
411 out << "cpu_system_RMS = " << entity->kRMSTime() << "\n";
412 out << "cpu_system_max = " << entity->kMaximalTime() << "\n";
413 out << "cpu_system_nbr = " << entity->nOfMeasurements() << "\n";
414
415 // real
416 out << "\n"; // just for clarity
417 out << "cpu_real_total = " << entity->eTotalTime() << "\n";
418 out << "cpu_real_min = " << entity->eMinimalTime() << "\n";
419 out << "cpu_real_mean = " << entity->eMeanTime() << "\n";
420 out << "cpu_real_RMS = " << entity->eRMSTime() << "\n";
421 out << "cpu_real_max = " << entity->eMaximalTime() << "\n";
422 out << "cpu_real_nbr = " << entity->nOfMeasurements() << "\n";
423 }
424
425 out << std::endl;
426}
427// ============================================================================
428// Test if we're running in an MT job.
429// ============================================================================
431 bool isMT = false;
432 if ( m_hiveWhiteBoardSvc.retrieve().isFailure() ) {
433 error() << "Cannot retrieve HiveWhiteBoardSvc";
434 } else {
435 // In non-MT mode, `EventDataSvc' does not have an IHiveWhiteBoard interface.
437 if ( wb && wb->getNumberOfStores() > 1 ) { isMT = true; }
438 }
439 return isMT;
440}
441// ============================================================================
442// print the "Stat" part of the ChronoStatSvc
443// ============================================================================
446 if ( m_statEntities.empty() ) { return; }
447
448 MsgStream log( msgSvc(), "******Stat******" );
450 const std::string stars( ( m_statCoutFlag ) ? 126 : 100, '*' );
452 if ( m_statCoutFlag ) {
453 std::cout << stars << std::endl;
454 if ( isMT() ) { std::cout << "WARNING: MT job; statistics are unreliable" << std::endl; }
455 std::cout << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" ) << std::endl;
456 std::cout << stars << std::endl;
457 } else {
458 log << m_statPrintLevel << stars << endmsg;
459 if ( isMT() ) { log << (MSG::Level)m_chronoPrintLevel << "WARNING: MT job; statistics are unreliable" << endmsg; }
460 log << m_statPrintLevel << " The Final stat Table " << ( m_statOrderFlag ? "(ordered)" : "(not ordered)" )
461 << endmsg;
462 log << m_statPrintLevel << stars << endmsg;
463 }
464
465 {
466 // prepare container for printing
467 typedef std::pair<const StatEntity*, const StatTag*> SPair;
468 typedef std::vector<SPair> SCont;
469 SCont tmpCont;
470 std::transform( std::begin( m_statEntities ), std::end( m_statEntities ), std::back_inserter( tmpCont ),
471 []( StatMap::const_reference i ) { return std::make_pair( &i.second, &i.first ); } );
472 // sort it
473 if ( m_statOrderFlag ) std::sort( tmpCont.begin(), tmpCont.end(), CompareFirstOfPointerPair );
474 // print the table header
475 if ( m_statCoutFlag ) {
476 std::cout << m_header.value() << std::endl;
477 } else {
478 log << m_statPrintLevel << m_header.value() << endmsg;
479 }
480
481 // loop over counters and print them:
482 for ( const auto& iter : tmpCont ) {
484 const StatEntity* entity = iter.first;
485 if ( !entity ) { continue; }
486 const StatTag* tag = iter.second;
487 if ( !tag ) { continue; }
489 if ( m_statCoutFlag ) {
490 entity->print( std::cout, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
491 } else {
492 std::ostringstream ost;
493 entity->print( ost, true, *tag, m_useEffFormat, "%|-15.15s|%|17t|" );
494 log << m_statPrintLevel << ost.str() << endmsg;
495 }
496 }
497 tmpCont.clear();
498 }
500 if ( m_statCoutFlag ) {
501 std::cout << stars << std::endl;
502 } else {
503 log << m_statPrintLevel << stars << endmsg;
504 }
505}
506
507// ============================================================================
508
509void ChronoStatSvc::handle( const Incident& /* inc */ ) {
510
511 if ( !m_ofd.is_open() ) return;
512
513 auto lock = std::scoped_lock{ m_mutex };
514 for ( const auto& itr : m_chronoEntities ) {
515 if ( itr.first.find( ":Execute" ) == std::string::npos ) continue;
516
517 auto itm = m_perEvtTime.find( itr.first );
518 if ( itm == m_perEvtTime.end() ) {
519 m_perEvtTime[itr.first] = { itr.second.delta( IChronoSvc::ELAPSED ) };
520 } else {
521 itm->second.push_back( itr.second.delta( IChronoSvc::ELAPSED ) );
522 }
523 }
524}
525
526// ============================================================================
527// The END
528// ============================================================================
constexpr struct CompareFirstOfPointerPair_t CompareFirstOfPointerPair
HepRndm::Engine< TripleRand > e2
HepRndm::Engine< DualRand > e1
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
#define DECLARE_COMPONENT(type)
a small helper class for implementation of ChronoStatSvc service, It also could be used as some local...
std::string outputSystemTime() const
print the chrono ;
double kMaximalTime() const
maximal measurement for kernel time
double kTotalTime() const
total Kernel time
double eMinimalTime() const
minimal measurement for elapsed time
IChronoSvc::ChronoTime delta(IChronoSvc::ChronoType type) const
return the last delta-time of type "type"
IChronoSvc::ChronoStatus start()
start the current chrono
IChronoSvc::ChronoStatus stop()
stop the chrono
double eMeanTime() const
average Elapsed Time
IChronoSvc::ChronoStatus status() const
return the status of chrono
double uMeanTime() const
average User Time
double uMaximalTime() const
maximal measurement for user time
unsigned long nOfMeasurements() const
number of chrono measurements
double uTotalTime() const
total user time
double uRMSTime() const
r.m.s User Time
double eMaximalTime() const
maximal measurement for elapsed time
double kMinimalTime() const
minimal measurement for kernel time
std::string outputElapsedTime() const
print the chrono ;
double kMeanTime() const
average Kernel Time
double uMinimalTime() const
minimal measurement for user time
double eTotalTime() const
total Elapsed time
double eRMSTime() const
r.m.s Elapsed Time
std::string outputUserTime() const
print the chrono ;
double kRMSTime() const
r.m.s Kernel Time
The Chrono & Stat Sservice: service implements the IChronoStatSvc interface and provides the basic ch...
ChronoStatus chronoStatus(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStatus.
Gaudi::Property< bool > m_statCoutFlag
Gaudi::Property< std::string > m_statsOutFileName
Gaudi::Property< std::string > m_header
ServiceHandle< IInterface > m_hiveWhiteBoardSvc
StatusCode initialize() override
Implementation of IService::initialize()
ChronoEntity * chronoStart(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStart.
IChronoStatSvc::ChronoTime chronoDelta(const IChronoStatSvc::ChronoTag &chronoTag, IChronoStatSvc::ChronoType theType) override
Implementation of IchronoStatSvc::chronoDelta.
bool isMT() const
void saveStats()
dump the statistics into an ASCII file for offline processing
StatusCode finalize() override
Implementation of IService::finalize()
StatMap m_statEntities
stat part
const ChronoEntity * chrono(const IChronoStatSvc::ChronoTag &t) const override
extract the chrono entity for the given tag (name)
Gaudi::Property< bool > m_statTableFlag
Gaudi::Property< bool > m_chronoOrderFlag
std::mutex m_mutex
Mutex protecting m_chronoEntities.
Gaudi::Property< bool > m_chronoTableFlag
Gaudi::Property< bool > m_chronoCoutFlag
TimeMap m_perEvtTime
void stat(const IChronoStatSvc::StatTag &statTag, const IChronoStatSvc::StatFlag &statFlag) override
Implementation of IChronoStatSvc::stat add statistical information to the entity ,...
ChronoMap m_chronoEntities
chrono part
Gaudi::Property< bool > m_printUserTime
ChronoEntity & getEntity(const ChronoTag &chronoTag)
std::ofstream m_ofd
MSG::Level m_chronoPrintLevel
level of info printing
const ChronoEntity * chronoStop(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoStop.
Gaudi::Property< bool > m_useEffFormat
MSG::Level m_statPrintLevel
level of info printing
void handle(const Incident &incident) override
ChronoStatSvc(const std::string &name, ISvcLocator *svcloc)
Default constructor.
void chronoPrint(const IChronoStatSvc::ChronoTag &chronoTag) override
Implementation of IChronoStatSvc::chronoPrint.
Gaudi::Property< std::string > m_perEventFile
void statPrint(const IChronoStatSvc::ChronoTag &statTag) override
prints (using message service) info about statistical entity, tagged by its name
Gaudi::Property< bool > m_printSystemTime
void merge(const ChronoStatSvc &css)
Compound assignment operator.
Gaudi::Property< bool > m_statOrderFlag
Gaudi::Property< bool > m_printEllapsedTime
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
const SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
The interface implemented by the IncidentSvc service.
virtual void addListener(IIncidentListener *lis, const std::string &type="", long priority=0, bool rethrow=false, bool singleShot=false)=0
Add listener.
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
Base class for all Incidents (computing events).
Definition Incident.h:24
Definition of the MsgStream class used to transmit messages.
Definition MsgStream.h:29
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
Definition Service.cpp:336
StatusCode finalize() override
Definition Service.cpp:223
const std::string & name() const override
Retrieve name of the service.
Definition Service.cpp:333
StatusCode initialize() override
Definition Service.cpp:118
Small smart pointer class with automatic reference counting for IInterface.
Definition SmartIF.h:28
backward compatible StatEntity class.
Definition StatEntity.h:23
unsigned long addFlag(const double v)
Definition StatEntity.h:84
std::ostream & print(std::ostream &o, bool tableFormat, std::string_view name, bool flag=true, std::string_view fmtHead="%|-48.48s|%|27t|") const
Definition StatEntity.h:160
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
bool isFailure() const
Definition StatusCode.h:129
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100
@ INFO
Definition IMessageSvc.h:22
bool operator()(const std::pair< S *, T * > &p1, const std::pair< S *, T * > &p2) const