CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< SetDescriptionEntry
SetDescriptionEntries
 

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::auto_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::auto_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::auto_ptr< ParameterDescriptionCases< T > > cases)
 
template<typename T >
ParameterDescriptionNodeifValueOptional (ParameterDescription< T > const &switchParameter, std::auto_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::auto_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::auto_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 50 of file ParameterSetDescription.h.

Member Typedef Documentation

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

Definition at line 67 of file ParameterSetDescription.h.

Definition at line 66 of file ParameterSetDescription.h.

Constructor & Destructor Documentation

ParameterSetDescription::ParameterSetDescription ( )

Definition at line 31 of file ParameterSetDescription.cc.

ParameterSetDescription::~ParameterSetDescription ( )
virtual

Definition at line 36 of file ParameterSetDescription.cc.

36  {
37  }

Member Function Documentation

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

Definition at line 89 of file ParameterSetDescription.h.

References relativeConstraints::value.

Referenced by ConeIsolationAlgorithm::fillDescription(), GsfElectronBaseProducer::fillDescription(), GsfElectronCoreBaseProducer::fillDescription(), pat::helper::KinResolutionsLoader::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), pat::PATUserDataMerger< ObjectType, Operation >::fillDescription(), edm::fillDescriptionFromPSet(), GEDGsfElectronCoreProducer::fillDescriptions(), HLTDynamicPrescaler::fillDescriptions(), edm::Prescaler::fillDescriptions(), HLTDiMuonGlbTrkFilter::fillDescriptions(), edm::EventAuxiliaryHistoryProducer::fillDescriptions(), HLTDisplacedmumuFilter::fillDescriptions(), HLTEcalIsolationFilter::fillDescriptions(), HLTDisplacedmumumuFilter::fillDescriptions(), HLTPixelActivityFilter::fillDescriptions(), HLTTrackSeedMultiplicityFilter::fillDescriptions(), HLTPixelClusterShapeFilter::fillDescriptions(), HLTPFJetIDProducer::fillDescriptions(), SeedGeneratorFromProtoTracksEDProducer::fillDescriptions(), HLTPixelIsolTrackFilter::fillDescriptions(), HLTCaloJetIDProducer::fillDescriptions(), HLTMuonTrackMassFilter::fillDescriptions(), TrackerGeometricDetESModule::fillDescriptions(), HLTCSCRing2or3Filter::fillDescriptions(), HLTCSCOverlapFilter::fillDescriptions(), HcalTrigTowerGeometryESProducer::fillDescriptions(), TrackerDigiGeometryESModule::fillDescriptions(), HLTElectronMissingHitsFilter::fillDescriptions(), HLTHcalNoiseFilter::fillDescriptions(), FastTimerFilter::fillDescriptions(), HLTHemiDPhiFilter::fillDescriptions(), HLTPFTauPairLeadTrackDzMatchFilter::fillDescriptions(), HLTRPCFilter::fillDescriptions(), FTSLuminosityFromPileupSummaryInfo::fillDescriptions(), FTSLuminosityFromPixelClusters::fillDescriptions(), FTSLuminosityFromScalers::fillDescriptions(), HLTForwardBackwardJetsFilter< T >::fillDescriptions(), HLTHtMhtFilter::fillDescriptions(), EgammaHLTRechitInRegionsProducer::fillDescriptions(), HLTNVFilter::fillDescriptions(), HLTRapGapFilter::fillDescriptions(), HLTPhi2METFilter::fillDescriptions(), HLTMuonL1RegionalFilter::fillDescriptions(), HLTEgammaDoubleLegCombFilter::fillDescriptions(), HLTHcalTowerFilter::fillDescriptions(), HLT2jetGapFilter::fillDescriptions(), HLTJetPairDzMatchFilter< T >::fillDescriptions(), FTSLuminosityFromVertices::fillDescriptions(), HLTHcalMETNoiseCleaner::fillDescriptions(), HLTJetCollectionsFilter< jetType >::fillDescriptions(), HLTEgammaAllCombMassFilter::fillDescriptions(), AnyJetToCaloJetProducer::fillDescriptions(), HLTSingleVertexPixelTrackFilter::fillDescriptions(), HLTHPDFilter::fillDescriptions(), HLTJetL1MatchProducer< T >::fillDescriptions(), HLTEgammaCombMassFilter::fillDescriptions(), PFJetsMatchedToFilteredCaloJetsProducer::fillDescriptions(), FTSLuminosityFromLumiSummary::fillDescriptions(), HLTHcalLaserFilter::fillDescriptions(), HLTDeDxFilter::fillDescriptions(), EgammaHLTHybridClusterProducer::fillDescriptions(), HLTMhtProducer::fillDescriptions(), HLTMuonDimuonL3Filter::fillDescriptions(), HLTEgammaEtFilter::fillDescriptions(), HLTMuonTrimuonL3Filter::fillDescriptions(), HLTEgammaEtFilterPairs::fillDescriptions(), HLTPhysicsDeclared::fillDescriptions(), HLTElectronEtFilter::fillDescriptions(), HLTDiJetAveFilter< T >::fillDescriptions(), HLTHcalMETNoiseFilter::fillDescriptions(), HLTHcalTowerNoiseCleaner::fillDescriptions(), HLTDisplacedEgammaFilter::fillDescriptions(), EgammaHLTPFChargedIsolationProducer::fillDescriptions(), HLTJetVBFFilter< T >::fillDescriptions(), HLTMonoJetFilter< T >::fillDescriptions(), HLTEgammaDoubleEtDeltaPhiFilter::fillDescriptions(), HLTMuonDimuonL2Filter::fillDescriptions(), ConeIsolation::fillDescriptions(), HLTMuonL2PreFilter::fillDescriptions(), HLTMuonPFIsoFilter::fillDescriptions(), HLTDoubletDZ< T1, T2 >::fillDescriptions(), HLTEgammaGenericFilter::fillDescriptions(), HLTEgammaGenericQuadraticEtaFilter::fillDescriptions(), HLTEgammaGenericQuadraticFilter::fillDescriptions(), HLTEgammaTriggerFilterObjectWrapper::fillDescriptions(), HLTElectronEoverpFilterRegional::fillDescriptions(), HLTExclDiJetFilter< T >::fillDescriptions(), HLTElectronGenericFilter::fillDescriptions(), HLTFatJetMassFilter< jetType >::fillDescriptions(), EcalRecHitsMerger::fillDescriptions(), EgammaHLTIslandClusterProducer::fillDescriptions(), HLTJetCollectionsVBFFilter< T >::fillDescriptions(), HLTMhtFilter::fillDescriptions(), EgammaHLTPFNeutralIsolationProducer::fillDescriptions(), ESRecHitsMerger::fillDescriptions(), HLTRFilter::fillDescriptions(), HLTMuonIsoFilter::fillDescriptions(), HLTElectronOneOEMinusOneOPFilterRegional::fillDescriptions(), HLTMhtHtFilter< T >::fillDescriptions(), HLTAlphaTFilter< T >::fillDescriptions(), TriggerSummaryAnalyzerAOD::fillDescriptions(), EgammaHLTPFPhotonIsolationProducer::fillDescriptions(), TriggerSummaryAnalyzerRAW::fillDescriptions(), HLTMuonL1toL3TkPreFilter::fillDescriptions(), HLTMuonL3PreFilter::fillDescriptions(), EgammaHLTMulti5x5ClusterProducer::fillDescriptions(), HLTSinglet< T >::fillDescriptions(), HLTAcoFilter::fillDescriptions(), HLTElectronPixelMatchFilter::fillDescriptions(), HLTPMDocaFilter::fillDescriptions(), HLTGlobalSums< T >::fillDescriptions(), HLTEventAnalyzerAOD::fillDescriptions(), HLTEgammaL1MatchFilterPairs::fillDescriptions(), HLTEgammaL1MatchFilterRegional::fillDescriptions(), HLTHtMhtProducer::fillDescriptions(), HLTEventAnalyzerRAW::fillDescriptions(), HLTEgammaDoubleEtFilter::fillDescriptions(), HLTEgammaDoubleEtPhiFilter::fillDescriptions(), HcalTopologyIdealEP::fillDescriptions(), HLTBool::fillDescriptions(), L2MuonIsolationProducer::fillDescriptions(), L3MuonCombinedRelativeIsolationProducer::fillDescriptions(), HLTDTROMonitorFilter::fillDescriptions(), HLTEcalTowerFilter::fillDescriptions(), HLTDisplacedmumumuVtxProducer::fillDescriptions(), HLTPixlMBFilt::fillDescriptions(), HLTPixlMBForAlignmentFilter::fillDescriptions(), EgammaHLTClusterShapeProducer::fillDescriptions(), TrackerTopologyEP::fillDescriptions(), HLTEgammaCaloIsolFilterPairs::fillDescriptions(), HLTMuonL1Filter::fillDescriptions(), EgammaHLTCombinedIsolationProducer::fillDescriptions(), HLTGetRaw::fillDescriptions(), HLTRHemisphere::fillDescriptions(), HLTSmartSinglet< T >::fillDescriptions(), HLTDisplacedmumuVtxProducer::fillDescriptions(), HLTCaloTowerFilter::fillDescriptions(), HLTLevel1Pattern::fillDescriptions(), EgammaHLTRecoEcalCandidateProducers::fillDescriptions(), EgammaHLTPixelMatchElectronProducers::fillDescriptions(), HLTJetTag< T >::fillDescriptions(), EgammaHLTRemoveDuplicatedSC::fillDescriptions(), HLTCountNumberOfObject< OColl >::fillDescriptions(), HLTSummaryFilter::fillDescriptions(), HLTPFEnergyFractionsFilter::fillDescriptions(), HLTTriggerTypeFilter::fillDescriptions(), EgammaHLTElectronCombinedIsolationProducer::fillDescriptions(), TriggerSummaryProducerRAW::fillDescriptions(), LogErrorFilter::fillDescriptions(), EgammaHLTEcalRecIsolationProducer::fillDescriptions(), HLTDoublet< T1, T2 >::fillDescriptions(), EgammaHLTRegionalPixelSeedGeneratorProducers::fillDescriptions(), HLTCollectionProducer< T >::fillDescriptions(), HLTFiltCand::fillDescriptions(), EcalListOfFEDSProducer::fillDescriptions(), EgammaHLTR9IDProducer::fillDescriptions(), HLTTrackWithHits::fillDescriptions(), HLTEventNumberFilter::fillDescriptions(), TriggerResultsFilterFromDB::fillDescriptions(), EgammaHLTElectronTrackIsolationProducers::fillDescriptions(), EgammaHLTHcalIsolationDoubleConeProducers::fillDescriptions(), HLTVertexFilter::fillDescriptions(), ESListOfFEDSProducer::fillDescriptions(), EgammaHLTElectronDetaDphiProducer::fillDescriptions(), EgammaHLTR9Producer::fillDescriptions(), HLTLevel1Activity::fillDescriptions(), TriggerResultsFilter::fillDescriptions(), HLTHcalPhiSymFilter::fillDescriptions(), HLTJetSortedVBFFilter< T >::fillDescriptions(), HLTL1NumberFilter::fillDescriptions(), HLTrigReport::fillDescriptions(), EgammaHLTHcalIsolationProducersRegional::fillDescriptions(), HLTJetCollectionsForLeptonPlusJets< jetType >::fillDescriptions(), HLTHighLevel::fillDescriptions(), HLTFEDSizeFilter::fillDescriptions(), EcalTrigPrimProducer::fillDescriptions(), EgammaHLTPhotonTrackIsolationProducersRegional::fillDescriptions(), edm::service::PrescaleService::fillDescriptions(), EgammaHLTBcHcalIsolationProducersRegional::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), HLTJetCollForElePlusJets< T >::fillDescriptions(), HLTMuonPointingFilter::fillDescriptions(), HLTElectronMuonInvMassFilter::fillDescriptions(), HLTHcalCalibTypeFilter::fillDescriptions(), HLTHcalNZSFilter::fillDescriptions(), HLTHcalSimpleRecHitFilter::fillDescriptions(), HLTTrackerHaloFilter::fillDescriptions(), HLTmmkkFilter::fillDescriptions(), HLTmmkFilter::fillDescriptions(), HLTJetCollectionsForElePlusJets< T >::fillDescriptions(), HLTCSCActivityFilter::fillDescriptions(), HLTElectronPFMTFilter::fillDescriptions(), EgammaHLTEcalIsolationProducersRegional::fillDescriptions(), HLTBeamModeFilter::fillDescriptions(), HLTPrescaleRecorder::fillDescriptions(), edm::EventSetupRecordDataGetter::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), HLTPrescaler::fillDescriptions(), HLTCSCAcceptBusyFilter::fillDescriptions(), EgammaHLTNxNClusterProducer::fillDescriptions(), HLTEcalPhiSymFilter::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), HLTHFAsymmetryFilter::fillDescriptions(), HLTPixelAsymmetryFilter::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), HLTDTActivityFilter::fillDescriptions(), HLTRPCTrigNoSyncFilter::fillDescriptions(), FastPrimaryVertexWithWeightsProducer::fillDescriptions(), PixelJetPuId::fillDescriptions(), EcalMIPRecHitFilter::fillDescriptions(), HLTPMMassFilter::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), HLTLevel1GTSeed::fillDescriptions(), HLTHeavyIon::fillDescriptions(), HLTGetDigi::fillDescriptions(), TriggerSummaryProducerAOD::fillDescriptions(), ExternalLHEProducer::fillDescriptions(), HLTDummyCollections::fillDescriptions(), EgammaHLTGsfTrackVarProducer::fillDescriptions(), pat::JetCorrFactorsProducer::fillDescriptions(), HLTEcalResonanceFilter::fillDescriptions(), HLTFilter::makeHLTFilterDescription(), HLTStreamFilter::makeHLTFilterDescription(), and edm::eventsetup::DataProxyProvider::prevalidate().

