CMS 3D CMS Logo

CandMapTrait.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_CandUtils_CandMapTrait_h
00002 #define PhysicsTools_CandUtils_CandMapTrait_h
00003 /* \class reco::helper::CandMapTrait<T>
00004  *
00005  * \author Luca Lista, INFN 
00006  *
00007  * \version $Id: CandMapTrait.h,v 1.2 2007/10/20 16:00:52 llista Exp $
00008  *
00009  */
00010 namespace reco {
00011   namespace helper {
00012     template<typename C1, typename C2 = C1>
00013     struct CandMapTrait {
00014       typedef edm::AssociationMap<edm::OneToOne<C1, C2> > type;
00015     };
00016     
00017     template<typename C1>
00018     struct CandMapTrait<C1, CandidateView> {
00019       typedef edm::AssociationMap<edm::OneToOneGeneric<C1, CandidateView> > type;
00020     };
00021 
00022     template<typename C2>
00023     struct CandMapTrait<CandidateView, C2> {
00024       typedef edm::AssociationMap<edm::OneToOneGeneric<CandidateView, C2> > type;
00025     };
00026 
00027     template<>
00028     struct CandMapTrait<CandidateView, CandidateView> {
00029       typedef edm::AssociationMap<edm::OneToOneGeneric<CandidateView, CandidateView> > type;
00030     };
00031 
00032     template<typename C>
00033     struct CandRefTrait{
00034       typedef edm::Ref<C> ref_type;
00035       typedef edm::RefProd<C> refProd_type;
00036     };
00037 
00038     template<typename T>
00039     struct CandRefTrait<edm::View<T> >{
00040       typedef edm::RefToBase<T> ref_type;
00041       typedef edm::RefToBaseProd<T> refProd_type;
00042     };
00043   }
00044 }
00045 
00046 #endif
00047 

Generated on Tue Jun 9 17:41:03 2009 for CMSSW by  doxygen 1.5.4