#include <ParameterSetEntry.h>
Public Member Functions | |
ParameterSetID | id () const |
bool | isTracked () const |
ParameterSetEntry (ParameterSet const &pset, bool isTracked) | |
ParameterSetEntry (std::string const &rep) | |
ParameterSetEntry () | |
ParameterSetEntry (ParameterSetID const &id, bool isTracked) | |
ParameterSet const & | pset () const |
ParameterSet & | pset () |
void | toDigest (cms::Digest &digest) const |
std::string | toString () const |
void | toString (std::string &result) const |
void | updateID () const |
~ParameterSetEntry () | |
Private Attributes | |
bool | isTracked_ |
ParameterSetID | theID_ |
value_ptr< ParameterSet > | thePSet_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, ParameterSetEntry const &psetEntry) |
Definition at line 21 of file ParameterSetEntry.h.
edm::ParameterSetEntry::ParameterSetEntry | ( | ) |
Definition at line 11 of file ParameterSetEntry.cc.
: isTracked_(false), thePSet_(0), theID_() { }
edm::ParameterSetEntry::ParameterSetEntry | ( | ParameterSet const & | pset, |
bool | isTracked | ||
) |
Definition at line 18 of file ParameterSetEntry.cc.
References edm::ParameterSet::id(), edm::ParameterSet::isRegistered(), and theID_.
: isTracked_(isTracked), thePSet_(new ParameterSet(pset)), theID_() { if (pset.isRegistered()) { theID_ = pset.id(); } }
edm::ParameterSetEntry::ParameterSetEntry | ( | ParameterSetID const & | id, |
bool | isTracked | ||
) |
Definition at line 28 of file ParameterSetEntry.cc.
: isTracked_(isTracked), thePSet_(), theID_(id) { }
edm::ParameterSetEntry::ParameterSetEntry | ( | std::string const & | rep | ) | [explicit] |
Definition at line 35 of file ParameterSetEntry.cc.
References edm::Hash< I >::swap(), and theID_.
: isTracked_(rep[0] == '+'), thePSet_(), theID_() { assert(rep[0] == '+' || rep[0] == '-'); assert(rep[2] == '('); assert(rep[rep.size()-1] == ')'); ParameterSetID newID(std::string(rep.begin()+3, rep.end()-1) ); theID_.swap(newID); }
edm::ParameterSetEntry::~ParameterSetEntry | ( | ) |
Definition at line 47 of file ParameterSetEntry.cc.
{}
ParameterSetID edm::ParameterSetEntry::id | ( | void | ) | const [inline] |
bool edm::ParameterSetEntry::isTracked | ( | ) | const [inline] |
Definition at line 36 of file ParameterSetEntry.h.
References isTracked_.
Referenced by FWPSetTableManager::handlePSetEntry(), edm::operator<<(), prettyPrint(), toDigest(), and toString().
{return isTracked_;}
ParameterSet & edm::ParameterSetEntry::pset | ( | ) |
Definition at line 90 of file ParameterSetEntry.cc.
References edm::getParameterSet(), theID_, and thePSet_.
{ if(!thePSet_) { // get it from the registry, and save it here thePSet_ = value_ptr<ParameterSet>(new ParameterSet(getParameterSet(theID_))); } return *thePSet_; }
ParameterSet const & edm::ParameterSetEntry::pset | ( | ) | const |
returns the PSet, reconstituting it from the Registry, if necessary
Definition at line 82 of file ParameterSetEntry.cc.
References edm::getParameterSet(), theID_, and thePSet_.
Referenced by edm::ParameterSet::getParameterSet(), edm::ParameterSet::getUntrackedParameterSet(), FWPSetTableManager::handlePSetEntry(), edm::operator<<(), prettyPrint(), and updateID().
{ if(!thePSet_) { // get it from the registry, and save it here thePSet_ = value_ptr<ParameterSet>(new ParameterSet(getParameterSet(theID_))); } return *thePSet_; }
void edm::ParameterSetEntry::toDigest | ( | cms::Digest & | digest | ) | const |
Definition at line 63 of file ParameterSetEntry.cc.
References cms::Digest::append(), Exception, isTracked(), edm::Hash< I >::isValid(), edm::errors::LogicError, theID_, and edm::Hash< I >::toDigest().
{ digest.append(isTracked() ? "+Q(" : "-Q(", 3); if (!theID_.isValid()) { throw edm::Exception(edm::errors::LogicError) << "ParameterSet::toString() called prematurely\n" << "before ParameterSet::registerIt() has been called\n" << "for all nested parameter sets\n"; } theID_.toDigest(digest); digest.append(")", 1); }
void edm::ParameterSetEntry::toString | ( | std::string & | result | ) | const |
Definition at line 50 of file ParameterSetEntry.cc.
References Exception, isTracked(), edm::Hash< I >::isValid(), edm::errors::LogicError, theID_, and edm::Hash< I >::toString().
{ result += isTracked() ? "+Q(" : "-Q("; if (!theID_.isValid()) { throw edm::Exception(edm::errors::LogicError) << "ParameterSet::toString() called prematurely\n" << "before ParameterSet::registerIt() has been called\n" << "for all nested parameter sets\n"; } theID_.toString(result); result += ')'; }
std::string edm::ParameterSetEntry::toString | ( | ) | const |
Definition at line 76 of file ParameterSetEntry.cc.
References query::result.
Referenced by edm::ParameterSet::getParameterAsString().
void edm::ParameterSetEntry::updateID | ( | ) | const |
Definition at line 98 of file ParameterSetEntry.cc.
References edm::ParameterSet::id(), pset(), and theID_.
std::ostream& operator<< | ( | std::ostream & | os, |
ParameterSetEntry const & | psetEntry | ||
) | [friend] |
Definition at line 103 of file ParameterSetEntry.cc.
{ const char* trackiness = (psetEntry.isTracked()?"tracked":"untracked"); os << "PSet "<<trackiness<<" = ("<< psetEntry.pset() << ")"; return os; }
bool edm::ParameterSetEntry::isTracked_ [private] |
Definition at line 51 of file ParameterSetEntry.h.
Referenced by isTracked().
ParameterSetID edm::ParameterSetEntry::theID_ [mutable, private] |
Definition at line 57 of file ParameterSetEntry.h.
Referenced by id(), ParameterSetEntry(), pset(), toDigest(), toString(), and updateID().
value_ptr<ParameterSet> edm::ParameterSetEntry::thePSet_ [mutable, private] |
Definition at line 54 of file ParameterSetEntry.h.
Referenced by pset().