FWCore
ParameterSet
interface
AllowedLabelsDescription.h
Go to the documentation of this file.
1
2
#ifndef FWCore_ParameterSet_AllowedLabelsDescription_h
3
#define FWCore_ParameterSet_AllowedLabelsDescription_h
4
5
#include "
FWCore/ParameterSet/interface/AllowedLabelsDescriptionBase.h
"
6
#include "
FWCore/ParameterSet/interface/ParameterDescriptionNode.h
"
7
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
8
#include "
FWCore/ParameterSet/interface/ParameterSetDescriptionTraits.h
"
9
#include "
FWCore/Utilities/interface/value_ptr.h
"
10
11
#include <string>
12
#include <set>
13
#include <vector>
14
#include <iosfwd>
15
16
namespace
edm
{
17
18
class
VParameterSetEntry;
19
class
ParameterSetDescription
;
20
class
DocFormatHelper;
21
22
template
<
class
T>
23
class
AllowedLabelsDescription
:
public
AllowedLabelsDescriptionBase
{
24
public
:
25
AllowedLabelsDescription
(
std::string
const
&
label
,
bool
isTracked
)
26
:
AllowedLabelsDescriptionBase
(
label
,
ParameterTypeToEnum
::toEnum<
T
>(),
isTracked
) {}
27
28
AllowedLabelsDescription
(
char
const
*
label
,
bool
isTracked
)
29
:
AllowedLabelsDescriptionBase
(
label
,
ParameterTypeToEnum
::toEnum<
T
>(),
isTracked
) {}
30
31
~AllowedLabelsDescription
()
override
{}
32
33
ParameterDescriptionNode
*
clone
()
const override
{
return
new
AllowedLabelsDescription
(*
this
); }
34
35
private
:
36
void
validateAllowedLabel_
(
std::string
const
& allowedLabel,
37
ParameterSet
&
pset
,
38
std::set<std::string>& validatedLabels)
const override
{
39
if
(
pset
.existsAs<
T
>(allowedLabel,
isTracked
())) {
40
validatedLabels.insert(allowedLabel);
41
}
42
}
43
};
44
45
template
<>
46
class
AllowedLabelsDescription
<
ParameterSetDescription
> :
public
AllowedLabelsDescriptionBase
{
47
public
:
48
AllowedLabelsDescription
(
std::string
const
&
label
,
bool
isTracked
);
49
50
AllowedLabelsDescription
(
char
const
*
label
,
bool
isTracked
);
51
52
AllowedLabelsDescription
(
std::string
const
&
label
,
ParameterSetDescription
const
&
value
,
bool
isTracked
);
53
54
AllowedLabelsDescription
(
char
const
*
label
,
ParameterSetDescription
const
&
value
,
bool
isTracked
);
55
56
~AllowedLabelsDescription
()
override
;
57
58
ParameterDescriptionNode
*
clone
()
const override
;
59
60
private
:
61
void
printNestedContent_
(std::ostream& os,
bool
optional
,
DocFormatHelper
&
helper
)
const override
;
62
63
void
validateAllowedLabel_
(
std::string
const
& allowedLabel,
64
ParameterSet
&
pset
,
65
std::set<std::string>& validatedLabels)
const override
;
66
67
value_ptr<ParameterSetDescription>
psetDesc_
;
68
};
69
70
template
<>
71
class
AllowedLabelsDescription
<
std
::vector<ParameterSet> > :
public
AllowedLabelsDescriptionBase
{
72
public
:
73
AllowedLabelsDescription
(
std::string
const
&
label
,
bool
isTracked
);
74
75
AllowedLabelsDescription
(
char
const
*
label
,
bool
isTracked
);
76
77
AllowedLabelsDescription
(
std::string
const
&
label
,
ParameterSetDescription
const
&
value
,
bool
isTracked
);
78
79
AllowedLabelsDescription
(
char
const
*
label
,
ParameterSetDescription
const
&
value
,
bool
isTracked
);
80
81
~AllowedLabelsDescription
()
override
;
82
83
ParameterDescriptionNode
*
clone
()
const override
;
84
85
private
:
86
void
printNestedContent_
(std::ostream& os,
bool
optional
,
DocFormatHelper
&
helper
)
const override
;
87
88
void
validateAllowedLabel_
(
std::string
const
& allowedLabel,
89
ParameterSet
&
pset
,
90
std::set<std::string>& validatedLabels)
const override
;
91
92
value_ptr<ParameterSetDescription>
psetDesc_
;
93
};
94
}
// namespace edm
95
#endif
edm::AllowedLabelsDescription::validateAllowedLabel_
void validateAllowedLabel_(std::string const &allowedLabel, ParameterSet &pset, std::set< std::string > &validatedLabels) const override
Definition:
AllowedLabelsDescription.h:36
ParameterSetDescriptionTraits.h
edm::AllowedLabelsDescriptionBase
Definition:
AllowedLabelsDescriptionBase.h:16
edm::AllowedLabelsDescription::AllowedLabelsDescription
AllowedLabelsDescription(char const *label, bool isTracked)
Definition:
AllowedLabelsDescription.h:28
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
Types.optional
optional
Definition:
Types.py:167
AllowedLabelsDescriptionBase.h
edm::AllowedLabelsDescription::~AllowedLabelsDescription
~AllowedLabelsDescription() override
Definition:
AllowedLabelsDescription.h:31
edm::DocFormatHelper
Definition:
DocFormatHelper.h:15
edm::AllowedLabelsDescriptionBase::isTracked
bool isTracked() const
Definition:
AllowedLabelsDescriptionBase.h:21
edm::AllowedLabelsDescriptionBase::printNestedContent_
void printNestedContent_(std::ostream &os, bool optional, DocFormatHelper &dfh) const override
Definition:
AllowedLabelsDescriptionBase.cc:97
ParameterDescriptionNode.h
edm::AllowedLabelsDescription::clone
ParameterDescriptionNode * clone() const override
Definition:
AllowedLabelsDescription.h:33
value_ptr.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition:
ParameterSet.h:36
edm::value_ptr
Definition:
value_ptr.h:63
helper
Definition:
helper.py:1
value
Definition:
value.py:1
edm::AllowedLabelsDescription
Definition:
AllowedLabelsDescription.h:23
edm::AllowedLabelsDescription< ParameterSetDescription >::psetDesc_
value_ptr< ParameterSetDescription > psetDesc_
Definition:
AllowedLabelsDescription.h:67
edm::AllowedLabelsDescription::AllowedLabelsDescription
AllowedLabelsDescription(std::string const &label, bool isTracked)
Definition:
AllowedLabelsDescription.h:25
std
Definition:
JetResolutionObject.h:76
T
long double T
Definition:
Basic3DVectorLD.h:48
ParameterSetDescription
ParameterSet.h
edm::ParameterTypeToEnum
Definition:
ParameterDescriptionNode.h:66
edm::ParameterDescriptionNode
Definition:
ParameterDescriptionNode.h:82
label
const char * label
Definition:
PFTauDecayModeTools.cc:11
edm::AllowedLabelsDescription< std::vector< ParameterSet > >::psetDesc_
value_ptr< ParameterSetDescription > psetDesc_
Definition:
AllowedLabelsDescription.h:92
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
Generated for CMSSW Reference Manual by
1.8.16