CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
edm::ParameterSetDescription Class Reference

#include <ParameterSetDescription.h>

Classes

class  SetDescriptionEntry
 

Public Types

typedef SetDescriptionEntries::const_iterator const_iterator
 
typedef std::vector< SetDescriptionEntrySetDescriptionEntries
 

Public Member Functions

template<typename T , typename U >
ParameterDescriptionBaseadd (U const &iLabel)
 
template<typename T , typename U >
ParameterDescriptionBaseadd (U const &iLabel, T const &value)
 
ParameterDescriptionNodeaddNode (ParameterDescriptionNode const &node)
 
ParameterDescriptionNodeaddNode (std::unique_ptr< ParameterDescriptionNode > node)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptional (U const &iLabel)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptional (U const &iLabel, T const &value)
 
ParameterDescriptionNodeaddOptionalNode (ParameterDescriptionNode const &node, bool writeToCfi)
 
ParameterDescriptionNodeaddOptionalNode (std::unique_ptr< ParameterDescriptionNode > node, bool writeToCfi)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptionalUntracked (U const &iLabel)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptionalUntracked (U const &iLabel, T const &value)
 
template<typename T , typename U >
ParameterDescriptionBaseaddUntracked (U const &iLabel)
 
template<typename T , typename U >
ParameterDescriptionBaseaddUntracked (U const &iLabel, T const &value)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptional (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptional (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptionalUntracked (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptionalUntracked (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSetUntracked (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSetUntracked (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename T , typename U >
ParameterWildcardBaseaddWildcard (U const &pattern)
 
template<typename T , typename U >
ParameterWildcardBaseaddWildcardUntracked (U const &pattern)
 
bool anythingAllowed () const
 
const_iterator begin () const
 
std::string const & comment () const
 
const_iterator end () const
 
ParameterDescriptionNodeifExists (ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2)
 
ParameterDescriptionNodeifExistsOptional (ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2, bool writeToCfi)
 
template<typename T >
ParameterDescriptionNodeifValue (ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
 
template<typename T >
ParameterDescriptionNodeifValueOptional (ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases, bool writeToCfi)
 
bool isLabelUnused (std::string const &label) const
 
bool isUnknown () const
 
template<typename T , typename U >
ParameterDescriptionNodelabelsFrom (U const &iLabel)
 
template<typename T , typename U , typename V >
ParameterDescriptionNodelabelsFrom (U const &iLabel, V const &desc)
 
template<typename T , typename U >
ParameterDescriptionNodelabelsFromOptional (U const &iLabel, bool writeToCfi)
 
template<typename T , typename U , typename V >
ParameterDescriptionNodelabelsFromOptional (U const &iLabel, bool writeToCfi, V const &desc)
 
template<typename T , typename U >
ParameterDescriptionNodelabelsFromOptionalUntracked (U const &iLabel, bool writeToCfi)
 
template<typename T , typename U , typename V >
ParameterDescriptionNodelabelsFromOptionalUntracked (U const &iLabel, bool writeToCfi, V const &desc)
 
template<typename T , typename U >
ParameterDescriptionNodelabelsFromUntracked (U const &iLabel)
 
template<typename T , typename U , typename V >
ParameterDescriptionNodelabelsFromUntracked (U const &iLabel, V const &desc)
 
 ParameterSetDescription ()
 
void print (std::ostream &os, DocFormatHelper &dfh) const
 
void reserve (SetDescriptionEntries::size_type n)
 
void setAllowAnything ()
 allow any parameter label/value pairs More...
 
void setComment (char const *value)
 
void setComment (std::string const &value)
 
void setUnknown ()
 
void validate (ParameterSet &pset) const
 
void writeCfi (std::ostream &os, bool startWithComma, int indentation) const
 
virtual ~ParameterSetDescription ()
 

Private Member Functions

template<typename T , typename U >
ParameterDescriptionBaseadd (U const &iLabel, bool isTracked, bool isOptional, bool writeToCfi)
 
template<typename T , typename U >
ParameterDescriptionBaseadd (U const &iLabel, T const &value, bool isTracked, bool isOptional, bool writeToCfi)
 
ParameterDescriptionNodeaddNode (std::unique_ptr< ParameterDescriptionNode > node, bool optional, bool writeToCfi)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator, bool isTracked, bool isOptional, bool writeToCfi)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults, bool isTracked, bool isOptional, bool writeToCfi)
 
template<typename T , typename U >
ParameterWildcardBaseaddWildcard (U const &pattern, bool isTracked)
 
ParameterDescriptionNodeifExists (ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2, bool optional, bool writeToCfi)
 
template<typename T >
ParameterDescriptionNodeifValue (ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases, bool optional, bool writeToCfi)
 
template<typename T , typename U >
ParameterDescriptionNodelabelsFrom (U const &iLabel, bool isTracked, bool optional, bool writeToCfi)
 
template<typename T , typename U , typename V >
ParameterDescriptionNodelabelsFrom (U const &iLabel, bool isTracked, bool optional, bool writeToCfi, V const &desc)
 
void throwIfLabelsAlreadyUsed (std::set< std::string > const &nodeLabels)
 
void throwIfWildcardCollision (std::set< ParameterTypes > const &nodeParameterTypes, std::set< ParameterTypes > const &nodeWildcardTypes)
 

Static Private Member Functions

static void printNode (SetDescriptionEntry const &entry, std::ostream &os, DocFormatHelper &dfh)
 
static void throwIllegalParameters (std::vector< std::string > const &parameterNames, std::set< std::string > const &validatedNames)
 
static void validateNode (SetDescriptionEntry const &entry, ParameterSet &pset, std::set< std::string > &validatedNames)
 
static void writeNode (SetDescriptionEntry const &entry, std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething)
 

Private Attributes

bool anythingAllowed_
 
std::string comment_
 
SetDescriptionEntries entries_
 
std::set< ParameterTypestypesUsedForParameters_
 
std::set< ParameterTypestypesUsedForWildcards_
 
bool unknown_
 
std::set< std::string > usedLabels_
 

Detailed Description

Definition at line 52 of file ParameterSetDescription.h.

Member Typedef Documentation

◆ const_iterator

typedef SetDescriptionEntries::const_iterator edm::ParameterSetDescription::const_iterator

Definition at line 73 of file ParameterSetDescription.h.

◆ SetDescriptionEntries

Definition at line 72 of file ParameterSetDescription.h.

Constructor & Destructor Documentation

◆ ParameterSetDescription()

ParameterSetDescription::ParameterSetDescription ( )

Definition at line 29 of file ParameterSetDescription.cc.

29 : anythingAllowed_(false), unknown_(false) {}

◆ ~ParameterSetDescription()

ParameterSetDescription::~ParameterSetDescription ( )
virtual

Definition at line 31 of file ParameterSetDescription.cc.

31 {}

Member Function Documentation

◆ add() [1/4]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::add ( U const &  iLabel)
inline

Definition at line 118 of file ParameterSetDescription.h.

118  {
119  return add<T, U>(iLabel, true, false, true);
120  }

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ add() [2/4]

template<typename T , typename U >
ParameterDescriptionBase * ParameterSetDescription::add ( U const &  iLabel,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 399 of file ParameterSetDescription.h.

402  {
403  std::unique_ptr<ParameterDescriptionNode> node = std::make_unique<ParameterDescription<T>>(iLabel, isTracked);
404  ParameterDescriptionNode* pnode = addNode(std::move(node), isOptional, writeToCfi);
405  return static_cast<ParameterDescriptionBase*>(pnode);
406  }

References addNode(), and eostools::move().

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ add() [3/4]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::add ( U const &  iLabel,
T const &  value 
)
inline

Definition at line 95 of file ParameterSetDescription.h.

95  {
96  return add<T, U>(iLabel, value, true, false, true);
97  }

Referenced by JetCorrectorImplMakerBase::addToDescription(), pat::helper::KinResolutionsLoader::fillDescription(), BeamFitter::fillDescription(), PVFitter::fillDescription(), pat::PATUserDataHelper< pat::MET >::fillDescription(), SiStripQualityWithFromFedErrorsHelper::fillDescription(), pat::PATUserDataMerger< pat::Jet, pat::helper::AddUserInt >::fillDescription(), PFTauSelector::fillDescriptions(), Phase2ITRecHitHarvester::fillDescriptions(), L1TEnergySumFilterT< T >::fillDescriptions(), SeedGeneratorFromProtoTracksEDProducer::fillDescriptions(), VertexAssociatorByTracksProducer::fillDescriptions(), L1TJetFilterT< T >::fillDescriptions(), ECFAdder::fillDescriptions(), HGCRecHitNavigator< D1, hgcee, D2, hgchef, D3, hgcheb >::fillDescriptions(), PFRecoTauDiscriminationByLeadingObjectPtCut::fillDescriptions(), ParticleBasedIsoProducer::fillDescriptions(), PixelVertexCollectionTrimmer::fillDescriptions(), CTPPSOpticalFunctionsESSource::fillDescriptions(), HBHEDarkeningEP::fillDescriptions(), MTDGeometricTimingDetESModule::fillDescriptions(), TrackerGeometricDetESModule::fillDescriptions(), HcalTimeSlewEP::fillDescriptions(), PFTauDiscriminatorLogicalAndProducer::fillDescriptions(), SeedCreatorFromRegionHitsEDProducerT< T_SeedCreator >::fillDescriptions(), L1TPFTauFilter::fillDescriptions(), MVAJetPuIdProducer::fillDescriptions(), EcalRecHitParametersGPUESProducer::fillDescriptions(), HPSPFTauProducer::fillDescriptions(), PPSFilteredProtonProducer::fillDescriptions(), PFRecoTauDiscriminationByHPSSelection::fillDescriptions(), GlobalTrackingRegionProducer::fillDescriptions(), OnlineBeamSpotESProducer::fillDescriptions(), L1THPSPFTauFilter::fillDescriptions(), TICLCandidateFromTrackstersProducer::fillDescriptions(), L1TTkEleFilter::fillDescriptions(), L1TTkEmFilter::fillDescriptions(), L1TTkMuonFilter::fillDescriptions(), cms::CSJetProducer::fillDescriptions(), PixelTripletHLTGenerator::fillDescriptions(), PFRecoTauDiscriminationByNProngs::fillDescriptions(), L2MuonIsolationProducer::fillDescriptions(), DTUnpackingModule::fillDescriptions(), EcalRecHitProducer::fillDescriptions(), EcalBarrelClusterFastTimer::fillDescriptions(), CaloTowerFromL1TSeededCreatorForTauHLT::fillDescriptions(), GlobalTrackQualityProducer::fillDescriptions(), L3MuonCombinedRelativeIsolationProducer::fillDescriptions(), AlcaPCCEventProducer::fillDescriptions(), citk::PFIsolationSumProducerForPUPPI::fillDescriptions(), HLTPPSPerPotTrackFilter::fillDescriptions(), TauHadronDecayFilter::fillDescriptions(), PFRecoTauDiscriminationAgainstMuon::fillDescriptions(), MkFitProducer::fillDescriptions(), HcalSimpleReconstructor::fillDescriptions(), CTPPSDiamondLocalTrackFitter::fillDescriptions(), CaloTowerFromL1TCreatorForTauHLT::fillDescriptions(), ElectronSeedProducer::fillDescriptions(), TrackerDigiGeometryESModule::fillDescriptions(), BPHWriteSpecificDecay::fillDescriptions(), HLTCaloJetIDProducer::fillDescriptions(), CaloTowerCreatorForTauHLT::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), DPFIsolation::fillDescriptions(), BeamSpotOnlineProducer::fillDescriptions(), MTDDigiGeometryESModule::fillDescriptions(), EcalMustacheSCParametersESProducer::fillDescriptions(), EcalSCDynamicDPhiParametersESProducer::fillDescriptions(), GlobalTrackingRegionProducerFromBeamSpot::fillDescriptions(), TotemTimingLocalTrackFitter::fillDescriptions(), edm::service::PrescaleService::fillDescriptions(), RunInfoTestESProducer::fillDescriptions(), MeasurementTrackerESProducer::fillDescriptions(), HcalRecAlgoESProducer::fillDescriptions(), SiStripLorentzAngleDepESProducer::fillDescriptions(), CAHitTripletGenerator::fillDescriptions(), PFProducer::fillDescriptions(), CAHitQuadrupletGenerator::fillDescriptions(), TopMonitor::fillDescriptions(), pat::PATJetUpdater::fillDescriptions(), MkFitSiStripHitConverter::fillDescriptions(), SiStripBackPlaneCorrectionDepESProducer::fillDescriptions(), TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::fillDescriptions(), L3MuonProducer::fillDescriptions(), citk::PFIsolationSumProducer::fillDescriptions(), CAHitNtupletGeneratorOnGPU::fillDescriptions(), Phase2ITMonitorCluster::fillDescriptions(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::fillDescriptions(), Phase2OTMonitorCluster::fillDescriptions(), Phase1L1TJetCalibrator::fillDescriptions(), PFTauDecayModeCutMultiplexer::fillDescriptions(), TotemRPUVPatternFinder::fillDescriptions(), DDDetectorESProducer::fillDescriptions(), RecoTauPiZeroProducer::fillDescriptions(), EgammaHLTNxNClusterProducer::fillDescriptions(), FastjetJetProducer::fillDescriptions(), Phase2ITMonitorRecHit::fillDescriptions(), TemplatedVertexArbitrator< InputContainer, VTX >::fillDescriptions(), PPSAlignmentConfigESSource::fillDescriptions(), SiStripChannelGainFromDBMiscalibrator::fillDescriptions(), L2MuonProducer::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), GlobalTrackingRegionWithVerticesProducer::fillDescriptions(), ConversionTrackCandidateProducer::fillDescriptions(), SiStripNoisesFromDBMiscalibrator::fillDescriptions(), RecoTauProducer::fillDescriptions(), HITrackingRegionForPrimaryVtxProducer::fillDescriptions(), CTPPSCompositeESSource::fillDescriptions(), Phase2ITValidateCluster::fillDescriptions(), TrackingRegionsFromBeamSpotAndL2Tau::fillDescriptions(), BTagProbabilityToDiscriminator::fillDescriptions(), Phase2OTValidateCluster::fillDescriptions(), Phase2OTMonitorRecHit::fillDescriptions(), HcalHardcodeCalibrations::fillDescriptions(), cms::PFMETProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), CorrectedECALPFClusterProducer::fillDescriptions(), PrimaryVertexProducer::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), PFRecoTauChargedHadronProducer::fillDescriptions(), ApeTreeCreateDefault::fillDescriptions(), DiMuonVertexValidation::fillDescriptions(), TauRegionalPixelSeedGenerator::fillDescriptions(), AreaSeededTrackingRegionsProducer::fillDescriptions(), DiElectronVertexValidation::fillDescriptions(), ExternalLHEProducer::fillDescriptions(), PFRecoTauDiscriminationAgainstElectron2::fillDescriptions(), SiPixelStatusProducer::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), pat::JetCorrFactorsProducer::fillDescriptions(), PrimaryVertexValidation::fillDescriptions(), MuonIdProducer::fillDescriptions(), GsfElectronProducer::fillDescriptions(), EgammaHLTExtraProducer::fillDescriptions(), EgammaHLTPhase2ExtraProducer::fillDescriptions(), EgammaHLTFilteredObjProducer< OutCollType >::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), TrackingRegionsFromSuperClustersProducer::fillDescriptions(), reco::tau::RecoTauQualityCuts::fillDescriptions(), HLTCaloObjInRegionsProducer< CaloObjType, CaloObjCollType >::fillDescriptions(), HLTRecHitInAllL1RegionsProducer< RecHitType >::fillDescriptions(), CandidateSeededTrackingRegionsProducer::fillDescriptions(), PointSeededTrackingRegionsProducer::fillDescriptions(), IsolatedTracksCone::fillDescriptions(), CandidatePointSeededTrackingRegionsProducer::fillDescriptions(), TopProjector< Top, Bottom, Matcher >::fillDescriptions(), PFRecoTauDiscriminationByIsolation::fillDescriptions(), pat::PATJetSelector::fillDescriptions(), PFRecoTauDiscriminationByIsolationContainer::fillDescriptions(), RecoTauCleanerImpl< Prod >::fillDescriptions(), GenWeightsTableProducer::fillDescriptions(), DeepTauId::fillDescriptions(), PuppiAlgo::fillDescriptionsPuppiAlgo(), TauDiscriminationProducerBase< TauType, TauDiscriminator >::fillProducerDescriptions(), PFMuonAlgo::fillPSetDescription(), ticl::PatternRecognitionbyCLUE3D< TILES >::fillPSetDescription(), ticl::PatternRecognitionbyCA< TILES >::fillPSetDescription(), PFEGammaFilters::fillPSetDescription(), L1TTkMuonFilter::MuonQualityCut::fillPSetDescription(), Phase2ITValidateRecHitBase::fillPSetDescription(), TritonClient::fillPSetDescription(), Phase2OTValidateRecHitBase::fillPSetDescription(), PFCandConnector::fillPSetDescription(), HGCalCLUEAlgoT< TILE >::fillPSetDescription(), HGCalImagingAlgo::fillPSetDescription(), PFTauPrimaryVertexProducerBase::getDescriptionsBase(), HLTDQMTagAndProbeEff< TagType, TagCollType, ProbeType, ProbeCollType >::makePSetDescription(), edm::eventsetup::DataProxyProvider::prevalidate(), counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ add() [4/4]

template<typename T , typename U >
ParameterDescriptionBase * ParameterSetDescription::add ( U const &  iLabel,
T const &  value,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 390 of file ParameterSetDescription.h.

391  {
392  std::unique_ptr<ParameterDescriptionNode> node =
393  std::make_unique<ParameterDescription<T>>(iLabel, value, isTracked);
394  ParameterDescriptionNode* pnode = addNode(std::move(node), isOptional, writeToCfi);
395  return static_cast<ParameterDescriptionBase*>(pnode);
396  }

References addNode(), eostools::move(), and relativeConstraints::value.

Referenced by counter.Counter::register(), SequenceTypes.Task::remove(), and SequenceTypes.Task::replace().

◆ addNode() [1/3]

ParameterDescriptionNode * ParameterSetDescription::addNode ( ParameterDescriptionNode const &  node)

◆ addNode() [2/3]

ParameterDescriptionNode * ParameterSetDescription::addNode ( std::unique_ptr< ParameterDescriptionNode node)

Definition at line 46 of file ParameterSetDescription.cc.

46  {
47  return addNode(std::move(node), false, true);
48  }

References addNode(), and eostools::move().

◆ addNode() [3/3]

ParameterDescriptionNode * ParameterSetDescription::addNode ( std::unique_ptr< ParameterDescriptionNode node,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 61 of file ParameterSetDescription.cc.

63  {
64  std::set<std::string> nodeLabels;
65  std::set<ParameterTypes> nodeParameterTypes;
66  std::set<ParameterTypes> nodeWildcardTypes;
67  node->checkAndGetLabelsAndTypes(nodeLabels, nodeParameterTypes, nodeWildcardTypes);
68  throwIfLabelsAlreadyUsed(nodeLabels);
69  throwIfWildcardCollision(nodeParameterTypes, nodeWildcardTypes);
70 
71  SetDescriptionEntry entry;
72  entry.setOptional(optional);
73  entry.setWriteToCfi(writeToCfi);
74  entries_.push_back(entry);
75  return entries_.back().setNode(std::move(node));
76  }

References edm::ParameterDescriptionNode::checkAndGetLabelsAndTypes(), entries_, mps_splice::entry, eostools::move(), Types::optional, throwIfLabelsAlreadyUsed(), and throwIfWildcardCollision().

◆ addOptional() [1/2]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptional ( U const &  iLabel)
inline

Definition at line 128 of file ParameterSetDescription.h.

128  {
129  return add<T, U>(iLabel, true, true, true);
130  }

◆ addOptional() [2/2]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptional ( U const &  iLabel,
T const &  value 
)
inline

◆ addOptionalNode() [1/2]

ParameterDescriptionNode * ParameterSetDescription::addOptionalNode ( ParameterDescriptionNode const &  node,
bool  writeToCfi 
)

Definition at line 50 of file ParameterSetDescription.cc.

51  {
52  std::unique_ptr<ParameterDescriptionNode> clonedNode(node.clone());
53  return addNode(std::move(clonedNode), true, writeToCfi);
54  }

References addNode(), edm::ParameterDescriptionNode::clone(), and eostools::move().

Referenced by ecaldqm::binning::fillAxisDescriptions(), and EcalUncalibRecHitWorkerMultiFit::getAlgoDescription().

◆ addOptionalNode() [2/2]

ParameterDescriptionNode * ParameterSetDescription::addOptionalNode ( std::unique_ptr< ParameterDescriptionNode node,
bool  writeToCfi 
)

Definition at line 56 of file ParameterSetDescription.cc.

57  {
58  return addNode(std::move(node), true, writeToCfi);
59  }

References addNode(), and eostools::move().

◆ addOptionalUntracked() [1/2]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptionalUntracked ( U const &  iLabel)
inline

Definition at line 133 of file ParameterSetDescription.h.

133  {
134  return add<T, U>(iLabel, false, true, true);
135  }

◆ addOptionalUntracked() [2/2]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptionalUntracked ( U const &  iLabel,
T const &  value 
)
inline

Definition at line 110 of file ParameterSetDescription.h.

110  {
111  return add<T, U>(iLabel, value, false, true, true);
112  }

Referenced by edm::edmodule_mightGet_config(), ecaldqm::binning::fillAxisDescriptions(), and ecaldqm::fillMESetDescriptions().

◆ addUntracked() [1/2]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addUntracked ( U const &  iLabel)
inline

Definition at line 123 of file ParameterSetDescription.h.

123  {
124  return add<T, U>(iLabel, false, false, true);
125  }

◆ addUntracked() [2/2]

template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addUntracked ( U const &  iLabel,
T const &  value 
)
inline

Definition at line 100 of file ParameterSetDescription.h.

100  {
101  return add<T, U>(iLabel, value, false, false, true);
102  }

Referenced by ecaldqm::binning::fillAxisDescriptions(), BeamFitter::fillDescription(), PVFitter::fillDescription(), edm::PoolOutputModule::fillDescription(), edm::TestSource::fillDescriptions(), CUDAService::fillDescriptions(), ecaldqm::DQWorkerClient::fillDescriptions(), ecaldqm::EcalDQMonitor::fillDescriptions(), DTUnpackingModule::fillDescriptions(), SiStripDetVOffPrinter::fillDescriptions(), CaloTowerFromL1TSeededCreatorForTauHLT::fillDescriptions(), OnlineBeamMonitor::fillDescriptions(), AlcaPCCEventProducer::fillDescriptions(), AlcaBeamMonitor::fillDescriptions(), CaloTowerFromL1TCreatorForTauHLT::fillDescriptions(), CaloTowerCreatorForTauHLT::fillDescriptions(), BeamSpotRcdPrinter::fillDescriptions(), BeamSpotOnlineProducer::fillDescriptions(), SiStripLorentzAngleDepESProducer::fillDescriptions(), SiStripBackPlaneCorrectionDepESProducer::fillDescriptions(), L3MuonProducer::fillDescriptions(), edm::service::CheckTransitions::fillDescriptions(), L2MuonProducer::fillDescriptions(), L2MuonSeedGeneratorFromL1T::fillDescriptions(), L2MuonSeedGeneratorFromL1TkMu::fillDescriptions(), MCMisalignmentScaler::fillDescriptions(), ecaldqm::DQWorker::fillDescriptions(), SiPixelStatusProducer::fillDescriptions(), TritonService::fillDescriptions(), TopProjector< Top, Bottom, Matcher >::fillDescriptions(), FastTimerService::fillDescriptions(), TrackingNtuple::fillDescriptions(), ecaldqm::fillMESetDescriptions(), edm::fillOptionsDescription(), TritonClient::fillPSetDescription(), HGCalCLUEAlgoT< TILE >::fillPSetDescription(), and HGCalImagingAlgo::fillPSetDescription().

◆ addVPSet() [1/4]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 177 of file ParameterSetDescription.h.

177  {
178  return addVPSet<U>(iLabel, validator, true, false, true);
179  }

◆ addVPSet() [2/4]

template<typename U >
ParameterDescriptionBase * ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 422 of file ParameterSetDescription.h.

423  {
424  std::unique_ptr<ParameterDescriptionNode> node =
425  std::make_unique<ParameterDescription<std::vector<ParameterSet>>>(iLabel, validator, isTracked);
426  ParameterDescriptionNode* pnode = addNode(std::move(node), isOptional, writeToCfi);
427  return static_cast<ParameterDescriptionBase*>(pnode);
428  }

References addNode(), and eostools::move().

◆ addVPSet() [3/4]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 149 of file ParameterSetDescription.h.

151  {
152  return addVPSet<U>(iLabel, validator, defaults, true, false, true);
153  }

References l1GtPatternGenerator_cfi::defaults.

Referenced by CTPPSOpticalFunctionsESSource::fillDescriptions(), citk::PFIsolationSumProducerForPUPPI::fillDescriptions(), and citk::PFIsolationSumProducer::fillDescriptions().

◆ addVPSet() [4/4]

template<typename U >
ParameterDescriptionBase * ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 409 of file ParameterSetDescription.h.

414  {
415  std::unique_ptr<ParameterDescriptionNode> node =
416  std::make_unique<ParameterDescription<std::vector<ParameterSet>>>(iLabel, validator, isTracked, defaults);
417  ParameterDescriptionNode* pnode = addNode(std::move(node), isOptional, writeToCfi);
418  return static_cast<ParameterDescriptionBase*>(pnode);
419  }

References addNode(), l1GtPatternGenerator_cfi::defaults, and eostools::move().

◆ addVPSetOptional() [1/2]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptional ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 187 of file ParameterSetDescription.h.

187  {
188  return addVPSet<U>(iLabel, validator, true, true, true);
189  }

◆ addVPSetOptional() [2/2]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptional ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 163 of file ParameterSetDescription.h.

165  {
166  return addVPSet<U>(iLabel, validator, defaults, true, true, true);
167  }

References l1GtPatternGenerator_cfi::defaults.

Referenced by RecoTauProducer::fillDescriptions().

◆ addVPSetOptionalUntracked() [1/2]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptionalUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 192 of file ParameterSetDescription.h.

192  {
193  return addVPSet<U>(iLabel, validator, false, true, true);
194  }

◆ addVPSetOptionalUntracked() [2/2]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptionalUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 170 of file ParameterSetDescription.h.

172  {
173  return addVPSet<U>(iLabel, validator, defaults, false, true, true);
174  }

References l1GtPatternGenerator_cfi::defaults.

◆ addVPSetUntracked() [1/2]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 182 of file ParameterSetDescription.h.

182  {
183  return addVPSet<U>(iLabel, validator, false, false, true);
184  }

◆ addVPSetUntracked() [2/2]

template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 156 of file ParameterSetDescription.h.

158  {
159  return addVPSet<U>(iLabel, validator, defaults, false, false, true);
160  }

References l1GtPatternGenerator_cfi::defaults.

◆ addWildcard() [1/2]

template<typename T , typename U >
ParameterWildcardBase* edm::ParameterSetDescription::addWildcard ( U const &  pattern)
inline

Definition at line 199 of file ParameterSetDescription.h.

199  {
200  return addWildcard<T, U>(pattern, true);
201  }

References topSingleLeptonDQM_PU_cfi::pattern.

Referenced by pat::PATObjectUserDataEmbedder< T >::fillDescriptions().

◆ addWildcard() [2/2]

template<typename T , typename U >
ParameterWildcardBase * ParameterSetDescription::addWildcard ( U const &  pattern,
bool  isTracked 
)
private

Definition at line 431 of file ParameterSetDescription.h.

431  {
432  std::unique_ptr<ParameterDescriptionNode> node =
433  std::make_unique<ParameterWildcard<T>>(pattern, RequireZeroOrMore, isTracked);
434  ParameterDescriptionNode* pnode = addNode(std::move(node), true, false);
435  return static_cast<ParameterWildcardBase*>(pnode);
436  }

References addNode(), eostools::move(), topSingleLeptonDQM_PU_cfi::pattern, and edm::RequireZeroOrMore.

◆ addWildcardUntracked()

template<typename T , typename U >
ParameterWildcardBase* edm::ParameterSetDescription::addWildcardUntracked ( U const &  pattern)
inline

◆ anythingAllowed()

bool edm::ParameterSetDescription::anythingAllowed ( ) const
inline

Definition at line 292 of file ParameterSetDescription.h.

292 { return anythingAllowed_; }

References anythingAllowed_.

Referenced by print(), and validate().

◆ begin()

const_iterator edm::ParameterSetDescription::begin ( void  ) const
inline

Definition at line 295 of file ParameterSetDescription.h.

295 { return entries_.begin(); }

References entries_.

◆ comment()

std::string const& edm::ParameterSetDescription::comment ( ) const
inline

Definition at line 78 of file ParameterSetDescription.h.

78 { return comment_; }

References comment_.

◆ end()

const_iterator edm::ParameterSetDescription::end ( void  ) const
inline

Definition at line 297 of file ParameterSetDescription.h.

297 { return entries_.end(); }

References entries_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

◆ ifExists() [1/2]

ParameterDescriptionNode* edm::ParameterSetDescription::ifExists ( ParameterDescriptionNode const &  node1,
ParameterDescriptionNode const &  node2 
)
inline

Definition at line 233 of file ParameterSetDescription.h.

233  {
234  return ifExists(node1, node2, false, true);
235  }

Referenced by ifExistsOptional().

◆ ifExists() [2/2]

ParameterDescriptionNode * ParameterSetDescription::ifExists ( ParameterDescriptionNode const &  node1,
ParameterDescriptionNode const &  node2,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 319 of file ParameterSetDescription.cc.

322  {
323  std::unique_ptr<ParameterDescriptionNode> pdIfExists = std::make_unique<IfExistsDescription>(node1, node2);
324  return addNode(std::move(pdIfExists), optional, writeToCfi);
325  }

References addNode(), eostools::move(), and Types::optional.

◆ ifExistsOptional()

ParameterDescriptionNode* edm::ParameterSetDescription::ifExistsOptional ( ParameterDescriptionNode const &  node1,
ParameterDescriptionNode const &  node2,
bool  writeToCfi 
)
inline

Definition at line 237 of file ParameterSetDescription.h.

239  {
240  return ifExists(node1, node2, true, writeToCfi);
241  }

References ifExists().

◆ ifValue() [1/2]

template<typename T >
ParameterDescriptionNode* edm::ParameterSetDescription::ifValue ( ParameterDescription< T > const &  switchParameter,
std::unique_ptr< ParameterDescriptionCases< T >>  cases 
)
inline

◆ ifValue() [2/2]

template<typename T >
ParameterDescriptionNode * ParameterSetDescription::ifValue ( ParameterDescription< T > const &  switchParameter,
std::unique_ptr< ParameterDescriptionCases< T >>  cases,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 439 of file ParameterSetDescription.h.

442  {
443  std::unique_ptr<ParameterDescriptionNode> pdswitch =
444  std::make_unique<ParameterSwitch<T>>(switchParameter, std::move(cases));
445  return addNode(std::move(pdswitch), optional, writeToCfi);
446  }

References addNode(), eostools::move(), and Types::optional.

◆ ifValueOptional()

template<typename T >
ParameterDescriptionNode* edm::ParameterSetDescription::ifValueOptional ( ParameterDescription< T > const &  switchParameter,
std::unique_ptr< ParameterDescriptionCases< T >>  cases,
bool  writeToCfi 
)
inline

Definition at line 226 of file ParameterSetDescription.h.

228  {
229  return ifValue<T>(switchParameter, std::move(cases), true, writeToCfi);
230  }

References eostools::move().

◆ isLabelUnused()

bool ParameterSetDescription::isLabelUnused ( std::string const &  label) const

Definition at line 191 of file ParameterSetDescription.cc.

191  {
192  return usedLabels_.find(label) == usedLabels_.end();
193  }

References label, and usedLabels_.

Referenced by edm::edmodule_mightGet_config(), and edm::eventsetup::DataProxyProvider::prevalidate().

◆ isUnknown()

bool edm::ParameterSetDescription::isUnknown ( ) const
inline

Definition at line 293 of file ParameterSetDescription.h.

293 { return unknown_; }

References unknown_.

Referenced by edm::ConfigurationDescriptions::print(), and print().

◆ labelsFrom() [1/4]

template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFrom ( U const &  iLabel)
inline

Definition at line 245 of file ParameterSetDescription.h.

245  {
246  return labelsFrom<T, U>(iLabel, true, false, true);
247  }

◆ labelsFrom() [2/4]

template<typename T , typename U >
ParameterDescriptionNode * ParameterSetDescription::labelsFrom ( U const &  iLabel,
bool  isTracked,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 449 of file ParameterSetDescription.h.

452  {
453  std::unique_ptr<ParameterDescriptionNode> pd = std::make_unique<AllowedLabelsDescription<T>>(iLabel, isTracked);
454  return addNode(std::move(pd), optional, writeToCfi);
455  }

References addNode(), eostools::move(), and Types::optional.

◆ labelsFrom() [3/4]

template<typename T , typename U , typename V >
ParameterDescriptionNode * ParameterSetDescription::labelsFrom ( U const &  iLabel,
bool  isTracked,
bool  optional,
bool  writeToCfi,
V const &  desc 
)
private

Definition at line 458 of file ParameterSetDescription.h.

459  {
460  std::unique_ptr<ParameterDescriptionNode> pd =
461  std::make_unique<AllowedLabelsDescription<T>>(iLabel, desc, isTracked);
462  return addNode(std::move(pd), optional, writeToCfi);
463  }

References addNode(), submitPVResolutionJobs::desc, eostools::move(), and Types::optional.

◆ labelsFrom() [4/4]

template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFrom ( U const &  iLabel,
V const &  desc 
)
inline

Definition at line 273 of file ParameterSetDescription.h.

273  {
274  return labelsFrom<T, U, V>(iLabel, true, false, true, desc);
275  }

References submitPVResolutionJobs::desc.

◆ labelsFromOptional() [1/2]

template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptional ( U const &  iLabel,
bool  writeToCfi 
)
inline

Definition at line 255 of file ParameterSetDescription.h.

255  {
256  return labelsFrom<T, U>(iLabel, true, true, writeToCfi);
257  }

◆ labelsFromOptional() [2/2]

template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptional ( U const &  iLabel,
bool  writeToCfi,
V const &  desc 
)
inline

Definition at line 283 of file ParameterSetDescription.h.

283  {
284  return labelsFrom<T, U, V>(iLabel, true, true, writeToCfi, desc);
285  }

References submitPVResolutionJobs::desc.

◆ labelsFromOptionalUntracked() [1/2]

template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptionalUntracked ( U const &  iLabel,
bool  writeToCfi 
)
inline

Definition at line 260 of file ParameterSetDescription.h.

260  {
261  return labelsFrom<T, U>(iLabel, false, true, writeToCfi);
262  }

◆ labelsFromOptionalUntracked() [2/2]

template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptionalUntracked ( U const &  iLabel,
bool  writeToCfi,
V const &  desc 
)
inline

Definition at line 288 of file ParameterSetDescription.h.

288  {
289  return labelsFrom<T, U, V>(iLabel, false, true, writeToCfi, desc);
290  }

References submitPVResolutionJobs::desc.

◆ labelsFromUntracked() [1/2]

template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromUntracked ( U const &  iLabel)
inline

Definition at line 250 of file ParameterSetDescription.h.

250  {
251  return labelsFrom<T, U>(iLabel, false, false, true);
252  }

◆ labelsFromUntracked() [2/2]

template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromUntracked ( U const &  iLabel,
V const &  desc 
)
inline

Definition at line 278 of file ParameterSetDescription.h.

278  {
279  return labelsFrom<T, U, V>(iLabel, false, false, true, desc);
280  }

References submitPVResolutionJobs::desc.

◆ print()

void ParameterSetDescription::print ( std::ostream &  os,
DocFormatHelper dfh 
) const

Definition at line 146 of file ParameterSetDescription.cc.

146  {
147  using std::placeholders::_1;
148  if (isUnknown()) {
149  dfh.indent(os);
150  os << "Description is unknown. The configured PSet will not be validated\n";
151  dfh.indent(os);
152  os << "because the plugin has not defined this parameter set description.\n";
153  if (!dfh.brief())
154  os << "\n";
155  }
156 
157  if (anythingAllowed()) {
158  dfh.indent(os);
159  os << "Description allows anything. If the configured PSet contains illegal parameters,\n";
160  dfh.indent(os);
161  os << "then validation will ignore them instead of throwing an exception.\n";
162  if (!dfh.brief())
163  os << "\n";
164  }
165 
166  if (entries_.empty()) {
167  dfh.indent(os);
168  os << "Description is empty\n";
169  if (!dfh.brief())
170  os << "\n";
171  return;
172  }
173 
174  // Zeroth pass is only to calculate column widths in advance of any printing
175  dfh.setPass(0);
176  dfh.setCounter(0);
177  for_all(entries_, std::bind(&ParameterSetDescription::printNode, _1, std::ref(os), std::ref(dfh)));
178 
179  // First pass prints top level parameters and references to structure
180  dfh.setPass(1);
181  dfh.setCounter(0);
182  for_all(entries_, std::bind(&ParameterSetDescription::printNode, _1, std::ref(os), std::ref(dfh)));
183 
184  // Second pass prints substructure that goes into different sections of the
185  // output document
186  dfh.setPass(2);
187  dfh.setCounter(0);
188  for_all(entries_, std::bind(&ParameterSetDescription::printNode, _1, std::ref(os), std::ref(dfh)));
189  }

References anythingAllowed(), edm::DocFormatHelper::brief(), entries_, edm::for_all(), edm::DocFormatHelper::indent(), isUnknown(), printNode(), edm::DocFormatHelper::setCounter(), and edm::DocFormatHelper::setPass().

Referenced by edm::ParameterWildcardWithSpecifics::printNestedContent_(), and edm::ParameterDescription< std::vector< ParameterSet > >::printNestedContent_().

◆ printNode()

void ParameterSetDescription::printNode ( SetDescriptionEntry const &  entry,
std::ostream &  os,
DocFormatHelper dfh 
)
staticprivate

Definition at line 227 of file ParameterSetDescription.cc.

227  {
228  if (dfh.pass() < 2) {
229  entry.node()->print(os, entry.optional(), entry.writeToCfi(), dfh);
230  } else {
231  entry.node()->printNestedContent(os, entry.optional(), dfh);
232  }
233  }

References mps_splice::entry, and edm::DocFormatHelper::pass().

Referenced by print().

◆ reserve()

void edm::ParameterSetDescription::reserve ( SetDescriptionEntries::size_type  n)
inline

Definition at line 301 of file ParameterSetDescription.h.

301 { entries_.reserve(n); }

References entries_, and dqmiodumpmetadata::n.

Referenced by EcalRecHitProducer::fillDescriptions().

◆ setAllowAnything()

void ParameterSetDescription::setAllowAnything ( )

◆ setComment() [1/2]

void ParameterSetDescription::setComment ( char const *  value)

Definition at line 35 of file ParameterSetDescription.cc.

35 { comment_ = value; }

References comment_, and relativeConstraints::value.

Referenced by ConfigToolBase.ConfigToolBase::apply().

◆ setComment() [2/2]

void ParameterSetDescription::setComment ( std::string const &  value)

◆ setUnknown()

void ParameterSetDescription::setUnknown ( )

◆ throwIfLabelsAlreadyUsed()

void ParameterSetDescription::throwIfLabelsAlreadyUsed ( std::set< std::string > const &  nodeLabels)
private

Definition at line 235 of file ParameterSetDescription.cc.

235  {
236  std::set<std::string> duplicateLabels;
237  std::insert_iterator<std::set<std::string> > insertIter(duplicateLabels, duplicateLabels.begin());
238  std::set_intersection(nodeLabels.begin(), nodeLabels.end(), usedLabels_.begin(), usedLabels_.end(), insertIter);
239  if (duplicateLabels.empty()) {
240  usedLabels_.insert(nodeLabels.begin(), nodeLabels.end());
241  } else {
242  std::stringstream ss;
243  for (std::set<std::string>::const_iterator iter = duplicateLabels.begin(), iEnd = duplicateLabels.end();
244  iter != iEnd;
245  ++iter) {
246  ss << " \"" << *iter << "\"\n";
247  }
248  throw edm::Exception(errors::LogicError) << "Labels used in different nodes of a ParameterSetDescription\n"
249  << "must be unique. The following duplicate labels were detected:\n"
250  << ss.str() << "\n";
251  }
252  }

References Exception, edm::errors::LogicError, contentValuesCheck::ss, and usedLabels_.

Referenced by addNode().

◆ throwIfWildcardCollision()

void ParameterSetDescription::throwIfWildcardCollision ( std::set< ParameterTypes > const &  nodeParameterTypes,
std::set< ParameterTypes > const &  nodeWildcardTypes 
)
private

Definition at line 254 of file ParameterSetDescription.cc.

255  {
256  // 1. Check that the new wildcard types do not collide with the existing
257  // parameter types.
258  // 2. Check that the new parameter types do not collide with the existing
259  // wildcard types.
260  // 3. Then insert them.
261  // The order of those steps is important because a wildcard with a default
262  // value could insert a type in both sets and this is OK.
263 
264  // We assume the node already checked for collisions between the new parameter
265  // types and the new wildcard types before passing the sets to this function.
266 
267  if (!nodeWildcardTypes.empty()) {
268  std::set<ParameterTypes> duplicateTypes1;
269  std::insert_iterator<std::set<ParameterTypes> > insertIter1(duplicateTypes1, duplicateTypes1.begin());
270  std::set_intersection(typesUsedForParameters_.begin(),
272  nodeWildcardTypes.begin(),
273  nodeWildcardTypes.end(),
274  insertIter1);
275 
276  if (!duplicateTypes1.empty()) {
277  std::stringstream ss;
278  for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes1.begin(), iEnd = duplicateTypes1.end();
279  iter != iEnd;
280  ++iter) {
281  ss << " \"" << parameterTypeEnumToString(*iter) << "\"\n";
282  }
284  << "Within a ParameterSetDescription, the type used for a wildcard must\n"
285  << "not be the same as the type used for other parameters. This rule\n"
286  << "is violated for the following types:\n"
287  << ss.str() << "\n";
288  }
289  }
290 
291  if (!typesUsedForWildcards_.empty()) {
292  std::set<ParameterTypes> duplicateTypes2;
293  std::insert_iterator<std::set<ParameterTypes> > insertIter2(duplicateTypes2, duplicateTypes2.begin());
294  std::set_intersection(typesUsedForWildcards_.begin(),
296  nodeParameterTypes.begin(),
297  nodeParameterTypes.end(),
298  insertIter2);
299 
300  if (!duplicateTypes2.empty()) {
301  std::stringstream ss;
302  for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes2.begin(), iEnd = duplicateTypes2.end();
303  iter != iEnd;
304  ++iter) {
305  ss << " \"" << parameterTypeEnumToString(*iter) << "\"\n";
306  }
308  << "Within a ParameterSetDescription, the type used for a wildcard must\n"
309  << "not be the same as the type used for other parameters. This rule is\n"
310  << "violated for the following types :\n"
311  << ss.str() << "\n";
312  }
313  }
314 
315  typesUsedForParameters_.insert(nodeParameterTypes.begin(), nodeParameterTypes.end());
316  typesUsedForWildcards_.insert(nodeWildcardTypes.begin(), nodeWildcardTypes.end());
317  }

References Exception, edm::errors::LogicError, edm::parameterTypeEnumToString(), contentValuesCheck::ss, typesUsedForParameters_, and typesUsedForWildcards_.

Referenced by addNode().

◆ throwIllegalParameters()

void ParameterSetDescription::throwIllegalParameters ( std::vector< std::string > const &  parameterNames,
std::set< std::string > const &  validatedNames 
)
staticprivate

Definition at line 195 of file ParameterSetDescription.cc.

196  {
197  std::set<std::string> parNames(parameterNames.begin(), parameterNames.end());
198 
199  std::set<std::string> diffNames;
200  std::insert_iterator<std::set<std::string> > insertIter(diffNames, diffNames.begin());
201  std::set_difference(parNames.begin(), parNames.end(), validatedLabels.begin(), validatedLabels.end(), insertIter);
202 
203  std::stringstream ss;
204  for (std::set<std::string>::const_iterator iter = diffNames.begin(), iEnd = diffNames.end(); iter != iEnd; ++iter) {
205  ss << " '" << *iter << "'\n";
206  }
207  if (diffNames.size() == 1U) {
209  << "Illegal parameter found in configuration. The parameter is named:\n"
210  << ss.str() << "You could be trying to use a parameter name that is not\n"
211  << "allowed for this plugin or it could be misspelled.\n";
212  } else {
214  << "Illegal parameters found in configuration. The parameters are named:\n"
215  << ss.str() << "You could be trying to use parameter names that are not\n"
216  << "allowed for this plugin or they could be misspelled.\n";
217  }
218  }

References edm::errors::Configuration, Exception, HcalResponse_cfi::parNames, contentValuesCheck::ss, and mitigatedMETSequence_cff::U.

Referenced by validate().

◆ validate()

void ParameterSetDescription::validate ( ParameterSet pset) const

Definition at line 78 of file ParameterSetDescription.cc.

78  {
79  using std::placeholders::_1;
80  if (unknown_)
81  return;
82 
83  std::set<std::string> validatedLabels;
84  for_all(entries_, std::bind(&ParameterSetDescription::validateNode, _1, std::ref(pset), std::ref(validatedLabels)));
85 
86  std::vector<std::string> parameterNames = pset.getParameterNames();
87  if (validatedLabels.size() != parameterNames.size()) {
88  // Three labels will be magically inserted into the top level
89  // of a module ParameterSet even though they are not in the
90  // python configuration files. If these are present, then
91  // assume they are OK and count them as validated.
92 
93  std::string module_label("@module_label");
94  if (pset.exists(module_label)) {
95  validatedLabels.insert(module_label);
96  }
97 
98  std::string module_type("@module_type");
99  if (pset.exists(module_type)) {
100  validatedLabels.insert(module_type);
101  }
102 
103  std::string module_edm_type("@module_edm_type");
104  if (pset.exists(module_edm_type)) {
105  validatedLabels.insert(module_edm_type);
106  }
107 
108  std::string service_type("@service_type");
109  if (pset.exists(service_type)) {
110  validatedLabels.insert(service_type);
111  }
112 
113  // Try again
114  if (validatedLabels.size() != parameterNames.size()) {
116  throwIllegalParameters(parameterNames, validatedLabels);
117  }
118  }
119  }
120  }

References anythingAllowed(), entries_, edm::for_all(), muonDTDigis_cfi::pset, AlCaHLTBitMon_QueryRunRegistry::string, edm::IllegalParameters::throwAnException(), throwIllegalParameters(), unknown_, and validateNode().

Referenced by edm::ConfigurationDescriptions::validate(), and edm::ParameterWildcardWithSpecifics::validateDescription().

◆ validateNode()

void ParameterSetDescription::validateNode ( SetDescriptionEntry const &  entry,
ParameterSet pset,
std::set< std::string > &  validatedNames 
)
staticprivate

Definition at line 140 of file ParameterSetDescription.cc.

142  {
143  entry.node()->validate(pset, validatedLabels, entry.optional());
144  }

References mps_splice::entry, and muonDTDigis_cfi::pset.

Referenced by validate().

◆ writeCfi()

void ParameterSetDescription::writeCfi ( std::ostream &  os,
bool  startWithComma,
int  indentation 
) const

Definition at line 122 of file ParameterSetDescription.cc.

122  {
123  using std::placeholders::_1;
124  bool wroteSomething = false;
125 
128  _1,
129  std::ref(os),
130  std::ref(startWithComma),
131  indentation,
132  std::ref(wroteSomething)));
133 
134  if (wroteSomething) {
135  char oldFill = os.fill();
136  os << "\n" << std::setfill(' ') << std::setw(indentation - 2) << "" << std::setfill(oldFill);
137  }
138  }

References entries_, edm::for_all(), printContent_cfi::indentation, and writeNode().

Referenced by edm::ParameterDescription< std::vector< ParameterSet > >::writeOneElementToCfi().

◆ writeNode()

void ParameterSetDescription::writeNode ( SetDescriptionEntry const &  entry,
std::ostream &  os,
bool &  startWithComma,
int  indentation,
bool &  wroteSomething 
)
staticprivate

Definition at line 220 of file ParameterSetDescription.cc.

221  {
222  if (entry.writeToCfi()) {
223  entry.node()->writeCfi(os, entry.optional(), startWithComma, indentation, wroteSomething);
224  }
225  }

References mps_splice::entry, and printContent_cfi::indentation.

Referenced by writeCfi().

Member Data Documentation

◆ anythingAllowed_

bool edm::ParameterSetDescription::anythingAllowed_
private

Definition at line 371 of file ParameterSetDescription.h.

Referenced by anythingAllowed(), and setAllowAnything().

◆ comment_

std::string edm::ParameterSetDescription::comment_
private

Definition at line 379 of file ParameterSetDescription.h.

Referenced by comment(), and setComment().

◆ entries_

SetDescriptionEntries edm::ParameterSetDescription::entries_
private

Definition at line 373 of file ParameterSetDescription.h.

Referenced by addNode(), begin(), end(), print(), reserve(), validate(), and writeCfi().

◆ typesUsedForParameters_

std::set<ParameterTypes> edm::ParameterSetDescription::typesUsedForParameters_
private

Definition at line 376 of file ParameterSetDescription.h.

Referenced by throwIfWildcardCollision().

◆ typesUsedForWildcards_

std::set<ParameterTypes> edm::ParameterSetDescription::typesUsedForWildcards_
private

Definition at line 377 of file ParameterSetDescription.h.

Referenced by throwIfWildcardCollision().

◆ unknown_

bool edm::ParameterSetDescription::unknown_
private

Definition at line 372 of file ParameterSetDescription.h.

Referenced by isUnknown(), setUnknown(), and validate().

◆ usedLabels_

std::set<std::string> edm::ParameterSetDescription::usedLabels_
private

Definition at line 375 of file ParameterSetDescription.h.

Referenced by isLabelUnused(), and throwIfLabelsAlreadyUsed().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
edm::ParameterSetDescription::validateNode
static void validateNode(SetDescriptionEntry const &entry, ParameterSet &pset, std::set< std::string > &validatedNames)
Definition: ParameterSetDescription.cc:140
edm::errors::LogicError
Definition: EDMException.h:37
mps_splice.entry
entry
Definition: mps_splice.py:68
edm::ParameterSetDescription::unknown_
bool unknown_
Definition: ParameterSetDescription.h:372
Types.optional
optional
Definition: Types.py:198
edm::ParameterSetDescription::throwIllegalParameters
static void throwIllegalParameters(std::vector< std::string > const &parameterNames, std::set< std::string > const &validatedNames)
Definition: ParameterSetDescription.cc:195
edm::ParameterSetDescription::comment_
std::string comment_
Definition: ParameterSetDescription.h:379
edm::parameterTypeEnumToString
std::string parameterTypeEnumToString(ParameterTypes iType)
Definition: ParameterDescriptionNode.cc:64
edm::ParameterSetDescription::anythingAllowed_
bool anythingAllowed_
Definition: ParameterSetDescription.h:371
edm::ParameterSetDescription::throwIfWildcardCollision
void throwIfWildcardCollision(std::set< ParameterTypes > const &nodeParameterTypes, std::set< ParameterTypes > const &nodeWildcardTypes)
Definition: ParameterSetDescription.cc:254
edm::for_all
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
edm::ParameterSetDescription::throwIfLabelsAlreadyUsed
void throwIfLabelsAlreadyUsed(std::set< std::string > const &nodeLabels)
Definition: ParameterSetDescription.cc:235
edm::ParameterSetDescription::typesUsedForWildcards_
std::set< ParameterTypes > typesUsedForWildcards_
Definition: ParameterSetDescription.h:377
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
edm::ParameterSetDescription::printNode
static void printNode(SetDescriptionEntry const &entry, std::ostream &os, DocFormatHelper &dfh)
Definition: ParameterSetDescription.cc:227
edm::ParameterSetDescription::writeNode
static void writeNode(SetDescriptionEntry const &entry, std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething)
Definition: ParameterSetDescription.cc:220
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
edm::ParameterSetDescription::typesUsedForParameters_
std::set< ParameterTypes > typesUsedForParameters_
Definition: ParameterSetDescription.h:376
l1GtPatternGenerator_cfi.defaults
defaults
Definition: l1GtPatternGenerator_cfi.py:93
edm::ParameterSetDescription::anythingAllowed
bool anythingAllowed() const
Definition: ParameterSetDescription.h:292
edm::ParameterSetDescription::isUnknown
bool isUnknown() const
Definition: ParameterSetDescription.h:293
value
Definition: value.py:1
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
edm::IllegalParameters::throwAnException
static bool throwAnException()
Definition: IllegalParameters.h:15
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSetDescription::ifExists
ParameterDescriptionNode * ifExists(ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2)
Definition: ParameterSetDescription.h:233
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
relativeConstraints.value
value
Definition: relativeConstraints.py:53
edm::ParameterSetDescription::entries_
SetDescriptionEntries entries_
Definition: ParameterSetDescription.h:373
Exception
Definition: hltDiff.cc:245
printContent_cfi.indentation
indentation
Definition: printContent_cfi.py:10
HcalResponse_cfi.parNames
parNames
Definition: HcalResponse_cfi.py:34
edm::RequireZeroOrMore
Definition: ParameterWildcardBase.h:17
edm::errors::Configuration
Definition: EDMException.h:36
label
const char * label
Definition: PFTauDecayModeTools.cc:11
edm::ParameterSetDescription::usedLabels_
std::set< std::string > usedLabels_
Definition: ParameterSetDescription.h:375
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27