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, T const &value)
 
template<typename T , typename U >
ParameterDescriptionBaseadd (U const &iLabel)
 
ParameterDescriptionNodeaddNode (ParameterDescriptionNode const &node)
 
ParameterDescriptionNodeaddNode (std::unique_ptr< ParameterDescriptionNode > node)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptional (U const &iLabel, T const &value)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptional (U const &iLabel)
 
ParameterDescriptionNodeaddOptionalNode (ParameterDescriptionNode const &node, bool writeToCfi)
 
ParameterDescriptionNodeaddOptionalNode (std::unique_ptr< ParameterDescriptionNode > node, bool writeToCfi)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptionalUntracked (U const &iLabel, T const &value)
 
template<typename T , typename U >
ParameterDescriptionBaseaddOptionalUntracked (U const &iLabel)
 
template<typename T , typename U >
ParameterDescriptionBaseaddUntracked (U const &iLabel, T const &value)
 
template<typename T , typename U >
ParameterDescriptionBaseaddUntracked (U const &iLabel)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptional (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptional (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptionalUntracked (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSetOptionalUntracked (U const &iLabel, ParameterSetDescription const &validator)
 
template<typename U >
ParameterDescriptionBaseaddVPSetUntracked (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
 
template<typename U >
ParameterDescriptionBaseaddVPSetUntracked (U const &iLabel, ParameterSetDescription const &validator)
 
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 (std::string const &value)
 
void setComment (char 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, T const &value, bool isTracked, bool isOptional, bool writeToCfi)
 
template<typename T , typename U >
ParameterDescriptionBaseadd (U const &iLabel, 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, std::vector< ParameterSet > const &defaults, bool isTracked, bool isOptional, bool writeToCfi)
 
template<typename U >
ParameterDescriptionBaseaddVPSet (U const &iLabel, ParameterSetDescription const &validator, 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 ( )

◆ ~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,
T const &  value 
)
inline

Definition at line 95 of file ParameterSetDescription.h.

References relativeConstraints::value.

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(), SeedGeneratorFromProtoTracksEDProducer::fillDescriptions(), Phase2ITRecHitHarvester::fillDescriptions(), L1TEnergySumFilterT< T >::fillDescriptions(), VertexAssociatorByTracksProducer::fillDescriptions(), L1TJetFilterT< T >::fillDescriptions(), ECFAdder::fillDescriptions(), HGCRecHitNavigator< D1, hgcee, D2, hgchef, D3, hgcheb >::fillDescriptions(), PixelVertexCollectionTrimmer::fillDescriptions(), PFRecoTauDiscriminationByLeadingObjectPtCut::fillDescriptions(), ParticleBasedIsoProducer::fillDescriptions(), CTPPSOpticalFunctionsESSource::fillDescriptions(), TrackerGeometricDetESModule::fillDescriptions(), HBHEDarkeningEP::fillDescriptions(), HcalTimeSlewEP::fillDescriptions(), MTDGeometricTimingDetESModule::fillDescriptions(), HPSPFTauProducer::fillDescriptions(), PPSFilteredProtonProducer::fillDescriptions(), PFTauDiscriminatorLogicalAndProducer::fillDescriptions(), SeedCreatorFromRegionHitsEDProducerT< T_SeedCreator >::fillDescriptions(), L1TPFTauFilter::fillDescriptions(), Phase2L1TGMTStubProducer::fillDescriptions(), MVAJetPuIdProducer::fillDescriptions(), EcalRecHitParametersGPUESProducer::fillDescriptions(), L1TTkMuonFilter::fillDescriptions(), PFRecoTauDiscriminationByHPSSelection::fillDescriptions(), GlobalTrackingRegionProducer::fillDescriptions(), OnlineBeamSpotESProducer::fillDescriptions(), TICLCandidateFromTrackstersProducer::fillDescriptions(), L1THPSPFTauFilter::fillDescriptions(), L1TTkEleFilter::fillDescriptions(), L1TTkEmFilter::fillDescriptions(), RPCPointProducer::fillDescriptions(), cms::CSJetProducer::fillDescriptions(), PFRecoTauDiscriminationByNProngs::fillDescriptions(), BeamSpotAnalyzer::fillDescriptions(), L2MuonIsolationProducer::fillDescriptions(), CTPPSDiamondLocalTrackFitter::fillDescriptions(), DTUnpackingModule::fillDescriptions(), TrackingRegionsFromBeamSpotAndL2Tau::fillDescriptions(), EcalBarrelClusterFastTimer::fillDescriptions(), PixelTripletHLTGenerator::fillDescriptions(), CaloTowerFromL1TSeededCreatorForTauHLT::fillDescriptions(), EcalRecHitProducer::fillDescriptions(), GEMCSCSegmentProducer::fillDescriptions(), GlobalTrackQualityProducer::fillDescriptions(), L3MuonCombinedRelativeIsolationProducer::fillDescriptions(), TauHadronDecayFilter::fillDescriptions(), citk::PFIsolationSumProducerForPUPPI::fillDescriptions(), AlcaPCCEventProducer::fillDescriptions(), HLTPPSPerPotTrackFilter::fillDescriptions(), CaloTowerFromL1TCreatorForTauHLT::fillDescriptions(), PFRecoTauDiscriminationAgainstMuon::fillDescriptions(), MkFitProducer::fillDescriptions(), AlCaRecoTriggerBitsRcdUpdate::fillDescriptions(), HcalSimpleReconstructor::fillDescriptions(), magneticfield::DD4hep_VolumeBasedMagneticFieldESProducer::fillDescriptions(), CaloTowerCreatorForTauHLT::fillDescriptions(), ElectronSeedProducer::fillDescriptions(), TrackerDigiGeometryESModule::fillDescriptions(), HLTCaloJetIDProducer::fillDescriptions(), BeamSpotOnlineProducer::fillDescriptions(), EcalSCDynamicDPhiParametersESProducer::fillDescriptions(), EcalMustacheSCParametersESProducer::fillDescriptions(), MTDDigiGeometryESModule::fillDescriptions(), SiPixelFakeLorentzAngleESSource::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), SiStripLorentzAngleDepESProducer::fillDescriptions(), MeasurementTrackerESProducer::fillDescriptions(), edm::service::PrescaleService::fillDescriptions(), PPSAlignmentConfigurationESSource::fillDescriptions(), RunInfoTestESProducer::fillDescriptions(), HcalRecAlgoESProducer::fillDescriptions(), PFProducer::fillDescriptions(), CAHitTripletGenerator::fillDescriptions(), TotemRPUVPatternFinder::fillDescriptions(), TopMonitor::fillDescriptions(), pat::PATJetUpdater::fillDescriptions(), GlobalTrackingRegionProducerFromBeamSpot::fillDescriptions(), SiStripBackPlaneCorrectionDepESProducer::fillDescriptions(), CAHitQuadrupletGenerator::fillDescriptions(), MkFitSiStripHitConverter::fillDescriptions(), BPHWriteSpecificDecay::fillDescriptions(), citk::PFIsolationSumProducer::fillDescriptions(), TauDiscriminantCutMultiplexerT< TauType, TauTypeRef, ParentClass >::fillDescriptions(), L3MuonProducer::fillDescriptions(), BTagAndProbe::fillDescriptions(), Phase2ITMonitorCluster::fillDescriptions(), Phase2OTMonitorCluster::fillDescriptions(), AlignPCLThresholdsWriter< T >::fillDescriptions(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::fillDescriptions(), Phase1L1TJetCalibrator::fillDescriptions(), NanoAODDQM::fillDescriptions(), PFTauDecayModeCutMultiplexer::fillDescriptions(), RecoTauPiZeroProducer::fillDescriptions(), Phase2OTMonitorVectorHits::fillDescriptions(), DDDetectorESProducer::fillDescriptions(), EgammaHLTNxNClusterProducer::fillDescriptions(), FastjetJetProducer::fillDescriptions(), Phase2ITMonitorRecHit::fillDescriptions(), CTPPSCompositeESSource::fillDescriptions(), TemplatedVertexArbitrator< InputContainer, VTX >::fillDescriptions(), SiStripChannelGainFromDBMiscalibrator::fillDescriptions(), L2MuonProducer::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), RecoTauProducer::fillDescriptions(), ConversionTrackCandidateProducer::fillDescriptions(), SiStripNoisesFromDBMiscalibrator::fillDescriptions(), Phase2ITValidateCluster::fillDescriptions(), Phase2OTMonitorRecHit::fillDescriptions(), BTagProbabilityToDiscriminator::fillDescriptions(), GlobalTrackingRegionWithVerticesProducer::fillDescriptions(), Phase2OTValidateCluster::fillDescriptions(), HcalHardcodeCalibrations::fillDescriptions(), HLTGenValSource::fillDescriptions(), cms::PFMETProducer::fillDescriptions(), PFECALSuperClusterProducer::fillDescriptions(), CorrectedECALPFClusterProducer::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), PrimaryVertexProducer::fillDescriptions(), PFRecoTauChargedHadronProducer::fillDescriptions(), EopTreeWriter::fillDescriptions(), DiMuonVertexValidation::fillDescriptions(), ApeTreeCreateDefault::fillDescriptions(), HITrackingRegionForPrimaryVtxProducer::fillDescriptions(), L1TrackSelectionProducer::fillDescriptions(), AreaSeededTrackingRegionsProducer::fillDescriptions(), DiElectronVertexValidation::fillDescriptions(), TauRegionalPixelSeedGenerator::fillDescriptions(), ExternalLHEProducer::fillDescriptions(), PFRecoTauDiscriminationAgainstElectron2::fillDescriptions(), DiMuonMassBiasMonitor::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), SiPixelStatusProducer::fillDescriptions(), pat::JetCorrFactorsProducer::fillDescriptions(), PrimaryVertexValidation::fillDescriptions(), MuonIdProducer::fillDescriptions(), EgammaHLTExtraProducer::fillDescriptions(), EgammaHLTPhase2ExtraProducer::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), reco::tau::RecoTauQualityCuts::fillDescriptions(), TrackingRegionsFromSuperClustersProducer::fillDescriptions(), EgammaHLTFilteredObjProducer< OutCollType >::fillDescriptions(), SiStripCondVisualizer::fillDescriptions(), SiPixelGainCalibScaler::fillDescriptions(), HLTCaloObjInRegionsProducer< CaloObjType, CaloObjCollType >::fillDescriptions(), DTTrigPhase2Prod::fillDescriptions(), HLTRecHitInAllL1RegionsProducer< RecHitType >::fillDescriptions(), CandidateSeededTrackingRegionsProducer::fillDescriptions(), GsfElectronProducer::fillDescriptions(), IsolatedTracksCone::fillDescriptions(), PointSeededTrackingRegionsProducer::fillDescriptions(), L1MuonSeededTrackingRegionsProducer::fillDescriptions(), CandidatePointSeededTrackingRegionsProducer::fillDescriptions(), TopProjector< Top, Bottom, Matcher >::fillDescriptions(), L2TauNNProducer::fillDescriptions(), PFRecoTauDiscriminationByIsolation::fillDescriptions(), pat::PATJetSelector::fillDescriptions(), PFRecoTauDiscriminationByIsolationContainer::fillDescriptions(), SimpleFlatTableProducer< T >::fillDescriptions(), RecoTauCleanerImpl< Prod >::fillDescriptions(), DeepTauId::fillDescriptions(), GenWeightsTableProducer::fillDescriptions(), PrimaryVertexSorter< ParticlesCollection >::fillDescriptionsCommon(), PuppiAlgo::fillDescriptionsPuppiAlgo(), TotemTimingLocalTrackFitter< T >::fillDescriptionsShared(), edm::fillOptionsDescription(), TauDiscriminationProducerBase< TauType, TauDiscriminator >::fillProducerDescriptions(), MaxConsecLostHitsTrajectoryFilter::fillPSetDescription(), MaxLostHitsTrajectoryFilter::fillPSetDescription(), MuonCkfTrajectoryBuilder::fillPSetDescription(), SeedExtensionTrajectoryFilter::fillPSetDescription(), LostHitsFractionTrajectoryFilter::fillPSetDescription(), MaxHitsTrajectoryFilter::fillPSetDescription(), MaxCCCLostHitsTrajectoryFilter::fillPSetDescription(), PFMuonAlgo::fillPSetDescription(), ChargeSignificanceTrajectoryFilter::fillPSetDescription(), LooperTrajectoryFilter::fillPSetDescription(), ticl::PatternRecognitionbyCLUE3D< TILES >::fillPSetDescription(), ClusterShapeTrajectoryFilter::fillPSetDescription(), ThresholdPtTrajectoryFilter::fillPSetDescription(), ticl::PatternRecognitionbyCA< TILES >::fillPSetDescription(), MinHitsTrajectoryFilter::fillPSetDescription(), GroupedCkfTrajectoryBuilder::fillPSetDescription(), ticl::PatternRecognitionbyFastJet< TILES >::fillPSetDescription(), MinPtTrajectoryFilter::fillPSetDescription(), PFEGammaFilters::fillPSetDescription(), StripSubClusterShapeFilterBase::fillPSetDescription(), CkfTrajectoryBuilder::fillPSetDescription(), cms::CkfTrackCandidateMakerBase::fillPSetDescription(), Phase2ITValidateRecHitBase::fillPSetDescription(), TritonClient::fillPSetDescription(), Phase2OTValidateRecHitBase::fillPSetDescription(), BaseCkfTrajectoryBuilder::fillPSetDescription(), PFCandConnector::fillPSetDescription(), HGCalCLUEAlgoT< TILE >::fillPSetDescription(), HGCalImagingAlgo::fillPSetDescription(), PFTauPrimaryVertexProducerBase::getDescriptionsBase(), HLTDQMTagAndProbeEff< TagType, TagCollType, ProbeType, ProbeCollType >::makePSetDescription(), edm::eventsetup::DataProxyProvider::prevalidate(), counter.Counter::register(), SequenceTypes._TaskBase::remove(), and SequenceTypes._TaskBase::replace().

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

