#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 > | |
ParameterDescriptionBase * | add (U const &iLabel, T const &value) |
template<typename T , typename U > | |
ParameterDescriptionBase * | add (U const &iLabel) |
ParameterDescriptionNode * | addNode (ParameterDescriptionNode const &node) |
ParameterDescriptionNode * | addNode (std::auto_ptr< ParameterDescriptionNode > node) |
template<typename T , typename U > | |
ParameterDescriptionBase * | addOptional (U const &iLabel, T const &value) |
template<typename T , typename U > | |
ParameterDescriptionBase * | addOptional (U const &iLabel) |
ParameterDescriptionNode * | addOptionalNode (ParameterDescriptionNode const &node, bool writeToCfi) |
ParameterDescriptionNode * | addOptionalNode (std::auto_ptr< ParameterDescriptionNode > node, bool writeToCfi) |
template<typename T , typename U > | |
ParameterDescriptionBase * | addOptionalUntracked (U const &iLabel, T const &value) |
template<typename T , typename U > | |
ParameterDescriptionBase * | addOptionalUntracked (U const &iLabel) |
template<typename T , typename U > | |
ParameterDescriptionBase * | addUntracked (U const &iLabel, T const &value) |
template<typename T , typename U > | |
ParameterDescriptionBase * | addUntracked (U const &iLabel) |
template<typename U > | |
ParameterDescriptionBase * | addVPSet (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults) |
template<typename U > | |
ParameterDescriptionBase * | addVPSet (U const &iLabel, ParameterSetDescription const &validator) |
template<typename U > | |
ParameterDescriptionBase * | addVPSetOptional (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults) |
template<typename U > | |
ParameterDescriptionBase * | addVPSetOptional (U const &iLabel, ParameterSetDescription const &validator) |
template<typename U > | |
ParameterDescriptionBase * | addVPSetOptionalUntracked (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults) |
template<typename U > | |
ParameterDescriptionBase * | addVPSetOptionalUntracked (U const &iLabel, ParameterSetDescription const &validator) |
template<typename U > | |
ParameterDescriptionBase * | addVPSetUntracked (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults) |
template<typename U > | |
ParameterDescriptionBase * | addVPSetUntracked (U const &iLabel, ParameterSetDescription const &validator) |
template<typename T , typename U > | |
ParameterWildcardBase * | addWildcard (U const &pattern) |
template<typename T , typename U > | |
ParameterWildcardBase * | addWildcardUntracked (U const &pattern) |
bool | anythingAllowed () const |
const_iterator | begin () const |
std::string const & | comment () const |
const_iterator | end () const |
ParameterDescriptionNode * | ifExists (ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2) |
ParameterDescriptionNode * | ifExistsOptional (ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2, bool writeToCfi) |
template<typename T > | |
ParameterDescriptionNode * | ifValue (ParameterDescription< T > const &switchParameter, std::auto_ptr< ParameterDescriptionCases< T > > cases) |
template<typename T > | |
ParameterDescriptionNode * | ifValueOptional (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 > | |
ParameterDescriptionNode * | labelsFrom (U const &iLabel) |
template<typename T , typename U , typename V > | |
ParameterDescriptionNode * | labelsFrom (U const &iLabel, V const &desc) |
template<typename T , typename U > | |
ParameterDescriptionNode * | labelsFromOptional (U const &iLabel, bool writeToCfi) |
template<typename T , typename U , typename V > | |
ParameterDescriptionNode * | labelsFromOptional (U const &iLabel, bool writeToCfi, V const &desc) |
template<typename T , typename U , typename V > | |
ParameterDescriptionNode * | labelsFromOptionalUntracked (U const &iLabel, bool writeToCfi, V const &desc) |
template<typename T , typename U > | |
ParameterDescriptionNode * | labelsFromOptionalUntracked (U const &iLabel, bool writeToCfi) |
template<typename T , typename U > | |
ParameterDescriptionNode * | labelsFromUntracked (U const &iLabel) |
template<typename T , typename U , typename V > | |
ParameterDescriptionNode * | labelsFromUntracked (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 | |
void | setComment (char const *value) |
void | setComment (std::string const &value) |
void | setUnknown () |
void | validate (ParameterSet &pset) const |
void | writeCfi (std::ostream &os, bool startWithComma, int indentation) const |
virtual | ~ParameterSetDescription () |
Private Member Functions | |
template<typename T , typename U > | |
ParameterDescriptionBase * | add (U const &iLabel, T const &value, bool isTracked, bool isOptional, bool writeToCfi) |
template<typename T , typename U > | |
ParameterDescriptionBase * | add (U const &iLabel, bool isTracked, bool isOptional, bool writeToCfi) |
ParameterDescriptionNode * | addNode (std::auto_ptr< ParameterDescriptionNode > node, bool optional, bool writeToCfi) |
template<typename U > | |
ParameterDescriptionBase * | addVPSet (U const &iLabel, ParameterSetDescription const &validator, bool isTracked, bool isOptional, bool writeToCfi) |
template<typename U > | |
ParameterDescriptionBase * | addVPSet (U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults, bool isTracked, bool isOptional, bool writeToCfi) |
template<typename T , typename U > | |
ParameterWildcardBase * | addWildcard (U const &pattern, bool isTracked) |
ParameterDescriptionNode * | ifExists (ParameterDescriptionNode const &node1, ParameterDescriptionNode const &node2, bool optional, bool writeToCfi) |
template<typename T > | |
ParameterDescriptionNode * | ifValue (ParameterDescription< T > const &switchParameter, std::auto_ptr< ParameterDescriptionCases< T > > cases, bool optional, bool writeToCfi) |
template<typename T , typename U , typename V > | |
ParameterDescriptionNode * | labelsFrom (U const &iLabel, bool isTracked, bool optional, bool writeToCfi, V const &desc) |
template<typename T , typename U > | |
ParameterDescriptionNode * | labelsFrom (U const &iLabel, bool isTracked, bool optional, bool writeToCfi) |
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 ¶meterNames, 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< ParameterTypes > | typesUsedForParameters_ |
std::set< ParameterTypes > | typesUsedForWildcards_ |
bool | unknown_ |
std::set< std::string > | usedLabels_ |
Definition at line 50 of file ParameterSetDescription.h.
typedef SetDescriptionEntries::const_iterator edm::ParameterSetDescription::const_iterator |
Definition at line 67 of file ParameterSetDescription.h.
typedef std::vector<SetDescriptionEntry> edm::ParameterSetDescription::SetDescriptionEntries |
Definition at line 66 of file ParameterSetDescription.h.
ParameterSetDescription::ParameterSetDescription | ( | ) |
Definition at line 31 of file ParameterSetDescription.cc.
: anythingAllowed_(false), unknown_(false) { }
ParameterSetDescription::~ParameterSetDescription | ( | ) | [virtual] |
Definition at line 36 of file ParameterSetDescription.cc.
{ }
ParameterDescriptionBase* edm::ParameterSetDescription::add | ( | U const & | iLabel, |
T const & | value | ||
) | [inline] |
Definition at line 89 of file ParameterSetDescription.h.
References relativeConstraints::value.
Referenced by edm::ConfigurationDescriptions::addDefault(), pat::PATUserDataMerger< ObjectType, Operation >::fillDescription(), pat::helper::KinResolutionsLoader::fillDescription(), GsfElectronBaseProducer::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), GsfElectronCoreBaseProducer::fillDescription(), edm::fillDescriptionFromPSet(), PythonService::fillDescriptions(), HLTHcalMETNoiseFilter::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), edm::Prescaler::fillDescriptions(), HLTBool::fillDescriptions(), HLTExclDiJetFilter::fillDescriptions(), edm::EventAuxiliaryHistoryProducer::fillDescriptions(), edm::service::PrescaleService::fillDescriptions(), HLTLevel1Activity::fillDescriptions(), HLTForwardBackwardJetsFilter::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), LogErrorFilter::fillDescriptions(), HLTHPDFilter::fillDescriptions(), HLTRHemisphere::fillDescriptions(), HLTDiJetAveFilter::fillDescriptions(), pat::JetCorrFactorsProducer::fillDescriptions(), HLT1CaloJetEnergy::fillDescriptions(), JetCollectionForEleHT::fillDescriptions(), HLTRFilter::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), HLTMhtHtFilter::fillDescriptions(), edm::EventSetupRecordDataGetter::fillDescriptions(), and HLTLevel1Pattern::fillDescriptions().
{ return add<T, U>(iLabel, value, true, false, true); }
ParameterDescriptionBase* edm::ParameterSetDescription::add | ( | U const & | iLabel | ) | [inline] |
Definition at line 112 of file ParameterSetDescription.h.
{ return add<T, U>(iLabel, true, false, false); }
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.
{ std::auto_ptr<ParameterDescriptionBase> pdbase(new ParameterDescription<T>(iLabel, value, isTracked)); ParameterDescriptionBase* pdReturn = pdbase.get(); std::auto_ptr<ParameterDescriptionNode> node(pdbase); addNode(node, isOptional, writeToCfi); return pdReturn; }
ParameterDescriptionBase * ParameterSetDescription::add | ( | U const & | iLabel, |
bool | isTracked, | ||
bool | isOptional, | ||
bool | writeToCfi | ||
) | [private] |
Definition at line 431 of file ParameterSetDescription.h.
References addNode(), and python::Node::node.
{ std::auto_ptr<ParameterDescriptionBase> pdbase(new ParameterDescription<T>(iLabel, isTracked)); ParameterDescriptionBase* pdReturn = pdbase.get(); std::auto_ptr<ParameterDescriptionNode> node(pdbase); addNode(node, isOptional, writeToCfi); return pdReturn; }
ParameterDescriptionNode * ParameterSetDescription::addNode | ( | ParameterDescriptionNode const & | node | ) |
Definition at line 61 of file ParameterSetDescription.cc.
References edm::ParameterDescriptionNode::clone().
Referenced by add(), addNode(), addOptionalNode(), addVPSet(), addWildcard(), edm::fillDescriptionFromPSet(), pat::PATElectronProducer::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), edm::service::RandomNumberGeneratorService::fillDescriptions(), edm::service::EnableFloatingPointExceptions::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), ifExists(), ifValue(), and labelsFrom().
ParameterDescriptionNode * ParameterSetDescription::addNode | ( | std::auto_ptr< ParameterDescriptionNode > | node | ) |
Definition at line 68 of file ParameterSetDescription.cc.
References addNode().
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().
{ std::set<std::string> nodeLabels; std::set<ParameterTypes> nodeParameterTypes; std::set<ParameterTypes> nodeWildcardTypes; node->checkAndGetLabelsAndTypes(nodeLabels, nodeParameterTypes, nodeWildcardTypes); throwIfLabelsAlreadyUsed(nodeLabels); throwIfWildcardCollision(nodeParameterTypes, nodeWildcardTypes); SetDescriptionEntry entry; entry.setOptional(optional); entry.setWriteToCfi(writeToCfi); entries_.push_back(entry); ParameterDescriptionNode* returnValue = node.get(); entries_.back().setNode(node); return returnValue; }
ParameterDescriptionBase* edm::ParameterSetDescription::addOptional | ( | U const & | iLabel, |
T const & | value | ||
) | [inline] |
Definition at line 99 of file ParameterSetDescription.h.
References relativeConstraints::value.
Referenced by pat::helper::KinResolutionsLoader::fillDescription(), edm::EventSelector::fillDescription(), pat::PATPhotonProducer::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), and pat::PATMuonProducer::fillDescriptions().
{ return add<T, U>(iLabel, value, true, true, true); }
ParameterDescriptionBase* edm::ParameterSetDescription::addOptional | ( | U const & | iLabel | ) | [inline] |
Definition at line 122 of file ParameterSetDescription.h.
{ return add<T, U>(iLabel, true, true, false); }
ParameterDescriptionNode * ParameterSetDescription::addOptionalNode | ( | ParameterDescriptionNode const & | node, |
bool | writeToCfi | ||
) |
Definition at line 74 of file ParameterSetDescription.cc.
References addNode(), and edm::ParameterDescriptionNode::clone().
ParameterDescriptionNode * ParameterSetDescription::addOptionalNode | ( | std::auto_ptr< ParameterDescriptionNode > | node, |
bool | writeToCfi | ||
) |
Definition at line 81 of file ParameterSetDescription.cc.
References addNode().
ParameterDescriptionBase* edm::ParameterSetDescription::addOptionalUntracked | ( | U const & | iLabel, |
T const & | value | ||
) | [inline] |
Definition at line 104 of file ParameterSetDescription.h.
References relativeConstraints::value.
Referenced by edm::ConfigurableInputSource::fillDescription(), TFileAdaptor::fillDescriptions(), edm::EventContentAnalyzer::fillDescriptions(), edm::service::RandomNumberGeneratorService::fillDescriptions(), and edm::service::SiteLocalConfigService::fillDescriptions().
{ return add<T, U>(iLabel, value, false, true, true); }
ParameterDescriptionBase* edm::ParameterSetDescription::addOptionalUntracked | ( | U const & | iLabel | ) | [inline] |
Definition at line 127 of file ParameterSetDescription.h.
{ return add<T, U>(iLabel, false, true, false); }
ParameterDescriptionBase* edm::ParameterSetDescription::addUntracked | ( | U const & | iLabel | ) | [inline] |
Definition at line 117 of file ParameterSetDescription.h.
{ return add<T, U>(iLabel, false, false, false); }
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::ConfigurableInputSource::fillDescription(), edm::RootInputFileSequence::fillDescription(), edm::EDInputSource::fillDescription(), edm::StreamerOutputModuleBase::fillDescription(), edm::InputSource::fillDescription(), edm::GroupSelectorRules::fillDescription(), edm::ExternalInputSource::fillDescription(), edm::EventSkipperByID::fillDescription(), edm::DuplicateChecker::fillDescription(), edm::EventSelector::fillDescription(), edm::StreamerFileWriter::fillDescription(), edm::fillDescriptionFromPSet(), edm::service::UnixSignalService::fillDescriptions(), edm::XMLOutputModule::fillDescriptions(), edm::PoolOutputModule::fillDescriptions(), EventIDChecker::fillDescriptions(), edm::StreamerFileReader::fillDescriptions(), edm::service::LoadAllDictionaries::fillDescriptions(), HLTExclDiJetFilter::fillDescriptions(), edm::PrintEventSetupDataRetrieval::fillDescriptions(), edm::service::SimpleMemoryCheck::fillDescriptions(), edm::rootfix::LockService::fillDescriptions(), edm::service::PrescaleService::fillDescriptions(), HLTForwardBackwardJetsFilter::fillDescriptions(), edm::AsciiOutputModule::fillDescriptions(), edm::service::Timing::fillDescriptions(), edm::service::InitRootHandlers::fillDescriptions(), HLTDiJetAveFilter::fillDescriptions(), edm::service::RandomNumberGeneratorService::fillDescriptions(), edm::service::EnableFloatingPointExceptions::fillDescriptions(), DQMRootSource::fillDescriptions(), HLT1CaloJetEnergy::fillDescriptions(), MulticoreRunLumiEventChecker::fillDescriptions(), HLTMhtHtFilter::fillDescriptions(), edm::service::Tracer::fillDescriptions(), edm::service::CPU::fillDescriptions(), and edm::EventSetupRecordDataGetter::fillDescriptions().
{ return add<T, U>(iLabel, value, false, false, true); }
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSet | ( | U const & | iLabel, |
ParameterSetDescription const & | validator | ||
) | [inline] |
Definition at line 171 of file ParameterSetDescription.h.
{ return addVPSet<U>(iLabel, validator, true, false, false); }
ParameterDescriptionBase * ParameterSetDescription::addVPSet | ( | U const & | iLabel, |
ParameterSetDescription const & | validator, | ||
std::vector< ParameterSet > const & | defaults, | ||
bool | isTracked, | ||
bool | isOptional, | ||
bool | writeToCfi | ||
) | [private] |
Definition at line 443 of file ParameterSetDescription.h.
References addNode(), and python::Node::node.
{ std::auto_ptr<ParameterDescriptionBase> pdbase( new ParameterDescription<std::vector<ParameterSet> >(iLabel, validator, isTracked, defaults)); ParameterDescriptionBase* pdReturn = pdbase.get(); std::auto_ptr<ParameterDescriptionNode> node(pdbase); addNode(node, isOptional, writeToCfi); return pdReturn; }
ParameterDescriptionBase * ParameterSetDescription::addVPSet | ( | U const & | iLabel, |
ParameterSetDescription const & | validator, | ||
bool | isTracked, | ||
bool | isOptional, | ||
bool | writeToCfi | ||
) | [private] |
Definition at line 459 of file ParameterSetDescription.h.
References addNode(), and python::Node::node.
{ std::auto_ptr<ParameterDescriptionBase> pdbase( new ParameterDescription<std::vector<ParameterSet> >(iLabel, validator, isTracked)); ParameterDescriptionBase* pdReturn = pdbase.get(); std::auto_ptr<ParameterDescriptionNode> node(pdbase); addNode(node, isOptional, writeToCfi); return pdReturn; }
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSet | ( | U const & | iLabel, |
ParameterSetDescription const & | validator, | ||
std::vector< ParameterSet > const & | defaults | ||
) | [inline] |
Definition at line 143 of file ParameterSetDescription.h.
References l1GtPatternGenerator_cfi::defaults.
Referenced by edm::service::PrescaleService::fillDescriptions(), and edm::EventSetupRecordDataGetter::fillDescriptions().
{ return addVPSet<U>(iLabel, validator, defaults, true, false, true); }
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.
{ return addVPSet<U>(iLabel, validator, defaults, true, true, true); }
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptional | ( | U const & | iLabel, |
ParameterSetDescription const & | validator | ||
) | [inline] |
Definition at line 183 of file ParameterSetDescription.h.
{ return addVPSet<U>(iLabel, validator, true, true, false); }
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.
{ return addVPSet<U>(iLabel, validator, defaults, false, true, true); }
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetOptionalUntracked | ( | U const & | iLabel, |
ParameterSetDescription const & | validator | ||
) | [inline] |
Definition at line 189 of file ParameterSetDescription.h.
{ return addVPSet<U>(iLabel, validator, false, true, false); }
ParameterDescriptionBase* edm::ParameterSetDescription::addVPSetUntracked | ( | U const & | iLabel, |
ParameterSetDescription const & | validator | ||
) | [inline] |
Definition at line 177 of file ParameterSetDescription.h.
{ return addVPSet<U>(iLabel, validator, false, false, false); }
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.
{ return addVPSet<U>(iLabel, validator, defaults, false, false, true); }
ParameterWildcardBase* edm::ParameterSetDescription::addWildcard | ( | U const & | pattern | ) | [inline] |
Definition at line 197 of file ParameterSetDescription.h.
References listBenchmarks::pattern.
{ return addWildcard<T, U>(pattern, true); }
ParameterWildcardBase * ParameterSetDescription::addWildcard | ( | U const & | pattern, |
bool | isTracked | ||
) | [private] |
Definition at line 474 of file ParameterSetDescription.h.
References addNode(), python::Node::node, and edm::RequireZeroOrMore.
{ std::auto_ptr<ParameterWildcardBase> pdbase(new ParameterWildcard<T>(pattern, RequireZeroOrMore, isTracked)); ParameterWildcardBase * pdReturn = pdbase.get(); std::auto_ptr<ParameterDescriptionNode> node(pdbase); addNode(node, true, false); return pdReturn; }
ParameterWildcardBase* edm::ParameterSetDescription::addWildcardUntracked | ( | U const & | pattern | ) | [inline] |
Definition at line 202 of file ParameterSetDescription.h.
References listBenchmarks::pattern.
Referenced by edm::service::RandomNumberGeneratorService::fillDescriptions().
{ return addWildcard<T, U>(pattern, false); }
bool edm::ParameterSetDescription::anythingAllowed | ( | ) | const [inline] |
Definition at line 303 of file ParameterSetDescription.h.
References anythingAllowed_.
Referenced by print(), and validate().
{ return anythingAllowed_; }
const_iterator edm::ParameterSetDescription::begin | ( | void | ) | const [inline] |
Definition at line 306 of file ParameterSetDescription.h.
References entries_.
{ return entries_.begin(); }
std::string const& edm::ParameterSetDescription::comment | ( | ) | const [inline] |
Definition at line 72 of file ParameterSetDescription.h.
References comment_.
Referenced by edm::ConfigurationDescriptions::printForLabel().
{ return comment_; }
const_iterator edm::ParameterSetDescription::end | ( | void | ) | const [inline] |
Definition at line 310 of file ParameterSetDescription.h.
References entries_.
{ return entries_.end(); }
ParameterDescriptionNode * ParameterSetDescription::ifExists | ( | ParameterDescriptionNode const & | node1, |
ParameterDescriptionNode const & | node2, | ||
bool | optional, | ||
bool | writeToCfi | ||
) | [private] |
Definition at line 401 of file ParameterSetDescription.cc.
References addNode().
{ std::auto_ptr<ParameterDescriptionNode> pdIfExists(new IfExistsDescription(node1, node2)); return addNode(pdIfExists, optional, writeToCfi); }
ParameterDescriptionNode* edm::ParameterSetDescription::ifExists | ( | ParameterDescriptionNode const & | node1, |
ParameterDescriptionNode const & | node2 | ||
) | [inline] |
Definition at line 234 of file ParameterSetDescription.h.
Referenced by ifExistsOptional().
{ return ifExists(node1, node2, false, true); }
ParameterDescriptionNode* edm::ParameterSetDescription::ifExistsOptional | ( | ParameterDescriptionNode const & | node1, |
ParameterDescriptionNode const & | node2, | ||
bool | writeToCfi | ||
) | [inline] |
Definition at line 240 of file ParameterSetDescription.h.
References ifExists().
{ return ifExists(node1, node2, true, writeToCfi); }
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(), and pat::PATMuonProducer::fillDescriptions().
{ return ifValue<T>(switchParameter, cases, false, true); }
ParameterDescriptionNode * ParameterSetDescription::ifValue | ( | ParameterDescription< T > const & | switchParameter, |
std::auto_ptr< ParameterDescriptionCases< T > > | cases, | ||
bool | optional, | ||
bool | writeToCfi | ||
) | [private] |
Definition at line 486 of file ParameterSetDescription.h.
References addNode().
{ std::auto_ptr<ParameterDescriptionNode> pdswitch(new ParameterSwitch<T>(switchParameter, cases)); return addNode(pdswitch, optional, writeToCfi); }
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.
{ return ifValue<T>(switchParameter, cases, true, writeToCfi); }
bool ParameterSetDescription::isLabelUnused | ( | std::string const & | label | ) | const |
Definition at line 234 of file ParameterSetDescription.cc.
References usedLabels_.
Referenced by edm::ConfigurationDescriptions::addDefault().
{ return usedLabels_.find(label) == usedLabels_.end(); }
bool edm::ParameterSetDescription::isUnknown | ( | ) | const [inline] |
Definition at line 304 of file ParameterSetDescription.h.
References unknown_.
Referenced by print(), and edm::ConfigurationDescriptions::print().
{ return unknown_; }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFrom | ( | U const & | iLabel | ) | [inline] |
Definition at line 249 of file ParameterSetDescription.h.
{ return labelsFrom<T,U>(iLabel, true, false, true); }
ParameterDescriptionNode * ParameterSetDescription::labelsFrom | ( | U const & | iLabel, |
bool | isTracked, | ||
bool | optional, | ||
bool | writeToCfi | ||
) | [private] |
Definition at line 495 of file ParameterSetDescription.h.
References addNode().
{ std::auto_ptr<ParameterDescriptionNode> pd(new AllowedLabelsDescription<T>(iLabel, isTracked)); return addNode(pd, optional, writeToCfi); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFrom | ( | U const & | iLabel, |
V const & | desc | ||
) | [inline] |
Definition at line 281 of file ParameterSetDescription.h.
{ return labelsFrom<T,U,V>(iLabel, true, false, true, desc); }
ParameterDescriptionNode * ParameterSetDescription::labelsFrom | ( | U const & | iLabel, |
bool | isTracked, | ||
bool | optional, | ||
bool | writeToCfi, | ||
V const & | desc | ||
) | [private] |
Definition at line 502 of file ParameterSetDescription.h.
References addNode().
{ std::auto_ptr<ParameterDescriptionNode> pd(new AllowedLabelsDescription<T>(iLabel, desc, isTracked)); return addNode(pd, optional, writeToCfi); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptional | ( | U const & | iLabel, |
bool | writeToCfi | ||
) | [inline] |
Definition at line 261 of file ParameterSetDescription.h.
{ return labelsFrom<T,U>(iLabel, true, true, writeToCfi); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptional | ( | U const & | iLabel, |
bool | writeToCfi, | ||
V const & | desc | ||
) | [inline] |
Definition at line 293 of file ParameterSetDescription.h.
{ return labelsFrom<T,U,V>(iLabel, true, true, writeToCfi, desc); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptionalUntracked | ( | U const & | iLabel, |
bool | writeToCfi, | ||
V const & | desc | ||
) | [inline] |
Definition at line 299 of file ParameterSetDescription.h.
{ return labelsFrom<T,U,V>(iLabel, false, true, writeToCfi, desc); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromOptionalUntracked | ( | U const & | iLabel, |
bool | writeToCfi | ||
) | [inline] |
Definition at line 267 of file ParameterSetDescription.h.
{ return labelsFrom<T,U>(iLabel, false, true, writeToCfi); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromUntracked | ( | U const & | iLabel | ) | [inline] |
Definition at line 255 of file ParameterSetDescription.h.
{ return labelsFrom<T,U>(iLabel, false, false, true); }
ParameterDescriptionNode* edm::ParameterSetDescription::labelsFromUntracked | ( | U const & | iLabel, |
V const & | desc | ||
) | [inline] |
Definition at line 287 of file ParameterSetDescription.h.
{ return labelsFrom<T,U,V>(iLabel, false, false, true, desc); }
void ParameterSetDescription::print | ( | std::ostream & | os, |
DocFormatHelper & | dfh | ||
) | const |
Definition at line 181 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_().
{ if (isUnknown()) { dfh.indent(os); os << "Description is unknown. The configured PSet will not be validated\n"; dfh.indent(os); os << "because the plugin has not defined this parameter set description.\n"; if (!dfh.brief()) os << "\n"; } if (anythingAllowed()) { dfh.indent(os); os << "Description allows anything and requires nothing.\n"; dfh.indent(os); os << "The configured PSet will not be validated.\n"; if (!dfh.brief()) os << "\n"; } if (entries_.empty()) { dfh.indent(os); os << "Description is empty\n"; if (!dfh.brief()) os << "\n"; return; } // Zeroth pass is only to calculate column widths in advance of any printing dfh.setPass(0); dfh.setCounter(0); for_all(entries_, boost::bind(&ParameterSetDescription::printNode, _1, boost::ref(os), boost::ref(dfh))); // First pass prints top level parameters and references to structure dfh.setPass(1); dfh.setCounter(0); for_all(entries_, boost::bind(&ParameterSetDescription::printNode, _1, boost::ref(os), boost::ref(dfh))); // Second pass prints substructure that goes into different sections of the // output document dfh.setPass(2); dfh.setCounter(0); for_all(entries_, boost::bind(&ParameterSetDescription::printNode, _1, boost::ref(os), boost::ref(dfh))); }
void ParameterSetDescription::printNode | ( | SetDescriptionEntry const & | entry, |
std::ostream & | os, | ||
DocFormatHelper & | dfh | ||
) | [static, private] |
Definition at line 287 of file ParameterSetDescription.cc.
References edm::ParameterSetDescription::SetDescriptionEntry::node(), edm::ParameterSetDescription::SetDescriptionEntry::optional(), edm::DocFormatHelper::pass(), and edm::ParameterSetDescription::SetDescriptionEntry::writeToCfi().
Referenced by print().
void edm::ParameterSetDescription::reserve | ( | SetDescriptionEntries::size_type | n | ) | [inline] |
Definition at line 316 of file ParameterSetDescription.h.
References entries_.
void ParameterSetDescription::setAllowAnything | ( | ) |
allow any parameter label/value pairs
Definition at line 48 of file ParameterSetDescription.cc.
References anythingAllowed_.
Referenced by pat::helper::KinResolutionsLoader::fillDescription(), pat::PATElectronProducer::fillDescriptions(), pat::PATPhotonProducer::fillDescriptions(), edm::PoolOutputModule::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), and pat::PATMuonProducer::fillDescriptions().
{ anythingAllowed_ = true; }
void ParameterSetDescription::setComment | ( | char const * | value | ) |
Definition at line 44 of file ParameterSetDescription.cc.
References comment_, and relativeConstraints::value.
void ParameterSetDescription::setComment | ( | std::string const & | value | ) |
Definition at line 40 of file ParameterSetDescription.cc.
References comment_, and relativeConstraints::value.
Referenced by edm::StreamerFileWriter::fillDescription(), pat::PATPhotonProducer::fillDescriptions(), pat::PATElectronProducer::fillDescriptions(), edm::PoolOutputModule::fillDescriptions(), edm::XMLOutputModule::fillDescriptions(), pat::PATTauProducer::fillDescriptions(), pat::PATJetProducer::fillDescriptions(), edm::StreamerFileReader::fillDescriptions(), edm::EmptySource::fillDescriptions(), pat::PATMETProducer::fillDescriptions(), edm::AsciiOutputModule::fillDescriptions(), edm::service::InitRootHandlers::fillDescriptions(), edm::service::EnableFloatingPointExceptions::fillDescriptions(), edm::service::SiteLocalConfigService::fillDescriptions(), pat::PATMuonProducer::fillDescriptions(), and edm::service::JobReportService::fillDescriptions().
void ParameterSetDescription::setUnknown | ( | ) |
Definition at line 54 of file ParameterSetDescription.cc.
References unknown_.
Referenced by prodname::fillDescriptions(), edm::OutputModule::fillDescriptions(), edm::EDProducer::fillDescriptions(), anlzrname::fillDescriptions(), edm::EDFilter::fillDescriptions(), DQMRootOutputModule::fillDescriptions(), edm::InputSource::fillDescriptions(), edm::EDAnalyzer::fillDescriptions(), fltrname::fillDescriptions(), and edm::fillDetails::DoFillAsUnknown< T >::operator()().
{ unknown_ = true; }
void ParameterSetDescription::throwIfLabelsAlreadyUsed | ( | std::set< std::string > const & | nodeLabels | ) | [private] |
Definition at line 300 of file ParameterSetDescription.cc.
References Exception, edm::errors::LogicError, and usedLabels_.
Referenced by addNode().
{ std::set<std::string> duplicateLabels; std::insert_iterator<std::set<std::string> > insertIter(duplicateLabels, duplicateLabels.begin()); std::set_intersection(nodeLabels.begin(), nodeLabels.end(), usedLabels_.begin(), usedLabels_.end(), insertIter); if (duplicateLabels.empty()) { usedLabels_.insert(nodeLabels.begin(), nodeLabels.end()); } else { std::stringstream ss; for (std::set<std::string>::const_iterator iter = duplicateLabels.begin(), iEnd = duplicateLabels.end(); iter != iEnd; ++iter) { ss << " \"" << *iter << "\"\n"; } throw edm::Exception(errors::LogicError) << "Labels used in different nodes of a ParameterSetDescription\n" << "must be unique. The following duplicate labels were detected:\n" << ss.str() << "\n"; } }
void ParameterSetDescription::throwIfWildcardCollision | ( | std::set< ParameterTypes > const & | nodeParameterTypes, |
std::set< ParameterTypes > const & | nodeWildcardTypes | ||
) | [private] |
Definition at line 329 of file ParameterSetDescription.cc.
References Exception, edm::errors::LogicError, edm::parameterTypeEnumToString(), typesUsedForParameters_, and typesUsedForWildcards_.
Referenced by addNode().
{ // 1. Check that the new wildcard types do not collide with the existing // parameter types. // 2. Check that the new parameter types do not collide with the existing // wildcard types. // 3. Then insert them. // The order of those steps is important because a wildcard with a default // value could insert a type in both sets and this is OK. // We assume the node already checked for collisions between the new parameter // types and the new wildcard types before passing the sets to this function. if (!nodeWildcardTypes.empty()) { std::set<ParameterTypes> duplicateTypes1; std::insert_iterator<std::set<ParameterTypes> > insertIter1(duplicateTypes1, duplicateTypes1.begin()); std::set_intersection(typesUsedForParameters_.begin(), typesUsedForParameters_.end(), nodeWildcardTypes.begin(), nodeWildcardTypes.end(), insertIter1); if (!duplicateTypes1.empty()) { std::stringstream ss; for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes1.begin(), iEnd = duplicateTypes1.end(); iter != iEnd; ++iter) { ss << " \"" << parameterTypeEnumToString(*iter) << "\"\n"; } throw edm::Exception(errors::LogicError) << "Within a ParameterSetDescription, the type used for a wildcard must\n" << "not be the same as the type used for other parameters. This rule\n" << "is violated for the following types:\n" << ss.str() << "\n"; } } if (!typesUsedForWildcards_.empty()) { std::set<ParameterTypes> duplicateTypes2; std::insert_iterator<std::set<ParameterTypes> > insertIter2(duplicateTypes2, duplicateTypes2.begin()); std::set_intersection(typesUsedForWildcards_.begin(), typesUsedForWildcards_.end(), nodeParameterTypes.begin(), nodeParameterTypes.end(), insertIter2); if (!duplicateTypes2.empty()) { std::stringstream ss; for (std::set<ParameterTypes>::const_iterator iter = duplicateTypes2.begin(), iEnd = duplicateTypes2.end(); iter != iEnd; ++iter) { ss << " \"" << parameterTypeEnumToString(*iter) << "\"\n"; } throw edm::Exception(errors::LogicError) << "Within a ParameterSetDescription, the type used for a wildcard must\n" << "not be the same as the type used for other parameters. This rule is\n" << "violated for the following types :\n" << ss.str() << "\n"; } } typesUsedForParameters_.insert(nodeParameterTypes.begin(), nodeParameterTypes.end()); typesUsedForWildcards_.insert(nodeWildcardTypes.begin(), nodeWildcardTypes.end()); }
void ParameterSetDescription::throwIllegalParameters | ( | std::vector< std::string > const & | parameterNames, |
std::set< std::string > const & | validatedNames | ||
) | [static, private] |
Definition at line 239 of file ParameterSetDescription.cc.
References edm::errors::Configuration, and Exception.
Referenced by validate().
{ std::set<std::string> parNames(parameterNames.begin(), parameterNames.end()); std::set<std::string> diffNames; std::insert_iterator<std::set<std::string> > insertIter(diffNames, diffNames.begin()); std::set_difference(parNames.begin(), parNames.end(), validatedLabels.begin(), validatedLabels.end(), insertIter); std::stringstream ss; for (std::set<std::string>::const_iterator iter = diffNames.begin(), iEnd = diffNames.end(); iter != iEnd; ++iter) { ss << " \"" << *iter << "\"\n"; } if (diffNames.size() == 1U) { throw edm::Exception(errors::Configuration) << "Illegal parameter found in configuration. The parameter is named:\n" << ss.str() << "You could be trying to use a parameter name that is not\n" << "allowed for this plugin or it could be misspelled.\n"; } else { throw edm::Exception(errors::Configuration) << "Illegal parameters found in configuration. The parameters are named:\n" << ss.str() << "You could be trying to use parameter names that are not\n" << "allowed for this plugin or they could be misspelled.\n"; } }
void ParameterSetDescription::validate | ( | ParameterSet & | pset | ) | const |
Definition at line 108 of file ParameterSetDescription.cc.
References anythingAllowed(), entries_, edm::ParameterSet::exists(), edm::for_all(), edm::ParameterSet::getParameterNames(), edm::IllegalParameters::throwAnException(), throwIllegalParameters(), unknown_, and validateNode().
Referenced by edm::ConfigurationDescriptions::validate().
{ if (unknown_ || anythingAllowed()) return; std::set<std::string> validatedLabels; for_all(entries_, boost::bind(&ParameterSetDescription::validateNode, _1, boost::ref(pset), boost::ref(validatedLabels))); std::vector<std::string> parameterNames = pset.getParameterNames(); if (validatedLabels.size() != parameterNames.size()) { // Three labels will be magically inserted into the top level // of a module ParameterSet even though they are not in the // python configuration files. If these are present, then // assume they are OK and count them as validated. std::string module_label("@module_label"); if (pset.exists(module_label)) { validatedLabels.insert(module_label); } std::string module_type("@module_type"); if (pset.exists(module_type)) { validatedLabels.insert(module_type); } std::string module_edm_type("@module_edm_type"); if (pset.exists(module_edm_type)) { validatedLabels.insert(module_edm_type); } std::string service_type("@service_type"); if (pset.exists(service_type)) { validatedLabels.insert(service_type); } // Try again if (validatedLabels.size() != parameterNames.size()) { if (IllegalParameters::throwAnException()) { throwIllegalParameters(parameterNames, validatedLabels); } } } }
void ParameterSetDescription::validateNode | ( | SetDescriptionEntry const & | entry, |
ParameterSet & | pset, | ||
std::set< std::string > & | validatedNames | ||
) | [static, private] |
Definition at line 174 of file ParameterSetDescription.cc.
References edm::ParameterSetDescription::SetDescriptionEntry::node(), and edm::ParameterSetDescription::SetDescriptionEntry::optional().
Referenced by validate().
void ParameterSetDescription::writeCfi | ( | std::ostream & | os, |
bool | startWithComma, | ||
int | indentation | ||
) | const |
Definition at line 154 of file ParameterSetDescription.cc.
References entries_, edm::for_all(), and writeNode().
Referenced by edm::ParameterDescription< std::vector< ParameterSet > >::writeOneElementToCfi().
{ bool wroteSomething = false; for_all(entries_, boost::bind(&ParameterSetDescription::writeNode, _1, boost::ref(os), boost::ref(startWithComma), indentation, boost::ref(wroteSomething))); if (wroteSomething) { char oldFill = os.fill(); os << "\n" << std::setfill(' ') << std::setw(indentation - 2) << ""; os.fill(oldFill); } }
void ParameterSetDescription::writeNode | ( | SetDescriptionEntry const & | entry, |
std::ostream & | os, | ||
bool & | startWithComma, | ||
int | indentation, | ||
bool & | wroteSomething | ||
) | [static, private] |
Definition at line 276 of file ParameterSetDescription.cc.
References edm::ParameterSetDescription::SetDescriptionEntry::node(), and edm::ParameterSetDescription::SetDescriptionEntry::writeToCfi().
Referenced by writeCfi().
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().
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().