CMS 3D CMS Logo

GetProduct.h

Go to the documentation of this file.
00001 #ifndef DataFormats_Common_GetProduct_h
00002 #define DataFormats_Common_GetProduct_h
00003 // -*- C++ -*-
00004 //
00005 // Package:     Common
00006 // Class  :     GetProduct
00007 // 
00016 //
00017 // Original Author:  Chris Jones
00018 //         Created:  Sat Oct 20 10:20:20 EDT 2007
00019 // $Id: GetProduct.h,v 1.1 2007/10/22 18:43:05 chrjones Exp $
00020 //
00021 
00022 // system include files
00023 
00024 // user include files
00025 
00026 // forward declarations
00027 
00028 namespace edm {
00029   namespace detail {
00030     template<typename COLLECTION>
00031     struct GetProduct {
00032       typedef typename COLLECTION::value_type element_type;
00033       typedef typename COLLECTION::const_iterator iter;
00034       static const element_type * address( const iter & i ) {
00035         return &*i;
00036       }
00037       static const COLLECTION * product( const COLLECTION & coll ) {
00038         return & coll;
00039       }
00040     };
00041   }
00042 }
00043 
00044 #endif

Generated on Tue Jun 9 17:28:58 2009 for CMSSW by  doxygen 1.5.4