◆ add() [2/4]

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

Definition at line 118 of file ParameterSetDescription.h.

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

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

◆ add() [3/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.

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

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ add() [4/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.

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

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ 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.

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

46  {
47  return addNode(std::move(node), false, true);
48  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ addNode() [3/3]

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

Definition at line 61 of file ParameterSetDescription.cc.

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

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  }
void throwIfWildcardCollision(std::set< ParameterTypes > const &nodeParameterTypes, std::set< ParameterTypes > const &nodeWildcardTypes)
void throwIfLabelsAlreadyUsed(std::set< std::string > const &nodeLabels)
optional
Definition: Types.py:198
def move(src, dest)
Definition: eostools.py:511

◆ addOptional() [1/2]

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

Definition at line 105 of file ParameterSetDescription.h.

References relativeConstraints::value.

Referenced by pat::helper::KinResolutionsLoader::fillDescription(), edm::EventSelector::fillDescription(), pat::PATUserDataMerger< pat::Jet, pat::helper::AddUserInt >::fillDescription(), citk::PFIsolationSumProducerForPUPPI::fillDescriptions(), PFRecoTauDiscriminationAgainstMuon::fillDescriptions(), SiPixelFakeLorentzAngleESSource::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), pat::PATJetUpdater::fillDescriptions(), citk::PFIsolationSumProducer::fillDescriptions(), SiPixelRawToClusterCUDA::fillDescriptions(), RecoTauPiZeroProducer::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), RecoTauProducer::fillDescriptions(), SiPixelRawToDigi::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), PFRecoTauChargedHadronProducer::fillDescriptions(), PFRecoTauDiscriminationAgainstElectron2::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), reco::tau::RecoTauQualityCuts::fillDescriptions(), PFRecoTauDiscriminationByIsolation::fillDescriptions(), PFRecoTauDiscriminationByIsolationContainer::fillDescriptions(), RecoTauCleanerImpl< Prod >::fillDescriptions(), DeepTauId::fillDescriptions(), and TauDiscriminationProducerBase< TauType, TauDiscriminator >::fillProducerDescriptions().

