Main Page
Namespaces
Classes
Package Documentation
FWCore
Framework
interface
moduleAbilities.h
Go to the documentation of this file.
1
#ifndef FWCore_Framework_moduleAbilities_h
2
#define FWCore_Framework_moduleAbilities_h
3
// -*- C++ -*-
4
//
5
// Package: FWCore/Framework
6
// Class : moduleAbilities
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Tue, 07 May 2013 19:19:53 GMT
19
//
20
21
// system include files
22
#include <type_traits>
23
24
// user include files
25
#include "
FWCore/Framework/interface/moduleAbilityEnums.h
"
26
27
// forward declarations
28
29
namespace
edm
{
30
namespace
module
{
31
//Used in the case where ability is not available
32
struct
Empty
{};
33
}
34
35
template
<
typename
T>
36
struct
GlobalCache
{
37
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kGlobalCache
;
38
typedef
T
Type
;
39
};
40
41
template
<
typename
T>
42
struct
StreamCache
{
43
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kStreamCache
;
44
typedef
T
Type
;
45
};
46
47
template
<
typename
T>
48
struct
RunCache
{
49
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kRunCache
;
50
typedef
T
Type
;
51
};
52
53
template
<
typename
T>
54
struct
LuminosityBlockCache
{
55
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kLuminosityBlockCache
;
56
typedef
T
Type
;
57
};
58
59
template
<
typename
T>
60
struct
RunSummaryCache
{
61
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kRunSummaryCache
;
62
typedef
T
Type
;
63
};
64
65
template
<
typename
T>
66
struct
LuminosityBlockSummaryCache
{
67
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kLuminosityBlockSummaryCache
;
68
typedef
T
Type
;
69
};
70
71
struct
BeginRunProducer
{
72
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kBeginRunProducer
;
73
typedef
module::Empty
Type
;
74
};
75
76
struct
EndRunProducer
{
77
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kEndRunProducer
;
78
typedef
module::Empty
Type
;
79
};
80
81
struct
BeginLuminosityBlockProducer
{
82
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kBeginLuminosityBlockProducer
;
83
typedef
module::Empty
Type
;
84
};
85
86
struct
EndLuminosityBlockProducer
{
87
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kEndLuminosityBlockProducer
;
88
typedef
module::Empty
Type
;
89
};
90
91
struct
WatchInputFiles
{
92
static
constexpr
module::Abilities
kAbilities=
module::Abilities::kWatchInputFiles
;
93
typedef
module::Empty
Type
;
94
};
95
96
//Recursively checks VArgs template arguments looking for the ABILITY
97
template
<
module::Abilities
ABILITY,
typename
... VArgs>
struct
CheckAbility
;
98
99
template
<
module::Abilities
ABILITY,
typename
T
,
typename
... VArgs>
100
struct
CheckAbility
<ABILITY,T,VArgs...> {
101
static
constexpr
bool
kHasIt = (T::kAbilities==ABILITY) |
CheckAbility<ABILITY,VArgs...>::kHasIt
;
102
typedef
std::conditional_t<(T::kAbilities==ABILITY),
103
typename
T::Type
,
104
typename
CheckAbility<ABILITY,VArgs...>::Type
>
Type
;
105
};
106
107
//End of the recursion
108
template
<module::Abilities ABILITY>
109
struct
CheckAbility
<ABILITY> {
110
static
constexpr
bool
kHasIt=
false
;
111
typedef
edm::module::Empty
Type
;
112
};
113
114
}
115
116
#endif
edm::module::Abilities::kEndLuminosityBlockProducer
edm::module::Abilities::kWatchInputFiles
edm::BeginRunProducer
Definition:
moduleAbilities.h:71
edm::CheckAbility
Definition:
moduleAbilities.h:97
edm::module::Abilities::kLuminosityBlockSummaryCache
edm::LuminosityBlockCache
Definition:
moduleAbilities.h:54
edm::BeginRunProducer::Type
module::Empty Type
Definition:
moduleAbilities.h:73
edm::module::Abilities::kBeginRunProducer
edm::BeginLuminosityBlockProducer::Type
module::Empty Type
Definition:
moduleAbilities.h:83
edm::EndRunProducer::Type
module::Empty Type
Definition:
moduleAbilities.h:78
edm::CheckAbility< ABILITY >::Type
edm::module::Empty Type
Definition:
moduleAbilities.h:111
edm::EndRunProducer
Definition:
moduleAbilities.h:76
edm::StreamCache
Definition:
moduleAbilities.h:42
edm::RunSummaryCache
Definition:
moduleAbilities.h:60
susybsm::HSCParticleType::Type
Type
Definition:
HSCParticle.h:20
edm::LuminosityBlockSummaryCache
Definition:
moduleAbilities.h:66
edm::GlobalCache::Type
T Type
Definition:
moduleAbilities.h:38
edm::module::Abilities::kStreamCache
constexpr
#define constexpr
edm::module::Abilities::kBeginLuminosityBlockProducer
edm::RunCache::Type
T Type
Definition:
moduleAbilities.h:50
edm::RunCache
Definition:
moduleAbilities.h:48
edm::module::Abilities::kEndRunProducer
edm::module::Abilities::kGlobalCache
edm::StreamCache::Type
T Type
Definition:
moduleAbilities.h:44
edm::BeginLuminosityBlockProducer
Definition:
moduleAbilities.h:81
edm::module::Abilities::kLuminosityBlockCache
edm::module::Abilities::kRunCache
edm::GlobalCache
Definition:
moduleAbilities.h:36
edm::LuminosityBlockCache::Type
T Type
Definition:
moduleAbilities.h:56
edm::module::Abilities
Abilities
Definition:
moduleAbilityEnums.h:30
edm::CheckAbility< ABILITY, T, VArgs... >::Type
std::conditional_t<(T::kAbilities==ABILITY), typename T::Type, typename CheckAbility< ABILITY, VArgs... >::Type > Type
Definition:
moduleAbilities.h:104
moduleAbilityEnums.h
edm::WatchInputFiles::Type
module::Empty Type
Definition:
moduleAbilities.h:93
edm
HLT enums.
Definition:
AlignableModifier.h:17
edm::module::Abilities::kRunSummaryCache
edm::WatchInputFiles
Definition:
moduleAbilities.h:91
edm::EndLuminosityBlockProducer::Type
module::Empty Type
Definition:
moduleAbilities.h:88
edm::RunSummaryCache::Type
T Type
Definition:
moduleAbilities.h:62
T
long double T
Definition:
Basic3DVectorLD.h:57
edm::EndLuminosityBlockProducer
Definition:
moduleAbilities.h:86
module
Definition:
vlib.h:208
edm::module::Empty
Definition:
moduleAbilities.h:32
edm::LuminosityBlockSummaryCache::Type
T Type
Definition:
moduleAbilities.h:68
Generated for CMSSW Reference Manual by
1.8.11