#include <VParameterSetEntry.h>
Public Member Functions | |
bool | isTracked () const |
ParameterSet & | psetInVector (int i) |
void | registerPsetsAndUpdateIDs () |
std::vector< ParameterSet > ::size_type | size () const |
void | toDigest (cms::Digest &digest) const |
std::string | toString () const |
void | toString (std::string &result) const |
VParameterSetEntry (std::vector< ParameterSet > const &vpset, bool isTracked) | |
VParameterSetEntry () | |
VParameterSetEntry (std::string const &rep) | |
std::vector< ParameterSet > const & | vpset () const |
std::vector< ParameterSet > & | vpset () |
~VParameterSetEntry () | |
Private Attributes | |
value_ptr< std::vector < ParameterSetID > > | theIDs |
value_ptr< std::vector < ParameterSet > > | theVPSet |
bool | tracked |
Friends | |
std::ostream & | operator<< (std::ostream &os, VParameterSetEntry const &vpsetEntry) |
Definition at line 22 of file VParameterSetEntry.h.
edm::VParameterSetEntry::VParameterSetEntry | ( | ) |
Definition at line 11 of file VParameterSetEntry.cc.
edm::VParameterSetEntry::VParameterSetEntry | ( | std::vector< ParameterSet > const & | vpset, |
bool | isTracked | ||
) |
edm::VParameterSetEntry::VParameterSetEntry | ( | std::string const & | rep | ) |
Definition at line 26 of file VParameterSetEntry.cc.
References i, edm::split(), cond::rpcobtemp::temp, and theIDs.
: tracked(rep[0] == '+'), theVPSet(), theIDs(new std::vector<ParameterSetID>) { assert(rep[0] == '+' || rep[0] == '-'); std::vector<std::string> temp; // need a substring that starts at the '{' std::string bracketedRepr(rep.begin()+2, rep.end()); split(std::back_inserter(temp), bracketedRepr, '{', ',', '}'); theIDs->reserve(temp.size()); for (std::vector<std::string>::const_iterator i = temp.begin(), e = temp.end(); i != e; ++i) { theIDs->push_back(ParameterSetID(*i)); } }
edm::VParameterSetEntry::~VParameterSetEntry | ( | ) |
Definition at line 41 of file VParameterSetEntry.cc.
{}
bool edm::VParameterSetEntry::isTracked | ( | ) | const [inline] |
Definition at line 35 of file VParameterSetEntry.h.
References tracked.
Referenced by FWPSetTableManager::handleVPSetEntry(), edm::operator<<(), and prettyPrint().
{return tracked;}
ParameterSet & edm::VParameterSetEntry::psetInVector | ( | int | i | ) |
Definition at line 102 of file VParameterSetEntry.cc.
References theVPSet.
Referenced by edm::ParameterDescription< std::vector< ParameterSet > >::validate_(), edm::AllowedLabelsDescription< std::vector< ParameterSet > >::validateAllowedLabel_(), and edm::ParameterWildcard< std::vector< ParameterSet > >::validatePSetVector().
void edm::VParameterSetEntry::registerPsetsAndUpdateIDs | ( | ) |
Definition at line 107 of file VParameterSetEntry.cc.
References i, theIDs, theVPSet, and vpset().
{ vpset(); theIDs = value_ptr<std::vector<ParameterSetID> >(new std::vector<ParameterSetID>); theIDs->resize(theVPSet->size()); for (std::vector<ParameterSet>::iterator i = theVPSet->begin(), e = theVPSet->end(); i != e; ++i) { if (!i->isRegistered()) { i->registerIt(); } theIDs->at(i - theVPSet->begin()) = i->id(); } }
std::vector<ParameterSet>::size_type edm::VParameterSetEntry::size | ( | void | ) | const [inline] |
Definition at line 43 of file VParameterSetEntry.h.
References vpset().
Referenced by edm::ParameterDescription< std::vector< ParameterSet > >::validate_(), edm::AllowedLabelsDescription< std::vector< ParameterSet > >::validateAllowedLabel_(), and edm::ParameterWildcard< std::vector< ParameterSet > >::validatePSetVector().
{ return vpset().size(); }
void edm::VParameterSetEntry::toDigest | ( | cms::Digest & | digest | ) | const |
Definition at line 59 of file VParameterSetEntry.cc.
References cms::Digest::append(), i, theIDs, and tracked.
std::string edm::VParameterSetEntry::toString | ( | ) | const |
Definition at line 72 of file VParameterSetEntry.cc.
References query::result.
Referenced by edm::ParameterSet::getParameterAsString().
void edm::VParameterSetEntry::toString | ( | std::string & | result | ) | const |
Definition at line 44 of file VParameterSetEntry.cc.
std::vector< ParameterSet > & edm::VParameterSetEntry::vpset | ( | ) |
Definition at line 90 of file VParameterSetEntry.cc.
References edm::getParameterSet(), i, theIDs, and theVPSet.
{ if (!theVPSet) { assert(theIDs); theVPSet = value_ptr<std::vector<ParameterSet> >(new std::vector<ParameterSet>); theVPSet->reserve(theIDs->size()); for (std::vector<ParameterSetID>::const_iterator i = theIDs->begin(), e = theIDs->end(); i != e; ++i) { theVPSet->push_back(getParameterSet(*i)); } } return *theVPSet; }
std::vector< ParameterSet > const & edm::VParameterSetEntry::vpset | ( | ) | const |
returns the VPSet, reconstituting it from the Registry, if necessary
Definition at line 78 of file VParameterSetEntry.cc.
References edm::getParameterSet(), i, theIDs, and theVPSet.
Referenced by edm::ParameterSet::getParameterSetVector(), edm::ParameterSet::getUntrackedParameterSetVector(), FWPSetTableManager::handleVPSetEntry(), edm::operator<<(), prettyPrint(), registerPsetsAndUpdateIDs(), and size().
{ if (!theVPSet) { assert(theIDs); theVPSet = value_ptr<std::vector<ParameterSet> >(new std::vector<ParameterSet>); theVPSet->reserve(theIDs->size()); for (std::vector<ParameterSetID>::const_iterator i = theIDs->begin(), e = theIDs->end(); i != e; ++i) { theVPSet->push_back(getParameterSet(*i)); } } return *theVPSet; }
std::ostream& operator<< | ( | std::ostream & | os, |
VParameterSetEntry const & | vpsetEntry | ||
) | [friend] |
Definition at line 119 of file VParameterSetEntry.cc.
{ std::vector<ParameterSet> const& vps = vpsetEntry.vpset(); os << "VPSet "<<(vpsetEntry.isTracked()?"tracked":"untracked")<<" = ({" << std::endl; std::string start; std::string const between(",\n"); for(std::vector<ParameterSet>::const_iterator i = vps.begin(), e = vps.end(); i != e; ++i) { os << start << *i; start = between; } if (!vps.empty()) { os << std::endl; } os << "})"; return os; }
value_ptr<std::vector<ParameterSetID> > edm::VParameterSetEntry::theIDs [mutable, private] |
Definition at line 53 of file VParameterSetEntry.h.
Referenced by registerPsetsAndUpdateIDs(), toDigest(), toString(), VParameterSetEntry(), and vpset().
value_ptr<std::vector<ParameterSet> > edm::VParameterSetEntry::theVPSet [mutable, private] |
Definition at line 52 of file VParameterSetEntry.h.
Referenced by psetInVector(), registerPsetsAndUpdateIDs(), VParameterSetEntry(), and vpset().
bool edm::VParameterSetEntry::tracked [private] |
Definition at line 51 of file VParameterSetEntry.h.
Referenced by isTracked(), toDigest(), and toString().