105  {
106  return add<T, U>(iLabel, value, true, true, true);
107  }

◆ addOptional() [2/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  }

◆ addOptionalNode() [1/2]

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

Definition at line 50 of file ParameterSetDescription.cc.

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

Referenced by ecaldqm::binning::fillAxisDescriptions(), and SimpleFlatTableProducer< T >::fillDescriptions().

51  {
52  std::unique_ptr<ParameterDescriptionNode> clonedNode(node.clone());
53  return addNode(std::move(clonedNode), true, writeToCfi);
54  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ addOptionalNode() [2/2]

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

Definition at line 56 of file ParameterSetDescription.cc.

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

57  {
58  return addNode(std::move(node), true, writeToCfi);
59  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ addOptionalUntracked() [1/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.

References relativeConstraints::value.

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

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

◆ addOptionalUntracked() [2/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  }

◆ addUntracked() [1/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.

References relativeConstraints::value.

Referenced by ecaldqm::binning::fillAxisDescriptions(), BeamFitter::fillDescription(), PVFitter::fillDescription(), edm::PoolOutputModule::fillDescription(), edm::TestSource::fillDescriptions(), ecaldqm::DQWorkerClient::fillDescriptions(), ecaldqm::EcalDQMonitor::fillDescriptions(), BeamSpotAnalyzer::fillDescriptions(), SiStripDetVOffPrinter::fillDescriptions(), DTUnpackingModule::fillDescriptions(), CaloTowerFromL1TSeededCreatorForTauHLT::fillDescriptions(), OnlineBeamMonitor::fillDescriptions(), GEMCSCSegmentProducer::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(), FastSiPixelFEDChannelContainerFromQuality::fillDescriptions(), MCMisalignmentScaler::fillDescriptions(), ecaldqm::DQWorker::fillDescriptions(), SiPixelStatusProducer::fillDescriptions(), DTTrigPhase2Prod::fillDescriptions(), TritonService::fillDescriptions(), L1MuonSeededTrackingRegionsProducer::fillDescriptions(), TopProjector< Top, Bottom, Matcher >::fillDescriptions(), FastTimerService::fillDescriptions(), TrackingNtuple::fillDescriptions(), ecaldqm::fillMESetDescriptions(), edm::fillOptionsDescription(), StripSubClusterShapeFilterBase::fillPSetDescription(), TritonClient::fillPSetDescription(), HGCalCLUEAlgoT< TILE >::fillPSetDescription(), and HGCalImagingAlgo::fillPSetDescription().

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

◆ addUntracked() [2/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  }

◆ addVPSet() [1/4]

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

◆ addVPSet() [2/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() [3/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.

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ addVPSet() [4/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.

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ addVPSetOptional() [1/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.

References l1GtPatternGenerator_cfi::defaults.

Referenced by RecoTauProducer::fillDescriptions().

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

◆ addVPSetOptional() [2/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  }

◆ addVPSetOptionalUntracked() [1/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.

References l1GtPatternGenerator_cfi::defaults.

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

◆ addVPSetOptionalUntracked() [2/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  }

◆ addVPSetUntracked() [1/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.

References l1GtPatternGenerator_cfi::defaults.

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

◆ addVPSetUntracked() [2/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  }

◆ addWildcard() [1/2]

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

Definition at line 199 of file ParameterSetDescription.h.

References topSingleLeptonDQM_PU_cfi::pattern.

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

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

◆ 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.

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
def move(src, dest)
Definition: eostools.py:511

◆ 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.

References anythingAllowed_.

Referenced by print(), and validate().

◆ begin()

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

Definition at line 295 of file ParameterSetDescription.h.

References entries_.

295 { return entries_.begin(); }

◆ comment()

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

Definition at line 78 of file ParameterSetDescription.h.

References comment_.

78 { return comment_; }

◆ end()

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

Definition at line 297 of file ParameterSetDescription.h.

References entries_.

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

297 { return entries_.end(); }

◆ ifExists() [1/2]

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

Definition at line 233 of file ParameterSetDescription.h.

Referenced by ifExistsOptional().

233  {
234  return ifExists(node1, node2, false, true);
235  }
ParameterDescriptionNode * ifExists(ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2)

◆ 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.

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

322  {
323  std::unique_ptr<ParameterDescriptionNode> pdIfExists = std::make_unique<IfExistsDescription>(node1, node2);
324  return addNode(std::move(pdIfExists), optional, writeToCfi);
325  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
optional
Definition: Types.py:198
def move(src, dest)
Definition: eostools.py:511

◆ ifExistsOptional()

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

Definition at line 237 of file ParameterSetDescription.h.

References ifExists().

239  {
240  return ifExists(node1, node2, true, writeToCfi);
241  }
ParameterDescriptionNode * ifExists(ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2)

◆ 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.

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
optional
Definition: Types.py:198
def move(src, dest)
Definition: eostools.py:511

◆ 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.

References eostools::move().

228  {
229  return ifValue<T>(switchParameter, std::move(cases), true, writeToCfi);
230  }
def move(src, dest)
Definition: eostools.py:511

◆ isLabelUnused()

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

Definition at line 191 of file ParameterSetDescription.cc.

References label, and usedLabels_.

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

191  {
192  return usedLabels_.find(label) == usedLabels_.end();
193  }
std::set< std::string > usedLabels_
char const * label

◆ isUnknown()

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

Definition at line 293 of file ParameterSetDescription.h.

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 , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFrom ( U const &  iLabel,
V const &  desc 
)
inline

Definition at line 273 of file ParameterSetDescription.h.

References submitPVResolutionJobs::desc.

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

◆ labelsFrom() [3/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.

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

452  {
453  std::unique_ptr<ParameterDescriptionNode> pd = std::make_unique<AllowedLabelsDescription<T>>(iLabel, isTracked);
454  return addNode(std::move(pd), optional, writeToCfi);
455  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
optional
Definition: Types.py:198
def move(src, dest)
Definition: eostools.py:511

◆ labelsFrom() [4/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.

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

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  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
optional
Definition: Types.py:198
def move(src, dest)
Definition: eostools.py:511

◆ 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.

References submitPVResolutionJobs::desc.

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

◆ 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.

References submitPVResolutionJobs::desc.

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

◆ 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.

References submitPVResolutionJobs::desc.

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

◆ print()

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

Definition at line 146 of file ParameterSetDescription.cc.

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_(), edm::PluginDescription< T >::printNestedContent_(), and edm::ParameterDescription< std::vector< ParameterSet > >::printNestedContent_().

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  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
static void printNode(SetDescriptionEntry const &entry, std::ostream &os, DocFormatHelper &dfh)

◆ printNode()

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

Definition at line 227 of file ParameterSetDescription.cc.

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

Referenced by print().

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  }

◆ reserve()

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

Definition at line 301 of file ParameterSetDescription.h.

References entries_, and dqmiodumpmetadata::n.

Referenced by EcalRecHitProducer::fillDescriptions().

◆ setAllowAnything()

void ParameterSetDescription::setAllowAnything ( )

◆ setComment() [1/2]

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

◆ setComment() [2/2]

void ParameterSetDescription::setComment ( char 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.

References Exception, edm::errors::LogicError, DBoxMetadataHelper::set_intersection(), contentValuesCheck::ss, and usedLabels_.

Referenced by addNode().

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  }
std::set< std::string > usedLabels_
std::vector< std::string > set_intersection(std::vector< std::string > const &v1, std::vector< std::string > const &v2)

◆ throwIfWildcardCollision()

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

Definition at line 254 of file ParameterSetDescription.cc.

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

Referenced by addNode().

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());
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());
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  }
std::string parameterTypeEnumToString(ParameterTypes iType)
std::set< ParameterTypes > typesUsedForParameters_
std::set< ParameterTypes > typesUsedForWildcards_
std::vector< std::string > set_intersection(std::vector< std::string > const &v1, std::vector< std::string > const &v2)

◆ 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.

References edm::errors::Configuration, Exception, HcalResponse_cfi::parNames, DBoxMetadataHelper::set_difference(), contentValuesCheck::ss, and mitigatedMETSequence_cff::U.

Referenced by validate().

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  }
std::vector< std::string > set_difference(std::vector< std::string > const &v1, std::vector< std::string > const &v2)

◆ validate()

void ParameterSetDescription::validate ( ParameterSet pset) const

Definition at line 78 of file ParameterSetDescription.cc.

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

Referenced by edm::ConfigurationDescriptions::validate(), edm::PluginDescription< T >::validate_(), and edm::ParameterWildcardWithSpecifics::validateDescription().

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  }
static void throwIllegalParameters(std::vector< std::string > const &parameterNames, std::set< std::string > const &validatedNames)
static bool throwAnException()
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14
static void validateNode(SetDescriptionEntry const &entry, ParameterSet &pset, std::set< std::string > &validatedNames)

◆ validateNode()

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

Definition at line 140 of file ParameterSetDescription.cc.

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

Referenced by validate().

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

◆ writeCfi()

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

Definition at line 122 of file ParameterSetDescription.cc.

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

Referenced by edm::PluginDescription< T >::writeCfi_(), and edm::ParameterDescription< std::vector< ParameterSet > >::writeOneElementToCfi().

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  }
static void writeNode(SetDescriptionEntry const &entry, std::ostream &os, bool &startWithComma, int indentation, bool &wroteSomething)
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14

◆ 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.

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

Referenced by writeCfi().

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

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().