Gaudi Framework, version v25r2

Home   Generated: Wed Jun 4 2014
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ICounterSvc.h
Go to the documentation of this file.
1 // $Id: ICounterSvc.h,v 1.4 2007/08/06 08:39:40 marcocle Exp $
2 // ============================================================================
3 // CVS tag $Name: $, version $Revision: 1.4 $
4 // ============================================================================
5 #ifndef GAUDIKERNEL_ICOUNTERSVC_H
6 #define GAUDIKERNEL_ICOUNTERSVC_H
7 // ============================================================================
8 // Include files
9 // ============================================================================
10 // STD & STL
11 // ============================================================================
12 #include <string>
13 #include <vector>
14 // ============================================================================
15 // GaudiKernel
16 // ============================================================================
17 #include "GaudiKernel/IInterface.h"
18 #include "GaudiKernel/StatEntity.h"
19 #include "GaudiKernel/Stat.h"
20 // ============================================================================
21 // Forward declarations
22 // ============================================================================
23 class MsgStream ;
24 class StatEntity ;
25 class ICounterSvc ;
26 // ============================================================================
78 class GAUDI_API ICounterSvc: virtual public IInterface
79 {
80 public:
84  typedef StatEntity Counter ;
100  typedef Stat CountObject ;
102  typedef std::vector<CountObject> Counters ;
111  class Printout
112  {
113  public:
115  Printout ( ICounterSvc* svc ) ;
117  ~Printout () ;
119  StatusCode operator()( MsgStream& log , const Counter* cnt ) const ;
120  private:
121  // no defauld constructor
122  Printout () ;
123  // no copy
124  Printout ( const Printout& ) ; //< no coy constructor
125  // no assignement
126  Printout& operator=( const Printout& ) ;
127  private:
130  } ;
139  virtual Counter* get
140  ( const std::string& group ,
141  const std::string& name ) const = 0;
160  virtual Counters get ( const std::string& group ) const = 0 ;
173  virtual StatusCode create
174  ( const std::string& group ,
175  const std::string& name ,
176  longlong initial_value ,
177  Counter*& refpCounter ) = 0;
187  virtual CountObject create
188  ( const std::string& group ,
189  const std::string& name ,
190  longlong initial_value = 0 ) = 0;
200  virtual StatusCode remove
201  ( const std::string& group ,
202  const std::string& name ) = 0;
208  virtual StatusCode remove
209  ( const std::string& group ) = 0;
217  virtual StatusCode print
218  ( const std::string& group ,
219  const std::string& name ,
220  Printout& printer ) const = 0;
227  virtual StatusCode print
228  ( const std::string& group ,
229  Printout& printer ) const = 0;
235  virtual StatusCode print
236  ( const Counter* pCounter ,
237  Printout& printer ) const = 0;
243  virtual StatusCode print
244  ( const CountObject& pCounter ,
245  Printout& printer ) const = 0;
249  virtual StatusCode print
250  ( Printout& printer ) const = 0;
252  virtual StatusCode defaultPrintout
253  ( MsgStream& log ,
254  const Counter* pCounter ) const = 0;
255  // Return codes:
256  enum { COUNTER_NOT_PRESENT = 2, // Error
257  COUNTER_EXISTS = 4, // Error ?
258  COUNTER_REMOVED = 3 // Type of success. Low bit set
259  } ;
260 protected:
262  virtual ~ICounterSvc() ;
263 };
264 // ============================================================================
266 // ============================================================================
267 std::ostream& operator<<( std::ostream& , const ICounterSvc::CountObject& ) ;
268 // ============================================================================
270 // ============================================================================
271 #endif // GAUDIKERNEL_ICOUNTERSVC_H
272 // ============================================================================

Generated at Wed Jun 4 2014 14:48:57 for Gaudi Framework, version v25r2 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004