FWCore
Framework
interface
es_impl
MayConsumeChooser.h
Go to the documentation of this file.
1
#ifndef FWCore_Framework_es_impl_MayConsumeChooser_h
2
#define FWCore_Framework_es_impl_MayConsumeChooser_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Framework
6
// Class : MayConsumeChooser
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Thu, 19 Sep 2019 15:29:50 GMT
19
//
20
21
// system include files
22
#include <type_traits>
23
24
// user include files
25
#include "
FWCore/Framework/interface/es_impl/MayConsumeChooserBase.h
"
26
#include "
FWCore/Framework/interface/DataKey.h
"
27
#include "
FWCore/Framework/interface/EventSetupRecordKey.h
"
28
#include "
FWCore/Utilities/interface/ESGetToken.h
"
29
30
// forward declarations
31
32
namespace
edm::eventsetup::impl
{
33
template
<
typename
RECBASE,
typename
PRODUCT,
typename
RCD,
typename
FUNC,
typename
PTAG>
34
class
MayConsumeChooser
:
public
MayConsumeChooserBase
<RECBASE> {
35
public
:
36
using
Record_t
=
typename
PTAG::Record;
37
using
GetType_t
=
typename
PTAG::Type
;
38
39
MayConsumeChooser
(FUNC&& iFunc) :
func_
(
std
::forward<FUNC>(iFunc)) {}
40
41
// ---------- const member functions ---------------------
42
ESProxyIndex
makeChoice
(RECBASE
const
& iRecord)
const
final
{
43
return
func_
(this->
tagGetter
(), iRecord.getTransientHandle(
token_
));
44
}
45
46
EventSetupRecordKey
recordKey
()
const
noexcept final {
return
EventSetupRecordKey::makeKey<RCD>(); }
47
TypeTag
productType
()
const
noexcept final {
return
DataKey::makeTypeTag<PRODUCT>(); }
48
49
// ---------- static member functions --------------------
50
51
// ---------- member functions ---------------------------
52
edm::ESGetToken<GetType_t, Record_t>
&
token
() {
return
token_
; }
53
54
private
:
55
// ---------- member data --------------------------------
56
edm::ESGetToken<GetType_t, Record_t>
token_
;
57
FUNC
func_
;
58
};
59
}
// namespace edm::eventsetup::impl
60
61
#endif
edm::eventsetup::impl::MayConsumeChooser
Definition:
MayConsumeChooser.h:34
edm::eventsetup::impl::MayConsumeChooserBase
Definition:
MayConsumeChooserBase.h:50
edm::eventsetup::impl
Definition:
MayConsumeChooser.h:32
edm::eventsetup::impl::MayConsumeChooser::Record_t
typename PTAG::Record Record_t
Definition:
MayConsumeChooser.h:36
edm::eventsetup::impl::MayConsumeChooser::recordKey
EventSetupRecordKey recordKey() const noexcept final
Definition:
MayConsumeChooser.h:46
watchdog.const
const
Definition:
watchdog.py:83
ESGetToken.h
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
edm::eventsetup::impl::MayConsumeChooser::MayConsumeChooser
MayConsumeChooser(FUNC &&iFunc)
Definition:
MayConsumeChooser.h:39
edm::ESProxyIndex
Definition:
ESIndices.h:29
susybsm::HSCParticleType::Type
Type
Definition:
HSCParticle.h:20
edm::eventsetup::impl::MayConsumeChooser::token
edm::ESGetToken< GetType_t, Record_t > & token()
Definition:
MayConsumeChooser.h:52
edm::eventsetup::impl::MayConsumeChooser::func_
FUNC func_
Definition:
MayConsumeChooser.h:57
edm::eventsetup::impl::MayConsumeChooser::token_
edm::ESGetToken< GetType_t, Record_t > token_
Definition:
MayConsumeChooser.h:56
DataKey.h
edm::eventsetup::heterocontainer::HCTypeTag
Definition:
HCTypeTag.h:38
edm::eventsetup::impl::MayConsumeChooser::GetType_t
typename PTAG::Type GetType_t
Definition:
MayConsumeChooser.h:37
edm::eventsetup::impl::MayConsumeChooserCore::tagGetter
ESTagGetter const & tagGetter() const
Definition:
MayConsumeChooserBase.h:43
edm::ESGetToken< GetType_t, Record_t >
std
Definition:
JetResolutionObject.h:76
EventSetupRecordKey.h
edm::eventsetup::impl::MayConsumeChooser::productType
TypeTag productType() const noexcept final
Definition:
MayConsumeChooser.h:47
edm::eventsetup::impl::MayConsumeChooser::makeChoice
ESProxyIndex makeChoice(RECBASE const &iRecord) const final
Definition:
MayConsumeChooser.h:42
MayConsumeChooserBase.h
Generated for CMSSW Reference Manual by
1.8.16