CMS 3D CMS Logo

ProxyFactoryTemplate.h

Go to the documentation of this file.
00001 #ifndef Framework_ProxyFactoryTemplate_h
00002 #define Framework_ProxyFactoryTemplate_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Framework
00006 // Class  :     ProxyFactoryTemplate
00007 // 
00016 //
00017 // Author:      Chris Jones
00018 // Created:     Fri Apr  8 07:59:32 CDT 2005
00019 // $Id: ProxyFactoryTemplate.h,v 1.4 2005/09/01 05:07:02 wmtan Exp $
00020 //
00021 
00022 // system include files
00023 
00024 // user include files
00025 #include "FWCore/Framework/interface/ProxyFactoryBase.h"
00026 #include "FWCore/Framework/interface/DataKey.h"
00027 
00028 // forward declarations
00029 namespace edm {
00030    namespace eventsetup {
00031 
00032 template <class T>
00033 class ProxyFactoryTemplate : public ProxyFactoryBase
00034 {
00035 
00036    public:
00037       typedef typename T::record_type record_type;
00038    
00039       ProxyFactoryTemplate() {}
00040       //virtual ~ProxyFactoryTemplate();
00041 
00042       // ---------- const member functions ---------------------
00043       virtual std::auto_ptr<DataProxy> makeProxy() const {
00044          return std::auto_ptr<DataProxy>(new T);
00045       }
00046       
00047       
00048       virtual DataKey makeKey(const std::string& iName) const {
00049          return DataKey(DataKey::makeTypeTag< typename T::value_type>(),iName.c_str());
00050       }
00051       
00052       // ---------- static member functions --------------------
00053 
00054       // ---------- member functions ---------------------------
00055 
00056    private:
00057       ProxyFactoryTemplate(const ProxyFactoryTemplate&); // stop default
00058 
00059       const ProxyFactoryTemplate& operator=(const ProxyFactoryTemplate&); // stop default
00060 
00061       // ---------- member data --------------------------------
00062 
00063 };
00064 
00065    }
00066 }
00067 
00068 #endif

Generated on Tue Jun 9 17:35:45 2009 for CMSSW by  doxygen 1.5.4