CMS 3D CMS Logo

getRef.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_getRef_h
2 #define DataFormats_Common_getRef_h
3 /* \function edm::getRef(...)
4  *
5  * \author Luca Lista, INFN
6  *
7  */
11 
12 namespace edm {
13  namespace helper {
14  template <typename C>
15  struct MatcherGetRef {
16  typedef Ref<C> ref_type;
17  static ref_type getRef(const Handle<C>& c, size_t k) { return ref_type(c, k); }
18  };
19 
20  template <typename T>
21  struct MatcherGetRef<View<T> > {
23  static ref_type getRef(const Handle<View<T> >& v, size_t k) { return v->refAt(k); }
24  };
25  } // namespace helper
26 
27  template <typename C>
30  }
31 } // namespace edm
32 
33 #endif
Handle.h
edm::helper::MatcherGetRef::ref_type
Ref< C > ref_type
Definition: getRef.h:16
View< T >
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::helper::MatcherGetRef::getRef
static ref_type getRef(const Handle< C > &c, size_t k)
Definition: getRef.h:17
edm::helper::MatcherGetRef
Definition: getRef.h:15
findQualityFiles.v
v
Definition: findQualityFiles.py:179
edm::Handle
Definition: AssociativeIterator.h:50
edm::Ref
Definition: AssociativeIterator.h:58
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::View
Definition: CaloClusterFwd.h:14
edm::getRef
helper::MatcherGetRef< C >::ref_type getRef(const Handle< C > &c, size_t k)
Definition: getRef.h:28
helper
Definition: helper.py:1
edm::helper::MatcherGetRef< View< T > >::ref_type
RefToBase< T > ref_type
Definition: getRef.h:22
Ref.h
T
long double T
Definition: Basic3DVectorLD.h:48
edm::RefToBase
Definition: AssociativeIterator.h:54
View.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::helper::MatcherGetRef< View< T > >::getRef
static ref_type getRef(const Handle< View< T > > &v, size_t k)
Definition: getRef.h:23