| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Search for |

- File List
- File Members

# 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 DataSvc,
    00023                           virtual public IIncidentListener {
    00024 protected:
    00026   FastContainersSvc(const std::string& name, ISvcLocator* svc);
    00027
    00028   virtual ~FastContainersSvc();
    00029
    00030 public:
    00031   // Overloaded DataSvc methods
    00032
    00034   virtual StatusCode initialize();
    00035
    00037   virtual StatusCode reinitialize();
    00038
    00040   virtual StatusCode finalize();
    00041
    00043   virtual void resetStore();
    00044
    00045 public:
    00046
    00047   // Reimplemented from IInterface
    00048
    00050   virtual StatusCode queryInterface( const InterfaceID& riid, void** ppvInterface );
    00051
    00052 public:
    00053
    00054   // Implementation of the IIncidentListener interface
    00055
    00057   virtual void handle( const Incident& incident );
    00058
    00059 private:
    00060
    00061   friend class SvcFactory<FastContainersSvc>;
    00062
    00064   std::string m_rootDirName;
    00065
    00067   class StoreResetter: public IDataStoreAgent
    00068   {
    00069     virtual bool analyse(IRegistry *pRegistry, int /* level */) {
    00070       TransientFastContainerBase* fc =
    00071         dynamic_cast<TransientFastContainerBase*>(pRegistry->object());
    00072       if ( 0 != fc ) fc->clear();
    00073       return true;
    00074     }
    00075   } m_storeResetter;
    00076
    00077 };
    00078 #endif // FASTCONTAINERSSVC_FASTCONTAINERSSVC_H