| # Gaudi Framework, version v21r10p1 |

Home |  | Generated: 29 Jul 2010

# FastContainersSvc.h

Go to the documentation of this file.

    00001 // $Id: FastContainersSvc.h,v 1.3 2006/12/04 17:15:14 mato Exp $
    00002 #ifndef FASTCONTAINERSSVC_FASTCONTAINERSSVC_H
    00003 #define FASTCONTAINERSSVC_FASTCONTAINERSSVC_H 1
    00004
    00005 // Include files
    00006 #include "GaudiKernel/DataSvc.h"
    00007 #include "GaudiKernel/IIncidentListener.h"
    00008 #include "GaudiKernel/IDataStoreAgent.h"
    00009 #include "GaudiKernel/TransientFastContainer.h"
    00010 #include "GaudiKernel/IRegistry.h"
    00011
    00022 class FastContainersSvc : public extends1<DataSvc, IIncidentListener> {
    00023 protected:
    00025   FastContainersSvc(const std::string& name, ISvcLocator* svc);
    00026
    00027   virtual ~FastContainersSvc();
    00028
    00029 public:
    00030   // Overloaded DataSvc methods
    00031
    00033   virtual StatusCode initialize();
    00034
    00036   virtual StatusCode reinitialize();
    00037
    00039   virtual StatusCode finalize();
    00040
    00042   virtual void resetStore();
    00043
    00044 public:
    00045
    00046   // Implementation of the IIncidentListener interface
    00047
    00049   virtual void handle( const Incident& incident );
    00050
    00051 private:
    00052
    00053   friend class SvcFactory<FastContainersSvc>;
    00054
    00056   std::string m_rootDirName;
    00057
    00059   class StoreResetter: public IDataStoreAgent
    00060   {
    00061     virtual bool analyse(IRegistry *pRegistry, int /* level */) {
    00062       TransientFastContainerBase* fc =
    00063         dynamic_cast<TransientFastContainerBase*>(pRegistry->object());
    00064       if ( 0 != fc ) fc->clear();
    00065       return true;
    00066     }
    00067   } m_storeResetter;
    00068
    00069 };
    00070 #endif // FASTCONTAINERSSVC_FASTCONTAINERSSVC_H