#include <Entry.h>
Public Member Functions | |
Entry (std::string const &name, bool val, bool is_tracked) | |
Entry (std::string const &name, std::vector< int > const &val, bool is_tracked) | |
Entry (std::string const &name, std::vector< unsigned > const &val, bool is_tracked) | |
Entry (std::string const &name, std::vector< unsigned long long > const &val, bool is_tracked) | |
Entry (std::string const &name, ESInputTag const &tag, bool is_tracked) | |
Entry (std::string const &name, std::vector< ESInputTag > const &vtag, bool is_tracked) | |
Entry (std::string const &name, double val, bool is_tracked) | |
Entry (std::string const &name, EventID const &tag, bool is_tracked) | |
Entry (std::string const &name, std::string const &type, std::vector< std::string > const &value, bool is_tracked) | |
Entry (std::string const &name, std::vector< EventID > const &vtag, bool is_tracked) | |
Entry (std::string const &name, long long val, bool is_tracked) | |
Entry (std::string const &name, std::vector< double > const &val, bool is_tracked) | |
Entry (std::string const &name, LuminosityBlockID const &tag, bool is_tracked) | |
Entry (std::string const &name, std::vector< LuminosityBlockID > const &vtag, bool is_tracked) | |
Entry (std::string const &name, std::string const &val, bool is_tracked) | |
Entry (std::string const &name, LuminosityBlockRange const &tag, bool is_tracked) | |
Entry (std::string const &name, std::vector< LuminosityBlockRange > const &vtag, bool is_tracked) | |
Entry (std::string const &name, int val, bool is_tracked) | |
Entry (std::string const &name, std::vector< long long > const &val, bool is_tracked) | |
Entry (std::string const &name, std::vector< std::string > const &val, bool is_tracked) | |
Entry (std::string const &name, EventRange const &tag, bool is_tracked) | |
Entry (std::string const &name, std::vector< EventRange > const &vtag, bool is_tracked) | |
Entry (std::string const &name, FileInPath const &val, bool is_tracked) | |
Entry (std::string const &name, ParameterSet const &val, bool is_tracked) | |
Entry (std::string const &name, std::vector< ParameterSet > const &val, bool is_tracked) | |
Entry (std::string const &name, unsigned val, bool is_tracked) | |
Entry (std::string const &name, InputTag const &tag, bool is_tracked) | |
Entry (std::string const &name, std::string const &) | |
Entry (std::string const &name, std::string const &type, std::string const &value, bool is_tracked) | |
Entry (std::string const &name, unsigned long long val, bool is_tracked) | |
Entry (std::string const &name, std::vector< InputTag > const &vtag, bool is_tracked) | |
bool | getBool () const |
double | getDouble () const |
ESInputTag | getESInputTag () const |
EventID | getEventID () const |
EventRange | getEventRange () const |
FileInPath | getFileInPath () const |
InputTag | getInputTag () const |
int | getInt32 () const |
long long | getInt64 () const |
LuminosityBlockID | getLuminosityBlockID () const |
LuminosityBlockRange | getLuminosityBlockRange () const |
ParameterSet | getPSet () const |
std::string | getString () const |
unsigned | getUInt32 () const |
unsigned long long | getUInt64 () const |
std::vector< double > | getVDouble () const |
std::vector< ESInputTag > | getVESInputTag () const |
std::vector< EventID > | getVEventID () const |
std::vector< EventRange > | getVEventRange () const |
std::vector< InputTag > | getVInputTag () const |
std::vector< int > | getVInt32 () const |
std::vector< long long > | getVInt64 () const |
std::vector< LuminosityBlockID > | getVLuminosityBlockID () const |
std::vector< LuminosityBlockRange > | getVLuminosityBlockRange () const |
std::vector< ParameterSet > | getVPSet () const |
std::vector< std::string > | getVString () const |
std::vector< unsigned > | getVUInt32 () const |
std::vector< unsigned long long > | getVUInt64 () const |
bool | isTracked () const |
size_t | sizeOfString () const |
void | toDigest (cms::Digest &digest) const |
void | toString (std::string &result) const |
std::string | toString () const |
char | typeCode () const |
~Entry () | |
Private Member Functions | |
bool | fromString (std::string::const_iterator b, std::string::const_iterator e) |
void | throwEncodeError (char const *type) const |
void | throwEntryError (char const *expectedType, std::string const &badRep) const |
void | throwValueError (char const *expectedType) const |
void | validate () const |
Private Attributes | |
std::string | name_ |
std::string | rep |
char | tracked |
char | type |
Friends | |
std::ostream & | operator<< (std::ostream &ost, Entry const &entry) |
Entry::Entry | ( | std::string const & | name, |
bool | val, | ||
bool | is_tracked | ||
) |
Definition at line 257 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
int | val, | ||
bool | is_tracked | ||
) |
Definition at line 266 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< int > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 275 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
unsigned | val, | ||
bool | is_tracked | ||
) |
Definition at line 284 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< unsigned > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 293 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
long long | val, | ||
bool | is_tracked | ||
) |
Definition at line 302 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< long long > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 311 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
unsigned long long | val, | ||
bool | is_tracked | ||
) |
Definition at line 320 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< unsigned long long > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 329 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
double | val, | ||
bool | is_tracked | ||
) |
Definition at line 338 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< double > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 347 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::string const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 356 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< std::string > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 365 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
FileInPath const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 374 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
InputTag const & | tag, | ||
bool | is_tracked | ||
) |
Definition at line 383 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< InputTag > const & | vtag, | ||
bool | is_tracked | ||
) |
Definition at line 393 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
ESInputTag const & | tag, | ||
bool | is_tracked | ||
) |
Definition at line 403 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
: name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') { if (!encode(rep, val)) throwEncodeError("InputTag"); validate(); }
Entry::Entry | ( | std::string const & | name, |
std::vector< ESInputTag > const & | vtag, | ||
bool | is_tracked | ||
) |
Definition at line 412 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
: name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') { if (!encode(rep, val)) throwEncodeError("VESInputTag"); validate(); }
Entry::Entry | ( | std::string const & | name, |
EventID const & | tag, | ||
bool | is_tracked | ||
) |
Definition at line 422 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< EventID > const & | vtag, | ||
bool | is_tracked | ||
) |
Definition at line 432 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
LuminosityBlockID const & | tag, | ||
bool | is_tracked | ||
) |
Definition at line 443 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< LuminosityBlockID > const & | vtag, | ||
bool | is_tracked | ||
) |
Definition at line 453 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
LuminosityBlockRange const & | tag, | ||
bool | is_tracked | ||
) |
Definition at line 462 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< LuminosityBlockRange > const & | vtag, | ||
bool | is_tracked | ||
) |
Definition at line 472 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
EventRange const & | tag, | ||
bool | is_tracked | ||
) |
Definition at line 481 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< EventRange > const & | vtag, | ||
bool | is_tracked | ||
) |
Definition at line 490 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
ParameterSet const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 500 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::vector< ParameterSet > const & | val, | ||
bool | is_tracked | ||
) |
Definition at line 509 of file Entry.cc.
References edm::encode(), rep, throwEncodeError(), and validate().
Entry::Entry | ( | std::string const & | name, |
std::string const & | code | ||
) |
Definition at line 518 of file Entry.cc.
References fromString(), throwEncodeError(), and validate().
: name_(name), rep(), type('?'), tracked('?') { if(!fromString(code.begin(), code.end())) throwEncodeError("coded string"); validate(); }
Entry::Entry | ( | std::string const & | name, |
std::string const & | type, | ||
std::string const & | value, | ||
bool | is_tracked | ||
) |
Definition at line 526 of file Entry.cc.
References edm::errors::Configuration, Exception, fromString(), edm::sTypeTranslations, type, edm::pset::TypeTrans::type2Code_, validate(), and relativeConstraints::value.
: name_(name), rep(), type('?'), tracked('?') { std::string codedString(is_tracked ?"-":"+"); Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type); if(itFound == sTypeTranslations.type2Code_.end()) { throw Exception(errors::Configuration) << "bad type name used for Entry : " << type; } codedString += itFound->second; codedString +='('; codedString += value; codedString +=')'; if(!fromString(codedString.begin(), codedString.end())) { throw Exception(errors::Configuration) << "bad encoded Entry string " << codedString; } validate(); }
Entry::Entry | ( | std::string const & | name, |
std::string const & | type, | ||
std::vector< std::string > const & | value, | ||
bool | is_tracked | ||
) |
Definition at line 549 of file Entry.cc.
References edm::errors::Configuration, alignCSCRings::e, Exception, fromString(), i, edm::sTypeTranslations, type, edm::pset::TypeTrans::type2Code_, and validate().
: name_(name), rep() , type('?'), tracked('?') { std::string codedString(is_tracked ?"-":"+"); Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type); if(itFound == sTypeTranslations.type2Code_.end()) { throw Exception(errors::Configuration) << "bad type name used for Entry : " << type; } codedString += itFound->second; codedString += '('; codedString += '{'; std::vector<std::string>::const_iterator i = value.begin(); std::vector<std::string>::const_iterator e = value.end(); std::string const kSeparator(","); std::string sep(""); for(; i!= e; ++i) { codedString += sep; codedString += *i; sep = kSeparator; } codedString += '}'; codedString += ')'; if(!fromString(codedString.begin(), codedString.end())) { throw Exception(errors::Configuration) << "bad encoded Entry string " << codedString; } validate(); }
bool Entry::fromString | ( | std::string::const_iterator | b, |
std::string::const_iterator | e | ||
) | [private] |
bool Entry::getBool | ( | ) | const |
Definition at line 638 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if (type != 'B') throwValueError("bool"); bool val; if (!decode(val, rep)) throwEntryError("bool", rep); return val; }
double Entry::getDouble | ( | ) | const |
Definition at line 742 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'D') throwValueError("double"); double val; if(!decode(val, rep)) throwEntryError("double", rep); return val; }
ESInputTag Entry::getESInputTag | ( | ) | const |
Definition at line 822 of file Entry.cc.
References edm::decode(), kTESInputTag, rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != kTESInputTag) throwValueError("ESInputTag"); ESInputTag val; if(!decode(val, rep)) throwEntryError("ESInputTag", rep); return val; }
EventID Entry::getEventID | ( | ) | const |
Definition at line 845 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'E') throwValueError("EventID"); EventID val; if(!decode(val, rep)) throwEntryError("EventID", rep); return val; }
EventRange Entry::getEventRange | ( | ) | const |
Definition at line 911 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'R') throwValueError("EventRange"); EventRange val; if(!decode(val, rep)) throwEntryError("EventRange", rep); return val; }
FileInPath Entry::getFileInPath | ( | ) | const |
Definition at line 787 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getAllFileInPaths(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase(), and PhysicsTools::MVATrainerLooper::Trainer::Trainer().
{ if(type != 'F') throwValueError("FileInPath"); FileInPath val; if(!decode(val, rep)) throwEntryError("FileInPath", rep); return val; }
InputTag Entry::getInputTag | ( | ) | const |
Definition at line 798 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 't') throwValueError("InputTag"); InputTag val; if(!decode(val, rep)) throwEntryError("InputTag", rep); return val; }
int Entry::getInt32 | ( | ) | const |
Definition at line 650 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::pdtentry::getPdtEntry(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ if(type != 'I') throwValueError("int"); int val; if(!decode(val, rep)) throwEntryError("int", rep); return val; }
long long Entry::getInt64 | ( | ) | const |
Definition at line 673 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter().
{ if(type != 'L') throwValueError("int64"); long long val; if(!decode(val, rep)) throwEntryError("int64", rep); return val; }
LuminosityBlockID Entry::getLuminosityBlockID | ( | ) | const |
Definition at line 868 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'M') throwValueError("LuminosityBlockID"); LuminosityBlockID val; if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep); return val; }
LuminosityBlockRange Entry::getLuminosityBlockRange | ( | ) | const |
Definition at line 889 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'A') throwValueError("LuminosityBlockRange"); LuminosityBlockRange val; if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep); return val; }
ParameterSet Entry::getPSet | ( | ) | const |
Definition at line 934 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::fromString(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ if(type != 'P') throwValueError("ParameterSet"); ParameterSet val; if(!decode(val, rep)) throwEntryError("ParameterSet", rep); return val; }
std::string Entry::getString | ( | void | ) | const |
Definition at line 764 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getParameter(), edm::pdtentry::getPdtEntry(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase(), edm::operator<<(), and PhysicsTools::MVATrainerLooper::Trainer::Trainer().
{ if(type != 'S') throwValueError("string"); std::string val; if(!decode(val, rep)) throwEntryError("string", rep); return val; }
unsigned Entry::getUInt32 | ( | ) | const |
Definition at line 697 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ if(type != 'U') throwValueError("unsigned int"); unsigned val; if(!decode(val, rep)) throwEntryError("unsigned int", rep); return val; }
unsigned long long Entry::getUInt64 | ( | ) | const |
Definition at line 720 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'X') throwValueError("uint64"); unsigned long long val; if(!decode(val, rep)) throwEntryError("uint64", rep); return val; }
std::vector< double > Entry::getVDouble | ( | ) | const |
Definition at line 753 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'd') throwValueError("vector<double>"); std::vector<double> val; if(!decode(val, rep)) throwEntryError("vector<double>", rep); return val; }
std::vector< ESInputTag > Entry::getVESInputTag | ( | ) | const |
Definition at line 834 of file Entry.cc.
References edm::decode(), kTVESInputTag, rep, throwEntryError(), and throwValueError().
Referenced by FWPSetTableManager::handleEntry(), edm::operator<<(), and edm::ParameterSet::getUntrackedParameter< std::vector< ESInputTag > >().
{ if(type != kTVESInputTag) throwValueError("VESInputTag"); std::vector<ESInputTag> val; if(!decode(val, rep)) throwEntryError("VESInputTag", rep); return val; }
std::vector< EventID > Entry::getVEventID | ( | ) | const |
Definition at line 856 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'e') throwValueError("VEventID"); std::vector<EventID> val; if(!decode(val, rep)) throwEntryError("EventID", rep); return val; }
std::vector< EventRange > Entry::getVEventRange | ( | ) | const |
Definition at line 922 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'r') throwValueError("VEventRange"); std::vector<EventRange> val; if(!decode(val, rep)) throwEntryError("EventRange", rep); return val; }
std::vector< InputTag > Entry::getVInputTag | ( | ) | const |
Definition at line 810 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ if(type != 'v') throwValueError("VInputTag"); std::vector<InputTag> val; if(!decode(val, rep)) throwEntryError("VInputTag", rep); return val; }
std::vector< int > Entry::getVInt32 | ( | ) | const |
Definition at line 661 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::pdtentry::getPdtEntryVector(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'i') throwValueError("vector<int>"); std::vector<int> val; if(!decode(val, rep)) throwEntryError("vector<int>", rep); return val; }
std::vector< long long > Entry::getVInt64 | ( | ) | const |
Definition at line 684 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'l') throwValueError("vector<int64>"); std::vector<long long> val; if(!decode(val, rep)) throwEntryError("vector<int64>", rep); return val; }
std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID | ( | ) | const |
Definition at line 879 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'm') throwValueError("VLuminosityBlockID"); std::vector<LuminosityBlockID> val; if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep); return val; }
std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange | ( | ) | const |
Definition at line 900 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'a') throwValueError("VLuminosityBlockRange"); std::vector<LuminosityBlockRange> val; if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep); return val; }
std::vector< ParameterSet > Entry::getVPSet | ( | ) | const |
Definition at line 945 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::fromString(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ if(type != 'p') throwValueError("vector<ParameterSet>"); std::vector<ParameterSet> val; if(!decode(val, rep)) throwEntryError("vector<ParameterSet>", rep); return val; }
std::vector< std::string > Entry::getVString | ( | ) | const |
Definition at line 775 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::pdtentry::getPdtEntryVector(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ if(type != 's') throwValueError("vector<string>"); std::vector<std::string> val; if(!decode(val, rep)) throwEntryError("vector<string>", rep); return val; }
std::vector< unsigned > Entry::getVUInt32 | ( | ) | const |
Definition at line 708 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'u') throwValueError("vector<unsigned int>"); std::vector<unsigned> val; if(!decode(val, rep)) throwEntryError("vector<unsigned int>", rep); return val; }
std::vector< unsigned long long > Entry::getVUInt64 | ( | ) | const |
Definition at line 731 of file Entry.cc.
References edm::decode(), rep, throwEntryError(), and throwValueError().
Referenced by edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().
{ if(type != 'x') throwValueError("vector<uint64>"); std::vector<unsigned long long> val; if(!decode(val, rep)) throwEntryError("vector<uint64>", rep); return val; }
bool edm::Entry::isTracked | ( | ) | const [inline] |
Definition at line 173 of file Entry.h.
References tracked.
Referenced by edm::ParameterSet::fromString(), edm::ParameterSet::getNamesByCode_(), FWPSetTableManager::handleEntry(), and edm::operator<<().
{ return tracked == '+'; }
size_t edm::Entry::sizeOfString | ( | ) | const [inline] |
Definition at line 170 of file Entry.h.
References rep.
Referenced by toString().
{return rep.size() + 4;}
void Entry::throwEncodeError | ( | char const * | type | ) | const [private] |
void Entry::throwEntryError | ( | char const * | expectedType, |
std::string const & | badRep | ||
) | const [private] |
Definition at line 1068 of file Entry.cc.
References edm::errors::Configuration, Exception, and name_.
Referenced by getBool(), getDouble(), getESInputTag(), getEventID(), getEventRange(), getFileInPath(), getInputTag(), getInt32(), getInt64(), getLuminosityBlockID(), getLuminosityBlockRange(), getPSet(), getString(), getUInt32(), getUInt64(), getVDouble(), getVESInputTag(), getVEventID(), getVEventRange(), getVInputTag(), getVInt32(), getVInt64(), getVLuminosityBlockID(), getVLuminosityBlockRange(), getVPSet(), getVString(), getVUInt32(), getVUInt64(), and validate().
{ throw Exception(errors::Configuration, "EntryError") << "can not convert representation of " << name_ << ": " << badRep << " to value of type " << expectedType << " "; }
void Entry::throwValueError | ( | char const * | expectedType | ) | const [private] |
Definition at line 1062 of file Entry.cc.
References edm::errors::Configuration, Exception, name_, edm::sTypeTranslations, edm::pset::TypeTrans::table_, and type.
Referenced by getBool(), getDouble(), getESInputTag(), getEventID(), getEventRange(), getFileInPath(), getInputTag(), getInt32(), getInt64(), getLuminosityBlockID(), getLuminosityBlockRange(), getPSet(), getString(), getUInt32(), getUInt64(), getVDouble(), getVESInputTag(), getVEventID(), getVEventRange(), getVInputTag(), getVInt32(), getVInt64(), getVLuminosityBlockID(), getVLuminosityBlockRange(), getVPSet(), getVString(), getVUInt32(), and getVUInt64().
{ throw Exception(errors::Configuration, "ValueError") << "type of " << name_ << " is expected to be " << expectedType << " but declared as " << sTypeTranslations.table_[type]; }
void Entry::toDigest | ( | cms::Digest & | digest | ) | const |
void Entry::toString | ( | std::string & | result | ) | const |
std::string Entry::toString | ( | ) | const |
Definition at line 608 of file Entry.cc.
References query::result.
Referenced by edm::ParameterSet::getParameterAsString(), and edm::operator==().
char edm::Entry::typeCode | ( | ) | const [inline] |
Definition at line 175 of file Entry.h.
References type.
Referenced by edm::ParameterSet::getAllFileInPaths(), edm::ParameterSet::getNamesByCode_(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), edm::pdtentry::getPdtEntry(), edm::pdtentry::getPdtEntryVector(), FWPSetTableManager::handleEntry(), PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase(), edm::operator<<(), and PhysicsTools::MVATrainerLooper::Trainer::Trainer().
{ return type; }
void Entry::validate | ( | ) | const [private] |
Definition at line 88 of file Entry.cc.
References edm::decode(), kTESInputTag, kTVESInputTag, rep, throwEntryError(), and tracked.
Referenced by Entry().
{ // tracked assert (tracked == '+' || tracked == '-'); // if(tracked != '+' && tracked != '-') // throw EntryError(std::string("invalid tracked code ") + tracked); // type and rep switch(type) { case 'B': { // Bool bool val; if (!decode(val, rep)) throwEntryError("bool", rep); break; } case 'b': { // vBool std::vector<bool> val; if(!decode(val, rep)) throwEntryError("vector<bool>", rep); break; } case 'I': { // Int32 int val; if(!decode(val, rep)) throwEntryError("int", rep); break; } case 'i': { // vInt32 std::vector<int> val; if(!decode(val, rep)) throwEntryError("vector<int>", rep); break; } case 'U': { // Uint32 unsigned val; if(!decode(val, rep)) throwEntryError("unsigned int", rep); break; } case 'u': { // vUint32 std::vector<unsigned> val; if(!decode(val, rep)) throwEntryError("vector<unsigned int>", rep); break; } case 'L': { // Int64 int val; if(!decode(val, rep)) throwEntryError("int64", rep); break; } case 'l': { // vInt64 std::vector<int> val; if(!decode(val, rep)) throwEntryError("vector<int64>", rep); break; } case 'X': { // Uint64 unsigned val; if(!decode(val, rep)) throwEntryError("unsigned int64", rep); break; } case 'x': { // vUint64 std::vector<unsigned> val; if(!decode(val, rep)) throwEntryError("vector<unsigned int64>", rep); break; } case 'S': { // String std::string val; if(!decode(val, rep)) throwEntryError("string", rep); break; } case 's': { // vString std::vector<std::string> val; if(!decode(val, rep)) throwEntryError("vector<string>", rep); break; } case 'F': { // FileInPath FileInPath val; if(!decode(val, rep)) throwEntryError("FileInPath", rep); break; } case 't': { // InputTag InputTag val; if(!decode(val, rep)) throwEntryError("InputTag", rep); break; } case 'v': { // VInputTag std::vector<InputTag> val; if(!decode(val, rep)) throwEntryError("VInputTag", rep); break; } case kTESInputTag: { //ESInputTag ESInputTag val; if(!decode(val,rep)) throwEntryError("ESInputTag", rep); break; } case kTVESInputTag: { //ESInputTag std::vector<ESInputTag> val; if(!decode(val,rep)) throwEntryError("VESInputTag", rep); break; } case 'E': { // EventID EventID val; if(!decode(val, rep)) throwEntryError("EventID", rep); break; } case 'e': { // VEventID std::vector<EventID> val; if(!decode(val, rep)) throwEntryError("VEventID", rep); break; } case 'M': { // LuminosityBlockID LuminosityBlockID val; if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep); break; } case 'm': { // VLuminosityBlockID std::vector<LuminosityBlockID> val; if(!decode(val, rep)) throwEntryError("VLuminosityBlockID", rep); break; } case 'D': { // Double double val; if(!decode(val, rep)) throwEntryError("double", rep); break; } case 'd': { // vDouble std::vector<double> val; if(!decode(val, rep)) throwEntryError("vector<double>", rep); break; } case 'P': { // ParameterSet ParameterSet val; if(!decode(val, rep)) throwEntryError("ParameterSet", rep); break; } case 'p': { // vParameterSet std::vector<ParameterSet> val; if(!decode(val, rep)) throwEntryError("vector<ParameterSet>", rep); break; } case 'A': { // LuminosityBlockRange LuminosityBlockRange val; if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep); break; } case 'a': { // VLuminosityBlockRange std::vector<LuminosityBlockRange> val; if(!decode(val, rep)) throwEntryError("VLuminosityBlockRange", rep); break; } case 'R': { // EventRange EventRange val; if(!decode(val, rep)) throwEntryError("EventRange", rep); break; } case 'r': { // VEventRange std::vector<EventRange> val; if(!decode(val, rep)) throwEntryError("VEventRange", rep); break; } default: { // We should never get here. assert ("Invalid type code" == 0); //throw EntryError(std::string("invalid type code ") + type); break; } } // switch(type) } // Entry::validate()
std::ostream& operator<< | ( | std::ostream & | ost, |
Entry const & | entry | ||
) | [friend] |
Definition at line 954 of file Entry.cc.
{ os << sTypeTranslations.table_[entry.typeCode()] << " " << (entry.isTracked() ? "tracked " : "untracked ") <<" = "; // now handle the difficult cases switch(entry.typeCode()) { case 'P': // ParameterSet { os << entry.getPSet(); break; } case 'p': // vector<ParameterSet> { // Make sure we get the representation of each contained // ParameterSet including *only* tracked parameters std::vector<ParameterSet> whole = entry.getVPSet(); std::vector<ParameterSet>::const_iterator i = whole.begin(); std::vector<ParameterSet>::const_iterator e = whole.end(); std::string start =""; std::string const between(",\n"); os << "{"<<std::endl; for (; i != e; ++i) { os << start<< *i; start = between; } if (whole.size()) { os << std::endl; } os << "}"; break; } case 'S': { os << "'" << entry.getString() << "'"; break; } case 's': { os << "{"; std::string start ="'"; std::string const between(",'"); std::vector<std::string> strings = entry.getVString(); for(std::vector<std::string>::const_iterator it = strings.begin(), itEnd = strings.end(); it != itEnd; ++it) { os << start << *it << "'"; start = between; } os << "}"; break; } case 'I': { os << entry.getInt32(); break; } case 'U': { os << entry.getUInt32(); break; } case 'v': { //VInputTag needs to be treated seperately because it is encode like // vector<string> rather than using the individual encodings of each InputTag os << "{"; std::string start = ""; std::string const between(","); std::vector<InputTag> tags = entry.getVInputTag(); for(std::vector<InputTag>::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it) { os << start << it->encode(); start = between; } os << "}"; break; } case kTVESInputTag: { //VESInputTag needs to be treated seperately because it is encode like // vector<string> rather than using the individual encodings of each ESInputTag os << "{"; std::string start = ""; std::string const between(","); std::vector<ESInputTag> tags = entry.getVESInputTag(); for(std::vector<ESInputTag>::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it) { os << start << it->encode(); start = between; } os << "}"; break; } default: { os << entry.rep; break; } } return os; }
std::string edm::Entry::name_ [private] |
Definition at line 180 of file Entry.h.
Referenced by throwEncodeError(), throwEntryError(), and throwValueError().
std::string edm::Entry::rep [private] |
Definition at line 181 of file Entry.h.
Referenced by Entry(), fromString(), getBool(), getDouble(), getESInputTag(), getEventID(), getEventRange(), getFileInPath(), getInputTag(), getInt32(), getInt64(), getLuminosityBlockID(), getLuminosityBlockRange(), getPSet(), getString(), getUInt32(), getUInt64(), getVDouble(), getVESInputTag(), getVEventID(), getVEventRange(), getVInputTag(), getVInt32(), getVInt64(), getVLuminosityBlockID(), getVLuminosityBlockRange(), getVPSet(), getVString(), getVUInt32(), getVUInt64(), edm::operator<<(), sizeOfString(), toDigest(), toString(), and validate().
char edm::Entry::tracked [private] |
Definition at line 183 of file Entry.h.
Referenced by fromString(), isTracked(), toDigest(), toString(), and validate().
char edm::Entry::type [private] |
Definition at line 182 of file Entry.h.
Referenced by Entry(), throwEncodeError(), throwValueError(), toString(), and typeCode().