src
DataFormats
Common
interface
GetProduct.h
Go to the documentation of this file.
1
#ifndef DataFormats_Common_GetProduct_h
2
#define DataFormats_Common_GetProduct_h
3
// -*- C++ -*-
4
//
5
// Package: Common
6
// Class : GetProduct
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Sat Oct 20 10:20:20 EDT 2007
19
//
20
21
// system include files
22
23
#include <memory>
24
#include <vector>
25
26
// user include files
27
28
// forward declarations
29
30
namespace
edm
{
31
namespace
detail
{
32
template
<
typename
COLLECTION>
33
struct
GetProduct
{
34
typedef
typename
COLLECTION::value_type
element_type
;
35
typedef
typename
COLLECTION::const_iterator
iter
;
36
static
const
element_type
*
address
(
const
iter
&
i
) {
return
&*
i
; }
37
};
38
39
// Specialize for vector<unique_ptr<T>>>
40
template
<
typename
T,
typename
D,
typename
A>
41
struct
GetProduct
<
std
::
vector
<std::unique_ptr<T, D>, A> > {
42
using
element_type
=
T
;
43
using
iter
=
typename
std::vector<std::unique_ptr<T, D>,
A
>::const_iterator;
44
static
const
element_type
*
address
(
const
iter
&
i
) {
return
i
->get(); }
45
};
46
}
// namespace detail
47
}
// namespace edm
48
49
#endif
edm::detail::GetProduct::iter
COLLECTION::const_iterator iter
Definition:
GetProduct.h:35
edm::detail::GetProduct< std::vector< std::unique_ptr< T, D >, A > >::element_type
T element_type
Definition:
GetProduct.h:42
mps_fire.i
i
Definition:
mps_fire.py:428
edm::detail::GetProduct::address
static const element_type * address(const iter &i)
Definition:
GetProduct.h:36
std
Definition:
JetResolutionObject.h:76
edm::detail::GetProduct< std::vector< std::unique_ptr< T, D >, A > >::address
static const element_type * address(const iter &i)
Definition:
GetProduct.h:44
reco::JetExtendedAssociation::value_type
Container::value_type value_type
Definition:
JetExtendedAssociation.h:30
edm::detail::GetProduct::element_type
COLLECTION::value_type element_type
Definition:
GetProduct.h:34
edm::detail::GetProduct
Definition:
GetProduct.h:33
edm::detail::GetProduct< std::vector< std::unique_ptr< T, D >, A > >::iter
typename std::vector< std::unique_ptr< T, D >, A >::const_iterator iter
Definition:
GetProduct.h:43
detail
Definition:
TrackerDetIdSelector.h:21
edm
HLT enums.
Definition:
AlignableModifier.h:19
trackerHitRTTI::vector
Definition:
trackerHitRTTI.h:21
A
Definition:
APVGainStruct.h:7
T
long double T
Definition:
Basic3DVectorLD.h:48
Generated for CMSSW Reference Manual by
1.8.14