All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ICounterSvc.cpp
Go to the documentation of this file.
1 // $Id: ICounterSvc.cpp,v 1.2 2007/08/06 08:39:39 marcocle Exp $
2 // ============================================================================
3 // CVS tag $Name: $, version $Revision: 1.2 $
4 // ============================================================================
5 // Include files
6 // ============================================================================
7 // STD & STL
8 // ============================================================================
9 #include <iostream>
10 #include <vector>
11 #include <stdexcept>
12 // ============================================================================
13 // GaudiKernel
14 // ============================================================================
15 #include "GaudiKernel/StatEntity.h"
17 // ============================================================================
18 // Boots
19 // ============================================================================
20 #include "boost/format.hpp"
21 // ============================================================================
27 // ============================================================================
28 // virtual and protected destructor
29 // ============================================================================
31 // ============================================================================
32 // Callback for printout with Counter pointers
33 // ============================================================================
34 StatusCode ICounterSvc::Printout::operator()
35  ( MsgStream& log, const Counter* cnt ) const
36 { return m_svc ? m_svc->defaultPrintout(log, cnt) : StatusCode::FAILURE ; }
37 // ============================================================================
38 // Standard initializing constructor
39 // ============================================================================
41  : m_svc(svc)
42 { if ( 0 != m_svc ) { m_svc->addRef() ; } }
43 // ============================================================================
44 // destructor
45 // ============================================================================
47 { if ( 0 != m_svc ) { m_svc->release() ; m_svc = 0 ; } }
48 
49 // ============================================================================
50 // The END
51 // ============================================================================
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
ICounterSvc * m_svc
Reference to counter service.
Definition: ICounterSvc.h:129
Create / access multi purpose counters.
Definition: ICounterSvc.h:78
virtual ~ICounterSvc()
protected virtual destructor
Definition: ICounterSvc.cpp:30
~Printout()
destructor
Definition: ICounterSvc.cpp:46
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
The basic counter used for Monitoring purposes.
Definition: StatEntity.h:68
Printout()
no defauld constructor