Gaudi Framework, version v21r8

Home   Generated: 17 Mar 2010

ChronoStatSvc.h

Go to the documentation of this file.
00001 // $Id: ChronoStatSvc.h,v 1.13 2008/05/13 12:37:19 marcocle Exp $
00002 // ============================================================================
00003 // CVS tag $Name:  $, version $Revision: 1.13 $
00004 // ============================================================================
00005 #ifndef      GAUDISVC_CHRONOSTATSVC_H__
00006 #define      GAUDISVC_CHRONOSTATSVC_H__
00007 // ============================================================================
00008 // include files
00009 // ============================================================================
00010 // STD & STL
00011 // ============================================================================
00012 #include <string>
00013 #include <map>
00014 #include <functional>
00015 // ============================================================================
00016 // GaudiKernel
00017 // ============================================================================
00018 #include "GaudiKernel/SvcFactory.h"
00019 #include "GaudiKernel/Kernel.h"
00020 #include "GaudiKernel/Service.h"
00021 #include "GaudiKernel/IChronoStatSvc.h"
00022 // ============================================================================
00024 // ============================================================================
00025 class ISvcLocator  ;
00026 class IMessageSvc  ;
00027 // ============================================================================
00036 class ChronoStatSvc: public extends1<Service, IChronoStatSvc> {
00037 public:
00038   // ============================================================================
00040   typedef std::map<IChronoStatSvc::ChronoTag,ChronoEntity>  ChronoMap ;
00041   typedef std::map<IChronoStatSvc::StatTag,StatEntity>      StatMap   ;
00042   // ============================================================================
00043 public:
00044   // ============================================================================
00046   virtual StatusCode initialize();
00048   virtual StatusCode finalize();
00049   // ============================================================================
00050 public:
00051   // ============================================================================
00055   virtual       ChronoEntity* chronoStart
00056   ( const IChronoStatSvc::ChronoTag& chronoTag );
00057   // ============================================================================
00061   virtual const ChronoEntity* chronoStop
00062   ( const IChronoStatSvc::ChronoTag& chronoTag );
00063   // ============================================================================
00067   virtual IChronoStatSvc::ChronoTime chronoDelta
00068   ( const IChronoStatSvc::ChronoTag& chronoTag,
00069     IChronoStatSvc::ChronoType theType );
00070   // ============================================================================
00074   virtual void    chronoPrint
00075   ( const IChronoStatSvc::ChronoTag& chronoTag );
00076   // ============================================================================
00080   virtual ChronoStatus  chronoStatus
00081   ( const IChronoStatSvc::ChronoTag& chronoTag );
00082   // ============================================================================
00087   virtual void     stat
00088   ( const IChronoStatSvc::StatTag    &  statTag    ,
00089     const IChronoStatSvc::StatFlag   &  statFlag   ) ;
00090   // ============================================================================
00095   virtual void     statPrint
00096   (  const IChronoStatSvc::ChronoTag& statTag) ;
00097   // ============================================================================
00103   virtual const ChronoEntity* chrono
00104   ( const IChronoStatSvc::ChronoTag& t ) const  ;
00105   // ============================================================================
00111   virtual const StatEntity*   stat
00112   ( const IChronoStatSvc::StatTag&   t ) const ;
00113   // ============================================================================
00118   ChronoStatSvc ( const std::string& name, ISvcLocator* svcloc );
00120   virtual ~ChronoStatSvc();
00121   // ============================================================================
00122 protected:
00123   // ============================================================================
00124   // print the "Stat" part of the ChronoStatSvc
00125   void printStats() ;
00126   // ============================================================================
00127 private:
00128   // ============================================================================
00129   // default constructor is disabled
00130   ChronoStatSvc() ;
00131   // copy constructor is disabled
00132   ChronoStatSvc( const  ChronoStatSvc& ) ;
00133   // assignement operator constructor is disabled
00134   ChronoStatSvc& operator=( const  ChronoStatSvc& ) ;
00135   // ============================================================================
00137   void saveStats();
00138   // ============================================================================
00139 private:
00140   // ============================================================================
00142   ChronoMap      m_chronoEntities;
00144   int            m_intChronoPrintLevel ;
00145   MSG::Level     m_chronoPrintLevel    ;
00147   bool           m_chronoTableFlag     ;
00149   bool           m_chronoCoutFlag      ;
00151   bool           m_chronoOrderFlag     ;
00153   bool           m_printUserTime       ;
00155   bool           m_printSystemTime     ;
00157   bool           m_printEllapsedTime   ;
00158 
00159   // property
00160   long m_numberOfSkippedEventsForMemStat ;
00161 
00163   StatMap        m_statEntities;
00164 
00166   int            m_intStatPrintLevel ;
00167   MSG::Level     m_statPrintLevel    ;
00169   bool           m_statTableFlag     ;
00171   bool           m_statCoutFlag      ;
00173   bool           m_statOrderFlag     ;
00175 
00177   StringProperty m_statsOutFileName;
00178 
00179   // the header row
00180   std::string    m_header  ; 
00181   // format for regular statistical printout rows
00182   std::string    m_format1 ; 
00183   // format for "efficiency" statistical printout rows
00184   std::string    m_format2 ; 
00185   // flag to use the special "efficiency" format
00186   bool           m_useEffFormat ; 
00187   // ============================================================================
00188 };
00189 // ============================================================================
00190 // The END
00191 // ============================================================================
00192 #endif   //  GAUDISVC_CHRONOSTATSVC_H
00193 // ============================================================================
00194 
00195 

Generated at Wed Mar 17 18:06:41 2010 for Gaudi Framework, version v21r8 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004