![]() |
|
|
Generated: 18 Jul 2008 |
00001 // $Id: ICounterSvc.cpp,v 1.2 2007/08/06 08:39:39 marcocle Exp $ 00002 // ============================================================================ 00003 // CVS tag $Name: v25r2 $, version $Revision: 1.2 $ 00004 // ============================================================================ 00005 // Include files 00006 // ============================================================================ 00007 // STD & STL 00008 // ============================================================================ 00009 #include <iostream> 00010 #include <vector> 00011 #include <stdexcept> 00012 // ============================================================================ 00013 // GaudiKernel 00014 // ============================================================================ 00015 #include "GaudiKernel/StatEntity.h" 00016 #include "GaudiKernel/ICounterSvc.h" 00017 // ============================================================================ 00018 // Boots 00019 // ============================================================================ 00020 #include "boost/format.hpp" 00021 // ============================================================================ 00027 // ============================================================================ 00028 // Retrieve the unuque interface ID 00029 // ============================================================================ 00030 const InterfaceID& ICounterSvc::interfaceID() 00031 { 00032 static const InterfaceID s_IID_ICounterSvc ( "ICounterSvc" , 3 , 0 ) ; 00033 return s_IID_ICounterSvc ; 00034 } 00035 // ============================================================================ 00036 // virtual and protected destructor 00037 // ============================================================================ 00038 ICounterSvc::~ICounterSvc(){} 00039 // ============================================================================ 00040 // Callback for printout with Counter pointers 00041 // ============================================================================ 00042 StatusCode ICounterSvc::Printout::operator() 00043 ( MsgStream& log, const Counter* cnt ) const 00044 { return m_svc ? m_svc->defaultPrintout(log, cnt) : StatusCode::FAILURE ; } 00045 // ============================================================================ 00046 // Standard initializing constructor 00047 // ============================================================================ 00048 ICounterSvc::Printout::Printout(ICounterSvc* svc) 00049 : m_svc(svc) 00050 { if ( 0 != m_svc ) { m_svc->addRef() ; } } 00051 // ============================================================================ 00052 // destructor 00053 // ============================================================================ 00054 ICounterSvc::Printout::~Printout() 00055 { if ( 0 != m_svc ) { m_svc->release() ; m_svc = 0 ; } } 00056 00057 // ============================================================================ 00058 // The END 00059 // ============================================================================