89  {
90  return add<T, U>(iLabel, value, true, false, true);
91  }
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::add ( U const &  iLabel)
inline

Definition at line 112 of file ParameterSetDescription.h.

112  {
113  return add<T, U>(iLabel, true, false, false);
114  }
template<typename T , typename U >
ParameterDescriptionBase * ParameterSetDescription::add ( U const &  iLabel,
T const &  value,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 419 of file ParameterSetDescription.h.

References addNode(), and python.Node::node.

419  {
420 
421  std::auto_ptr<ParameterDescriptionNode> node(new ParameterDescription<T>(iLabel, value, isTracked));
422  ParameterDescriptionNode* pnode = addNode(node, isOptional, writeToCfi);
423  return static_cast<ParameterDescriptionBase*>(pnode);
424  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
template<typename T , typename U >
ParameterDescriptionBase * ParameterSetDescription::add ( U const &  iLabel,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 428 of file ParameterSetDescription.h.

References addNode(), and python.Node::node.

428  {
429 
430  std::auto_ptr<ParameterDescriptionNode> node(new ParameterDescription<T>(iLabel, isTracked));
431  ParameterDescriptionNode* pnode = addNode(node, isOptional, writeToCfi);
432  return static_cast<ParameterDescriptionBase*>(pnode);
433  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
ParameterDescriptionNode * ParameterSetDescription::addNode ( ParameterDescriptionNode const &  node)
ParameterDescriptionNode * ParameterSetDescription::addNode ( std::auto_ptr< ParameterDescriptionNode node)

Definition at line 68 of file ParameterSetDescription.cc.

References addNode().

68  {
69  return addNode(node, false, true);
70  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
ParameterDescriptionNode * ParameterSetDescription::addNode ( std::auto_ptr< ParameterDescriptionNode node,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 87 of file ParameterSetDescription.cc.

References edm::ParameterDescriptionNode::checkAndGetLabelsAndTypes(), entries_, edm::ParameterSetDescription::SetDescriptionEntry::setOptional(), edm::ParameterSetDescription::SetDescriptionEntry::setWriteToCfi(), throwIfLabelsAlreadyUsed(), and throwIfWildcardCollision().

89  {
90 
91  std::set<std::string> nodeLabels;
92  std::set<ParameterTypes> nodeParameterTypes;
93  std::set<ParameterTypes> nodeWildcardTypes;
94  node->checkAndGetLabelsAndTypes(nodeLabels, nodeParameterTypes, nodeWildcardTypes);
95  throwIfLabelsAlreadyUsed(nodeLabels);
96  throwIfWildcardCollision(nodeParameterTypes, nodeWildcardTypes);
97 
98  SetDescriptionEntry entry;
99  entry.setOptional(optional);
100  entry.setWriteToCfi(writeToCfi);
101  entries_.push_back(entry);
102  return entries_.back().setNode(node);
103  }
void throwIfWildcardCollision(std::set< ParameterTypes > const &nodeParameterTypes, std::set< ParameterTypes > const &nodeWildcardTypes)
tuple node
Definition: Node.py:50
void throwIfLabelsAlreadyUsed(std::set< std::string > const &nodeLabels)
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptional ( U const &  iLabel,
T const &  value 
)
inline
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptional ( U const &  iLabel)
inline

Definition at line 122 of file ParameterSetDescription.h.

122  {
123  return add<T, U>(iLabel, true, true, false);
124  }
ParameterDescriptionNode * ParameterSetDescription::addOptionalNode ( ParameterDescriptionNode const &  node,
bool  writeToCfi 
)

Definition at line 74 of file ParameterSetDescription.cc.

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

74  {
75  std::auto_ptr<ParameterDescriptionNode> clonedNode(node.clone());
76  return addNode(clonedNode, true, writeToCfi);
77  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
ParameterDescriptionNode * ParameterSetDescription::addOptionalNode ( std::auto_ptr< ParameterDescriptionNode node,
bool  writeToCfi 
)

Definition at line 81 of file ParameterSetDescription.cc.

References addNode().

81  {
82  return addNode(node, true, writeToCfi);
83  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptionalUntracked ( U const &  iLabel,
T const &  value 
)
inline
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addOptionalUntracked ( U const &  iLabel)
inline

Definition at line 127 of file ParameterSetDescription.h.

127  {
128  return add<T, U>(iLabel, false, true, false);
129  }
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addUntracked ( U const &  iLabel,
T const &  value 
)
inline

Definition at line 94 of file ParameterSetDescription.h.

References relativeConstraints::value.

Referenced by edm::StreamerOutputModuleBase::fillDescription(), edm::EventSkipperByID::fillDescription(), edm::FromFiles::fillDescription(), evf::RecoEventWriterForFU::fillDescription(), edm::EDInputSource::fillDescription(), edm::ProducerSourceBase::fillDescription(), edm::ProductSelectorRules::fillDescription(), edm::StreamerFileWriter::fillDescription(), edm::DuplicateChecker::fillDescription(), edm::EventSelector::fillDescription(), edm::RootInputFileSequence::fillDescription(), edm::InputSource::fillDescription(), edm::fillDescriptionFromPSet(), edm::service::InitRootHandlers::fillDescriptions(), HLTRPCFilter::fillDescriptions(), edm::service::UnixSignalService::fillDescriptions(), edm::service::CPU::fillDescriptions(), edm::AsciiOutputModule::fillDescriptions(), HLTEgammaEtFilterPairs::fillDescriptions(), HLTEgammaDoubleEtDeltaPhiFilter::fillDescriptions(), HLTEgammaEtFilter::fillDescriptions(), edm::service::Timing::fillDescriptions(), edm::StreamerFileReader::fillDescriptions(), FastTimerServiceClient::fillDescriptions(), HLTEgammaDoubleEtFilter::fillDescriptions(), HcalTopologyIdealEP::fillDescriptions(), evf::RecoEventOutputModuleForFU< Consumer >::fillDescriptions(), edm::service::ResourceEnforcer::fillDescriptions(), edm::service::LoadAllDictionaries::fillDescriptions(), EventIDChecker::fillDescriptions(), AbortOnEventIDAnalyzer::fillDescriptions(), edm::PrintEventSetupDataRetrieval::fillDescriptions(), HLTrigReport::fillDescriptions(), HLTHcalCalibTypeFilter::fillDescriptions(), HLTElectronMuonInvMassFilter::fillDescriptions(), CaloTowerConstituentsMapBuilder::fillDescriptions(), edm::service::Tracer::fillDescriptions(), Timer::fillDescriptions(), edm::EventSetupRecordDataGetter::fillDescriptions(), edm::PoolOutputModule::fillDescriptions(), MulticoreRunLumiEventChecker::fillDescriptions(), edm::service::RandomNumberGeneratorService::fillDescriptions(), EcalMIPRecHitFilter::fillDescriptions(), edm::service::SimpleMemoryCheck::fillDescriptions(), HLTPMMassFilter::fillDescriptions(), HLTGetDigi::fillDescriptions(), TimerService::fillDescriptions(), FastTimerService::fillDescriptions(), edm::service::EnableFloatingPointExceptions::fillDescriptions(), and DQMRootSource::fillDescriptions().

94  {
95  return add<T, U>(iLabel, value, false, false, true);
96  }
template<typename T , typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addUntracked ( U const &  iLabel)
inline

Definition at line 117 of file ParameterSetDescription.h.

117  {
118  return add<T, U>(iLabel, false, false, false);
119  }
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 171 of file ParameterSetDescription.h.

172  {
173  return addVPSet<U>(iLabel, validator, true, false, false);
174  }
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 437 of file ParameterSetDescription.h.

References addNode(), and python.Node::node.

440  {
441  std::auto_ptr<ParameterDescriptionNode> node(
442  new ParameterDescription<std::vector<ParameterSet> >(iLabel, validator, isTracked, defaults));
443  ParameterDescriptionNode* pnode = addNode(node, isOptional, writeToCfi);
444  return static_cast<ParameterDescriptionBase*>(pnode);
445  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
template<typename U >
ParameterDescriptionBase * ParameterSetDescription::addVPSet ( U const &  iLabel,
ParameterSetDescription const &  validator,
bool  isTracked,
bool  isOptional,
bool  writeToCfi 
)
private

Definition at line 449 of file ParameterSetDescription.h.

References addNode(), and python.Node::node.

451  {
452  std::auto_ptr<ParameterDescriptionNode> node(
453  new ParameterDescription<std::vector<ParameterSet> >(iLabel, validator, isTracked));
454  ParameterDescriptionNode* pnode = addNode(node, isOptional, writeToCfi);
455  return static_cast<ParameterDescriptionBase*>(pnode);
456  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptional ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 157 of file ParameterSetDescription.h.

References l1GtPatternGenerator_cfi::defaults.

159  {
160  return addVPSet<U>(iLabel, validator, defaults, true, true, true);
161  }
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptional ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 183 of file ParameterSetDescription.h.

184  {
185  return addVPSet<U>(iLabel, validator, true, true, false);
186  }
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptionalUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 164 of file ParameterSetDescription.h.

References l1GtPatternGenerator_cfi::defaults.

166  {
167  return addVPSet<U>(iLabel, validator, defaults, false, true, true);
168  }
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptionalUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 189 of file ParameterSetDescription.h.

190  {
191  return addVPSet<U>(iLabel, validator, false, true, false);
192  }
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator,
std::vector< ParameterSet > const &  defaults 
)
inline

Definition at line 150 of file ParameterSetDescription.h.

References l1GtPatternGenerator_cfi::defaults.

152  {
153  return addVPSet<U>(iLabel, validator, defaults, false, false, true);
154  }
template<typename U >
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetUntracked ( U const &  iLabel,
ParameterSetDescription const &  validator 
)
inline

Definition at line 177 of file ParameterSetDescription.h.

178  {
179  return addVPSet<U>(iLabel, validator, false, false, false);
180  }
template<typename T , typename U >
ParameterWildcardBase* edm::ParameterSetDescription::addWildcard ( U const &  pattern)
inline

Definition at line 197 of file ParameterSetDescription.h.

References listBenchmarks::pattern.

197  {
198  return addWildcard<T, U>(pattern, true);
199  }
template<typename T , typename U >
ParameterWildcardBase * ParameterSetDescription::addWildcard ( U const &  pattern,
bool  isTracked 
)
private

Definition at line 460 of file ParameterSetDescription.h.

References addNode(), python.Node::node, and edm::RequireZeroOrMore.

460  {
461 
462  std::auto_ptr<ParameterDescriptionNode> node(new ParameterWildcard<T>(pattern, RequireZeroOrMore, isTracked));
463  ParameterDescriptionNode* pnode = addNode(node, true, false);
464  return static_cast<ParameterWildcardBase*>(pnode);
465  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
tuple node
Definition: Node.py:50
template<typename T , typename U >
ParameterWildcardBase* edm::ParameterSetDescription::addWildcardUntracked ( U const &  pattern)
inline

Definition at line 202 of file ParameterSetDescription.h.

References listBenchmarks::pattern.

Referenced by edm::EventSetupCacheIdentifierChecker::fillDescriptions().

202  {
203  return addWildcard<T, U>(pattern, false);
204  }
bool edm::ParameterSetDescription::anythingAllowed ( ) const
inline

Definition at line 303 of file ParameterSetDescription.h.

References anythingAllowed_.

Referenced by print(), and validate().

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

Definition at line 306 of file ParameterSetDescription.h.

References entries_.

306  {
307  return entries_.begin();
308  }
std::string const& edm::ParameterSetDescription::comment ( ) const
inline

Definition at line 72 of file ParameterSetDescription.h.

References comment_.

Referenced by edm::ConfigurationDescriptions::printForLabel().

72 { return comment_; }
const_iterator edm::ParameterSetDescription::end ( void  ) const
inline

Definition at line 310 of file ParameterSetDescription.h.

References entries_.

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

310  {
311  return entries_.end();
312  }
ParameterDescriptionNode* edm::ParameterSetDescription::ifExists ( ParameterDescriptionNode const &  node1,
ParameterDescriptionNode const &  node2 
)
inline

Definition at line 234 of file ParameterSetDescription.h.

Referenced by ifExistsOptional().

235  {
236  return ifExists(node1, node2, false, true);
237  }
ParameterDescriptionNode * ifExists(ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2)
ParameterDescriptionNode * ParameterSetDescription::ifExists ( ParameterDescriptionNode const &  node1,
ParameterDescriptionNode const &  node2,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 399 of file ParameterSetDescription.cc.

References addNode().

401  {
402  std::auto_ptr<ParameterDescriptionNode> pdIfExists(new IfExistsDescription(node1, node2));
403  return addNode(pdIfExists, optional, writeToCfi);
404  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
ParameterDescriptionNode* edm::ParameterSetDescription::ifExistsOptional ( ParameterDescriptionNode const &  node1,
ParameterDescriptionNode const &  node2,
bool  writeToCfi 
)
inline

Definition at line 240 of file ParameterSetDescription.h.

References ifExists().

242  {
243  return ifExists(node1, node2, true, writeToCfi);
244  }
ParameterDescriptionNode * ifExists(ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2)
template<typename T >
ParameterDescriptionNode* edm::ParameterSetDescription::ifValue ( ParameterDescription< T > const &  switchParameter,
std::auto_ptr< ParameterDescriptionCases< T > >  cases 
)
inline

Definition at line 219 of file ParameterSetDescription.h.

Referenced by reco::helper::JetIDHelper::fillDescription().

220  {
221  return ifValue<T>(switchParameter, cases, false, true);
222  }
template<typename T >
ParameterDescriptionNode * ParameterSetDescription::ifValue ( ParameterDescription< T > const &  switchParameter,
std::auto_ptr< ParameterDescriptionCases< T > >  cases,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 469 of file ParameterSetDescription.h.

References addNode().

471  {
472  std::auto_ptr<ParameterDescriptionNode> pdswitch(new ParameterSwitch<T>(switchParameter, cases));
473  return addNode(pdswitch, optional, writeToCfi);
474  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
template<typename T >
ParameterDescriptionNode* edm::ParameterSetDescription::ifValueOptional ( ParameterDescription< T > const &  switchParameter,
std::auto_ptr< ParameterDescriptionCases< T > >  cases,
bool  writeToCfi 
)
inline

Definition at line 226 of file ParameterSetDescription.h.

228  {
229  return ifValue<T>(switchParameter, cases, true, writeToCfi);
230  }
bool ParameterSetDescription::isLabelUnused ( std::string const &  label) const

Definition at line 232 of file ParameterSetDescription.cc.

References usedLabels_.

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

232  {
233  return usedLabels_.find(label) == usedLabels_.end();
234  }
std::set< std::string > usedLabels_
bool edm::ParameterSetDescription::isUnknown ( ) const
inline

Definition at line 304 of file ParameterSetDescription.h.

References unknown_.

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

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

Definition at line 249 of file ParameterSetDescription.h.

249  {
250  return labelsFrom<T,U>(iLabel, true, false, true);
251  }
template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFrom ( U const &  iLabel,
V const &  desc 
)
inline

Definition at line 281 of file ParameterSetDescription.h.

281  {
282  return labelsFrom<T,U,V>(iLabel, true, false, true, desc);
283  }
template<typename T , typename U >
ParameterDescriptionNode * ParameterSetDescription::labelsFrom ( U const &  iLabel,
bool  isTracked,
bool  optional,
bool  writeToCfi 
)
private

Definition at line 478 of file ParameterSetDescription.h.

References addNode().

478  {
479  std::auto_ptr<ParameterDescriptionNode> pd(new AllowedLabelsDescription<T>(iLabel, isTracked));
480  return addNode(pd, optional, writeToCfi);
481  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
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 485 of file ParameterSetDescription.h.

References addNode().

485  {
486  std::auto_ptr<ParameterDescriptionNode> pd(new AllowedLabelsDescription<T>(iLabel, desc, isTracked));
487  return addNode(pd, optional, writeToCfi);
488  }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptional ( U const &  iLabel,
bool  writeToCfi 
)
inline

Definition at line 261 of file ParameterSetDescription.h.

261  {
262  return labelsFrom<T,U>(iLabel, true, true, writeToCfi);
263  }
template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptional ( U const &  iLabel,
bool  writeToCfi,
V const &  desc 
)
inline

Definition at line 293 of file ParameterSetDescription.h.

293  {
294  return labelsFrom<T,U,V>(iLabel, true, true, writeToCfi, desc);
295  }
template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptionalUntracked ( U const &  iLabel,
bool  writeToCfi 
)
inline

Definition at line 267 of file ParameterSetDescription.h.

267  {
268  return labelsFrom<T,U>(iLabel, false, true, writeToCfi);
269  }
template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptionalUntracked ( U const &  iLabel,
bool  writeToCfi,
V const &  desc 
)
inline

Definition at line 299 of file ParameterSetDescription.h.

299  {
300  return labelsFrom<T,U,V>(iLabel, false, true, writeToCfi, desc);
301  }
template<typename T , typename U >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromUntracked ( U const &  iLabel)
inline

Definition at line 255 of file ParameterSetDescription.h.

255  {
256  return labelsFrom<T,U>(iLabel, false, false, true);
257  }
template<typename T , typename U , typename V >
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromUntracked ( U const &  iLabel,
V const &  desc 
)
inline

Definition at line 287 of file ParameterSetDescription.h.

287  {
288  return labelsFrom<T,U,V>(iLabel, false, false, true, desc);
289  }
void ParameterSetDescription::print ( std::ostream &  os,
DocFormatHelper dfh 
) const

Definition at line 179 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::ConfigurationDescriptions::printForLabel(), and edm::ParameterDescription< std::vector< ParameterSet > >::printNestedContent_().

179  {
180 
181  if (isUnknown()) {
182  dfh.indent(os);
183  os << "Description is unknown. The configured PSet will not be validated\n";
184  dfh.indent(os);
185  os << "because the plugin has not defined this parameter set description.\n";
186  if (!dfh.brief()) os << "\n";
187  }
188 
189  if (anythingAllowed()) {
190  dfh.indent(os);
191  os << "Description allows anything. If the configured PSet contains illegal parameters,\n";
192  dfh.indent(os);
193  os << "then validation will ignore them instead of throwing an exception.\n";
194  if (!dfh.brief()) os << "\n";
195  }
196 
197  if (entries_.empty()) {
198  dfh.indent(os);
199  os << "Description is empty\n";
200  if (!dfh.brief()) os << "\n";
201  return;
202  }
203 
204  // Zeroth pass is only to calculate column widths in advance of any printing
205  dfh.setPass(0);
206  dfh.setCounter(0);
208  _1,
209  boost::ref(os),
210  boost::ref(dfh)));
211 
212  // First pass prints top level parameters and references to structure
213  dfh.setPass(1);
214  dfh.setCounter(0);
216  _1,
217  boost::ref(os),
218  boost::ref(dfh)));
219 
220  // Second pass prints substructure that goes into different sections of the
221  // output document
222  dfh.setPass(2);
223  dfh.setCounter(0);
225  _1,
226  boost::ref(os),
227  boost::ref(dfh)));
228  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
static void printNode(SetDescriptionEntry const &entry, std::ostream &os, DocFormatHelper &dfh)
void ParameterSetDescription::printNode ( SetDescriptionEntry const &  entry,
std::ostream &  os,
DocFormatHelper dfh 
)
staticprivate

Definition at line 285 of file ParameterSetDescription.cc.

References edm::ParameterSetDescription::SetDescriptionEntry::node(), edm::ParameterSetDescription::SetDescriptionEntry::optional(), edm::DocFormatHelper::pass(), and edm::ParameterSetDescription::SetDescriptionEntry::writeToCfi().

Referenced by print().

287  {
288  if (dfh.pass() < 2) {
289  entry.node()->print(os, entry.optional(), entry.writeToCfi(), dfh);
290  }
291  else {
292  entry.node()->printNestedContent(os, entry.optional(), dfh);
293  }
294  }
void edm::ParameterSetDescription::reserve ( SetDescriptionEntries::size_type  n)
inline

Definition at line 316 of file ParameterSetDescription.h.

References entries_.

316  {
317  entries_.reserve(n);
318  }
void ParameterSetDescription::setAllowAnything ( )
void ParameterSetDescription::setComment ( std::string const &  value)
void ParameterSetDescription::setComment ( char const *  value)
void ParameterSetDescription::setUnknown ( )

Definition at line 54 of file ParameterSetDescription.cc.

References unknown_.

Referenced by EcalDQMonitorClient::fillDescriptions(), edm::ModelFilter::fillDescriptions(), EcalDQMonitorTask::fillDescriptions(), IsoTrig::fillDescriptions(), edm::EDAnalyzer::fillDescriptions(), dEdxAnalyzer::fillDescriptions(), VertexMonitor::fillDescriptions(), edm::EDProducer::fillDescriptions(), PFCand_AssoMap::fillDescriptions(), edm::EDFilter::fillDescriptions(), Mixing2DB::fillDescriptions(), CastorInvalidDataFilter::fillDescriptions(), AnaL1CaloCleaner::fillDescriptions(), DYGenFilter::fillDescriptions(), DJpsiFilter::fillDescriptions(), FourLepFilter::fillDescriptions(), MuPFIsoEmbedder::fillDescriptions(), PF_PU_FirstVertexTracks::fillDescriptions(), PF_PU_AssoMap::fillDescriptions(), HcalLaserEventFilter2012::fillDescriptions(), BeamProfile2DB::fillDescriptions(), __class__< T >::fillDescriptions(), edm::stream::EDAnalyzerBase::fillDescriptions(), TTbar_P4Violation::fillDescriptions(), edm::stream::EDProducerBase::fillDescriptions(), LHE2HepMCConverter::fillDescriptions(), ExtraFromSeeds::fillDescriptions(), edm::stream::EDFilterBase::fillDescriptions(), PileupJetIdProducer::fillDescriptions(), JetVertexChecker::fillDescriptions(), EGEnergyAnalyzer::fillDescriptions(), HcalLaserEventFilter::fillDescriptions(), edm::global::EDAnalyzerBase::fillDescriptions(), edm::one::EDProducerBase::fillDescriptions(), edm::one::EDAnalyzerBase::fillDescriptions(), AnaMuonCaloCleaner::fillDescriptions(), TestMuonCaloCleaner::fillDescriptions(), edm::one::EDFilterBase::fillDescriptions(), edm::global::EDFilterBase::fillDescriptions(), HcalLaserHBHEFilter2012::fillDescriptions(), HcalLaserHBHEHFFilter2012::fillDescriptions(), EcalZmassTask::fillDescriptions(), HcalLaserHFFilter2012::fillDescriptions(), LogMessageMonitor::fillDescriptions(), EGammaCutBasedEleIdAnalyzer::fillDescriptions(), SeedToTrackProducer::fillDescriptions(), edm::global::EDProducerBase::fillDescriptions(), TTbar_GenLepAnalyzer::fillDescriptions(), PFCand_NoPU_WithAM::fillDescriptions(), EcalZmassClient::fillDescriptions(), TTbar_GenJetAnalyzer::fillDescriptions(), APVShotsFilter::fillDescriptions(), TTbar_Kinematics::fillDescriptions(), HcalForwardLibWriter::fillDescriptions(), L1Validator::fillDescriptions(), HLTOfflineReproducibility::fillDescriptions(), edm::OutputModule::fillDescriptions(), HadronAndPartonSelector::fillDescriptions(), edm::one::OutputModuleBase::fillDescriptions(), edm::InputSource::fillDescriptions(), JetFlavourClustering::fillDescriptions(), DQMRootOutputModule::fillDescriptions(), and edm::fillDetails::DoFillAsUnknown< T >::operator()().

55  {
56  unknown_ = true;
57  }
void ParameterSetDescription::throwIfLabelsAlreadyUsed ( std::set< std::string > const &  nodeLabels)
private

Definition at line 298 of file ParameterSetDescription.cc.

References edm::hlt::Exception, edm::errors::LogicError, and usedLabels_.

Referenced by addNode().

298  {
299 
300  std::set<std::string> duplicateLabels;
301  std::insert_iterator<std::set<std::string> > insertIter(duplicateLabels, duplicateLabels.begin());
302  std::set_intersection(nodeLabels.begin(), nodeLabels.end(),
303  usedLabels_.begin(), usedLabels_.end(),
304  insertIter);
305  if (duplicateLabels.empty()) {
306  usedLabels_.insert(nodeLabels.begin(), nodeLabels.end());
307  }
308  else {
309 
310  std::stringstream ss;
311  for (std::set<std::string>::const_iterator iter = duplicateLabels.begin(),
312  iEnd = duplicateLabels.end();
313  iter != iEnd;
314  ++iter) {
315  ss << " \"" << *iter << "\"\n";
316  }
318  << "Labels used in different nodes of a ParameterSetDescription\n"
319  << "must be unique. The following duplicate labels were detected:\n"
320  << ss.str()
321  << "\n";
322  }
323  }
std::set< std::string > usedLabels_
void ParameterSetDescription::throwIfWildcardCollision ( std::set< ParameterTypes > const &  nodeParameterTypes,
std::set< ParameterTypes > const &  nodeWildcardTypes 
)
private

Definition at line 327 of file ParameterSetDescription.cc.

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

Referenced by addNode().

328  {
329 
330  // 1. Check that the new wildcard types do not collide with the existing
331  // parameter types.
332  // 2. Check that the new parameter types do not collide with the existing
333  // wildcard types.
334  // 3. Then insert them.
335  // The order of those steps is important because a wildcard with a default
336  // value could insert a type in both sets and this is OK.
337 
338  // We assume the node already checked for collisions between the new parameter
339  // types and the new wildcard types before passing the sets to this function.
340 
341  if (!nodeWildcardTypes.empty()) {
342 
343  std::set<ParameterTypes> duplicateTypes1;
344  std::insert_iterator<std::set<ParameterTypes> > insertIter1(duplicateTypes1, duplicateTypes1.begin());
345  std::set_intersection(typesUsedForParameters_.begin(), typesUsedForParameters_.end(),
346  nodeWildcardTypes.begin(), nodeWildcardTypes.end(),
347  insertIter1);
348 
349  if (!duplicateTypes1.empty()) {
350 
351  std::stringstream ss;
352  for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes1.begin(),
353  iEnd = duplicateTypes1.end();
354  iter != iEnd;
355  ++iter) {
356  ss << " \"" << parameterTypeEnumToString(*iter) << "\"\n";
357  }
359  << "Within a ParameterSetDescription, the type used for a wildcard must\n"
360  << "not be the same as the type used for other parameters. This rule\n"
361  << "is violated for the following types:\n"
362  << ss.str()
363  << "\n";
364  }
365  }
366 
367  if (!typesUsedForWildcards_.empty()) {
368 
369  std::set<ParameterTypes> duplicateTypes2;
370  std::insert_iterator<std::set<ParameterTypes> > insertIter2(duplicateTypes2, duplicateTypes2.begin());
371  std::set_intersection(typesUsedForWildcards_.begin(), typesUsedForWildcards_.end(),
372  nodeParameterTypes.begin(), nodeParameterTypes.end(),
373  insertIter2);
374 
375  if (!duplicateTypes2.empty()) {
376 
377  std::stringstream ss;
378  for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes2.begin(),
379  iEnd = duplicateTypes2.end();
380  iter != iEnd;
381  ++iter) {
382  ss << " \"" << parameterTypeEnumToString(*iter) << "\"\n";
383  }
385  << "Within a ParameterSetDescription, the type used for a wildcard must\n"
386  << "not be the same as the type used for other parameters. This rule is\n"
387  << "violated for the following types :\n"
388  << ss.str()
389  << "\n";
390  }
391  }
392 
393  typesUsedForParameters_.insert(nodeParameterTypes.begin(), nodeParameterTypes.end());
394  typesUsedForWildcards_.insert(nodeWildcardTypes.begin(), nodeWildcardTypes.end());
395  }
std::string parameterTypeEnumToString(ParameterTypes iType)
std::set< ParameterTypes > typesUsedForParameters_
std::set< ParameterTypes > typesUsedForWildcards_
void ParameterSetDescription::throwIllegalParameters ( std::vector< std::string > const &  parameterNames,
std::set< std::string > const &  validatedNames 
)
staticprivate

Definition at line 237 of file ParameterSetDescription.cc.

References edm::errors::Configuration, and edm::hlt::Exception.

Referenced by validate().

239  {
240 
241  std::set<std::string> parNames(parameterNames.begin(), parameterNames.end());
242 
243 
244  std::set<std::string> diffNames;
245  std::insert_iterator<std::set<std::string> > insertIter(diffNames, diffNames.begin());
246  std::set_difference(parNames.begin(), parNames.end(),
247  validatedLabels.begin(), validatedLabels.end(),
248  insertIter);
249 
250  std::stringstream ss;
251  for (std::set<std::string>::const_iterator iter = diffNames.begin(),
252  iEnd = diffNames.end();
253  iter != iEnd;
254  ++iter) {
255  ss << " '" << *iter << "'\n";
256  }
257  if (diffNames.size() == 1U) {
259  << "Illegal parameter found in configuration. The parameter is named:\n"
260  << ss.str()
261  << "You could be trying to use a parameter name that is not\n"
262  << "allowed for this plugin or it could be misspelled.\n";
263  }
264  else {
266  << "Illegal parameters found in configuration. The parameters are named:\n"
267  << ss.str()
268  << "You could be trying to use parameter names that are not\n"
269  << "allowed for this plugin or they could be misspelled.\n";
270  }
271  }
void ParameterSetDescription::validate ( ParameterSet pset) const

Definition at line 106 of file ParameterSetDescription.cc.

References anythingAllowed(), entries_, edm::ParameterSet::exists(), edm::for_all(), edm::ParameterSet::getParameterNames(), AlCaHLTBitMon_QueryRunRegistry::string, edm::IllegalParameters::throwAnException(), throwIllegalParameters(), unknown_, and validateNode().

Referenced by edm::ConfigurationDescriptions::validate().

107  {
108  if (unknown_) return;
109 
110  std::set<std::string> validatedLabels;
112  boost::bind(&ParameterSetDescription::validateNode, _1, boost::ref(pset), boost::ref(validatedLabels)));
113 
114  std::vector<std::string> parameterNames = pset.getParameterNames();
115  if (validatedLabels.size() != parameterNames.size()) {
116 
117  // Three labels will be magically inserted into the top level
118  // of a module ParameterSet even though they are not in the
119  // python configuration files. If these are present, then
120  // assume they are OK and count them as validated.
121 
122  std::string module_label("@module_label");
123  if (pset.exists(module_label)) {
124  validatedLabels.insert(module_label);
125  }
126 
127  std::string module_type("@module_type");
128  if (pset.exists(module_type)) {
129  validatedLabels.insert(module_type);
130  }
131 
132  std::string module_edm_type("@module_edm_type");
133  if (pset.exists(module_edm_type)) {
134  validatedLabels.insert(module_edm_type);
135  }
136 
137  std::string service_type("@service_type");
138  if (pset.exists(service_type)) {
139  validatedLabels.insert(service_type);
140  }
141 
142  // Try again
143  if (validatedLabels.size() != parameterNames.size()) {
144 
146  throwIllegalParameters(parameterNames, validatedLabels);
147  }
148  }
149  }
150  }
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:16
static void validateNode(SetDescriptionEntry const &entry, ParameterSet &pset, std::set< std::string > &validatedNames)
void ParameterSetDescription::validateNode ( SetDescriptionEntry const &  entry,
ParameterSet pset,
std::set< std::string > &  validatedNames 
)
staticprivate

Definition at line 172 of file ParameterSetDescription.cc.

References edm::ParameterSetDescription::SetDescriptionEntry::node(), and edm::ParameterSetDescription::SetDescriptionEntry::optional().

Referenced by validate().

174  {
175  entry.node()->validate(pset, validatedLabels, entry.optional());
176  }
void ParameterSetDescription::writeCfi ( std::ostream &  os,
bool  startWithComma,
int  indentation 
) const

Definition at line 153 of file ParameterSetDescription.cc.

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

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

155  {
156  bool wroteSomething = false;
157 
159  _1,
160  boost::ref(os),
161  boost::ref(startWithComma),
162  indentation,
163  boost::ref(wroteSomething)));
164 
165  if (wroteSomething) {
166  char oldFill = os.fill();
167  os << "\n" << std::setfill(' ') << std::setw(indentation - 2) << "" << std::setfill(oldFill);
168  }
169  }
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:16
void ParameterSetDescription::writeNode ( SetDescriptionEntry const &  entry,
std::ostream &  os,
bool &  startWithComma,
int  indentation,
bool &  wroteSomething 
)
staticprivate

Definition at line 274 of file ParameterSetDescription.cc.

References edm::ParameterSetDescription::SetDescriptionEntry::node(), and edm::ParameterSetDescription::SetDescriptionEntry::writeToCfi().

Referenced by writeCfi().

278  {
279  if (entry.writeToCfi()) {
280  entry.node()->writeCfi(os, startWithComma, indentation, wroteSomething);
281  }
282  }

Member Data Documentation

bool edm::ParameterSetDescription::anythingAllowed_
private

Definition at line 399 of file ParameterSetDescription.h.

Referenced by anythingAllowed(), and setAllowAnything().

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

Definition at line 407 of file ParameterSetDescription.h.

Referenced by comment(), and setComment().

SetDescriptionEntries edm::ParameterSetDescription::entries_
private

Definition at line 401 of file ParameterSetDescription.h.

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

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

Definition at line 404 of file ParameterSetDescription.h.

Referenced by throwIfWildcardCollision().

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

Definition at line 405 of file ParameterSetDescription.h.

Referenced by throwIfWildcardCollision().

bool edm::ParameterSetDescription::unknown_
private

Definition at line 400 of file ParameterSetDescription.h.

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

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

Definition at line 403 of file ParameterSetDescription.h.

Referenced by isLabelUnused(), and throwIfLabelsAlreadyUsed().