#include <ParameterSetEntry.h>
Public Member Functions | |
ParameterSetID | id () const |
bool | isTracked () const |
ParameterSetEntry () | |
ParameterSetEntry (std::string const &rep) | |
ParameterSetEntry (ParameterSet const &pset, bool isTracked) | |
ParameterSetEntry (ParameterSetID const &id, bool isTracked) | |
ParameterSet & | pset () |
ParameterSet const & | pset () const |
void | toString (std::string &result) const |
std::string | toString () 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 18 of file ParameterSetEntry.h.
edm::ParameterSetEntry::ParameterSetEntry | ( | ) |
Definition at line 9 of file ParameterSetEntry.cc.
: isTracked_(false), thePSet_(0), theID_() { }
edm::ParameterSetEntry::ParameterSetEntry | ( | ParameterSet const & | pset, |
bool | isTracked | ||
) |
Definition at line 16 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 26 of file ParameterSetEntry.cc.
: isTracked_(isTracked), thePSet_(), theID_(id) { }
edm::ParameterSetEntry::ParameterSetEntry | ( | std::string const & | rep | ) | [explicit] |
Definition at line 33 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 45 of file ParameterSetEntry.cc.
{}
ParameterSetID edm::ParameterSetEntry::id | ( | void | ) | const [inline] |
bool edm::ParameterSetEntry::isTracked | ( | ) | const [inline] |
Definition at line 32 of file ParameterSetEntry.h.
References isTracked_.
Referenced by FWPSetTableManager::handlePSetEntry(), edm::operator<<(), prettyPrint(), and toString().
{return isTracked_;}
ParameterSet const & edm::ParameterSetEntry::pset | ( | ) | const |
returns the PSet, reconstituting it from the Registry, if necessary
Definition at line 67 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_; }
ParameterSet & edm::ParameterSetEntry::pset | ( | ) |
Definition at line 75 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_; }
void edm::ParameterSetEntry::toString | ( | std::string & | result | ) | const |
Definition at line 48 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 61 of file ParameterSetEntry.cc.
References query::result.
Referenced by edm::ParameterSet::getParameterAsString().
void edm::ParameterSetEntry::updateID | ( | ) | const |
Definition at line 83 of file ParameterSetEntry.cc.
References edm::ParameterSet::id(), pset(), and theID_.
std::ostream& operator<< | ( | std::ostream & | os, |
ParameterSetEntry const & | psetEntry | ||
) | [friend] |
Definition at line 88 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 47 of file ParameterSetEntry.h.
Referenced by isTracked().
ParameterSetID edm::ParameterSetEntry::theID_ [mutable, private] |
Definition at line 53 of file ParameterSetEntry.h.
Referenced by id(), ParameterSetEntry(), pset(), toString(), and updateID().
value_ptr<ParameterSet> edm::ParameterSetEntry::thePSet_ [mutable, private] |
Definition at line 50 of file ParameterSetEntry.h.
Referenced by pset().