1. binet
  2. mana-core-perfmonkernel

Commits

bi...@4525493e-7705-40b1-a816-d608a930855b  committed 38ba607

added hooks to monitor 'initialize' and 'finalize' stages

  • Participants
  • Parent commits 5753d45
  • Branches default

Comments (0)

Files changed (4)

File ChangeLog

View file
+2007-04-18  Sebastien Binet  <binet@lblbox>
+
+	* tagging PerfMonKernel-00-01-02
+	* added hooks to monitor 'initialize' and 'finalize' stages
+
 2007-04-12  Sebastien Binet  <binet@lblbox>
 
 	* tagging PerfMonKernel-00-01-01

File PerfMonKernel/IPerfMonSvc.h

View file
 // FrameWork includes
 #include "GaudiKernel/IService.h"
 
+// forward declaration
+class IPerfMonTool;
+
 class IPerfMonSvc : virtual public IService
 { 
 
   /////////////////////////////////////////////////////////////////// 
  protected: 
 
+  /// shutdown an @c IPerfMonTool
+  StatusCode shutdown( IPerfMonTool* tool );
+
 }; 
 
 // I/O operators

File PerfMonKernel/IPerfMonTool.h

View file
 // FrameWork includes
 #include "GaudiKernel/IAlgTool.h"
 
+// forward declaration
+class IPerfMonSvc;
+
 class IPerfMonTool : virtual public IAlgTool
 { 
+  friend class IPerfMonSvc;
 
   /////////////////////////////////////////////////////////////////// 
   // Public methods: 
   /////////////////////////////////////////////////////////////////// 
 
   /// retrieve performance monitoring data - during initialize
-  //virtual void monitorInitialize() = 0;
+  virtual void monitorInitialize() = 0;
 
   /// retrieve performance monitoring data - during execute
   virtual void monitor() = 0;
 
   /// retrieve performance monitoring data - during finalize
-  //virtual void monitorFinalize() = 0;
+  virtual void monitorFinalize() = 0;
 
   /////////////////////////////////////////////////////////////////// 
   // Protected methods: 
   /////////////////////////////////////////////////////////////////// 
  protected: 
 
+  /// shutdown monitoring: make sure that metadata (if any) is up-to-date
+  /// clean-up any persistency related stuff (@c IPerfMonTupleSvc)
+  /// This method is called by @c IPerfMonSvc
+  virtual StatusCode shutdown() = 0;
+
 }; 
 
 // I/O operators

File src/IPerfMonSvc.cxx

View file
 
 // PerfMonKernel includes
 #include "PerfMonKernel/IPerfMonSvc.h"
+#include "PerfMonKernel/IPerfMonTool.h"
 
 /////////////////////////////////////////////////////////////////// 
 // Public methods: 
 /////////////////////////////////////////////////////////////////// 
 // Non-const methods: 
 /////////////////////////////////////////////////////////////////// 
+
+StatusCode IPerfMonSvc::shutdown( IPerfMonTool* tool )
+{
+  return tool->shutdown();
+}
+