CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::Entry Class Reference

#include <Entry.h>

Public Member Functions

 Entry (std::string const &name, bool val, bool is_tracked)
 
 Entry (std::string const &name, int val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< int > const &val, bool is_tracked)
 
 Entry (std::string const &name, unsigned val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< unsigned > const &val, bool is_tracked)
 
 Entry (std::string const &name, long long val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< long long > const &val, bool is_tracked)
 
 Entry (std::string const &name, unsigned long long val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< unsigned long long > const &val, bool is_tracked)
 
 Entry (std::string const &name, double val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< double > const &val, bool is_tracked)
 
 Entry (std::string const &name, std::string const &val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< std::string > const &val, bool is_tracked)
 
 Entry (std::string const &name, FileInPath const &val, bool is_tracked)
 
 Entry (std::string const &name, InputTag const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< InputTag > const &vtag, 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, EventID const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< EventID > const &vtag, 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, LuminosityBlockRange const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< LuminosityBlockRange > const &vtag, 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, ParameterSet const &val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< ParameterSet > const &val, 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, std::string const &type, std::vector< std::string > const &value, bool is_tracked)
 
 Entry (Entry const &)=default
 
 Entry (Entry &&)=default
 
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< ESInputTaggetVESInputTag () const
 
std::vector< EventIDgetVEventID () const
 
std::vector< EventRangegetVEventRange () const
 
std::vector< InputTaggetVInputTag () const
 
std::vector< int > getVInt32 () const
 
std::vector< long long > getVInt64 () const
 
std::vector< LuminosityBlockIDgetVLuminosityBlockID () const
 
std::vector< LuminosityBlockRangegetVLuminosityBlockRange () const
 
std::vector< ParameterSetgetVPSet () const
 
std::vector< std::string > getVString () const
 
std::vector< unsigned > getVUInt32 () const
 
std::vector< unsigned long long > getVUInt64 () const
 
bool isTracked () const
 
Entryoperator= (Entry const &)=default
 
Entryoperator= (Entry &&)=default
 
size_t sizeOfString () const
 
void toDigest (cms::Digest &digest) const
 
std::string toString () const
 
void toString (std::string &result) const
 
char typeCode () const
 
 ~Entry ()=default
 

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)
 

Detailed Description

Definition at line 40 of file Entry.h.

Constructor & Destructor Documentation

Entry::Entry ( std::string const &  name,
bool  val,
bool  is_tracked 
)

Definition at line 278 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

279  : name_(name), rep(), type('B'), tracked(is_tracked ? '+' : '-') {
280  if (!encode(rep, val))
281  throwEncodeError("bool");
282  validate();
283  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
int  val,
bool  is_tracked 
)

Definition at line 288 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

289  : name_(name), rep(), type('I'), tracked(is_tracked ? '+' : '-') {
290  if (!encode(rep, val))
291  throwEncodeError("int");
292  validate();
293  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< int > const &  val,
bool  is_tracked 
)

Definition at line 298 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

299  : name_(name), rep(), type('i'), tracked(is_tracked ? '+' : '-') {
300  if (!encode(rep, val))
301  throwEncodeError("vector<int>");
302  validate();
303  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
unsigned  val,
bool  is_tracked 
)

Definition at line 308 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

309  : name_(name), rep(), type('U'), tracked(is_tracked ? '+' : '-') {
310  if (!encode(rep, val))
311  throwEncodeError("unsigned int");
312  validate();
313  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< unsigned > const &  val,
bool  is_tracked 
)

Definition at line 318 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

319  : name_(name), rep(), type('u'), tracked(is_tracked ? '+' : '-') {
320  if (!encode(rep, val))
321  throwEncodeError("vector<unsigned int>");
322  validate();
323  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
long long  val,
bool  is_tracked 
)

Definition at line 328 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

329  : name_(name), rep(), type('L'), tracked(is_tracked ? '+' : '-') {
330  if (!encode(rep, val))
331  throwEncodeError("int64");
332  validate();
333  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< long long > const &  val,
bool  is_tracked 
)

Definition at line 338 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

339  : name_(name), rep(), type('l'), tracked(is_tracked ? '+' : '-') {
340  if (!encode(rep, val))
341  throwEncodeError("vector<int64>");
342  validate();
343  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
unsigned long long  val,
bool  is_tracked 
)

Definition at line 348 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

349  : name_(name), rep(), type('X'), tracked(is_tracked ? '+' : '-') {
350  if (!encode(rep, val))
351  throwEncodeError("unsigned int64");
352  validate();
353  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< unsigned long long > const &  val,
bool  is_tracked 
)

Definition at line 358 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

359  : name_(name), rep(), type('x'), tracked(is_tracked ? '+' : '-') {
360  if (!encode(rep, val))
361  throwEncodeError("vector<unsigned int64>");
362  validate();
363  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
double  val,
bool  is_tracked 
)

Definition at line 368 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

369  : name_(name), rep(), type('D'), tracked(is_tracked ? '+' : '-') {
370  if (!encode(rep, val))
371  throwEncodeError("double");
372  validate();
373  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< double > const &  val,
bool  is_tracked 
)

Definition at line 378 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

379  : name_(name), rep(), type('d'), tracked(is_tracked ? '+' : '-') {
380  if (!encode(rep, val))
381  throwEncodeError("vector<double>");
382  validate();
383  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::string const &  val,
bool  is_tracked 
)

Definition at line 388 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

389  : name_(name), rep(), type('S'), tracked(is_tracked ? '+' : '-') {
390  if (!encode(rep, val))
391  throwEncodeError("string");
392  validate();
393  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< std::string > const &  val,
bool  is_tracked 
)

Definition at line 398 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

399  : name_(name), rep(), type('s'), tracked(is_tracked ? '+' : '-') {
400  if (!encode(rep, val))
401  throwEncodeError("vector<string>");
402  validate();
403  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
FileInPath const &  val,
bool  is_tracked 
)

Definition at line 408 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

409  : name_(name), rep(), type('F'), tracked(is_tracked ? '+' : '-') {
410  if (!encode(rep, val))
411  throwEncodeError("FileInPath");
412  validate();
413  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
InputTag const &  tag,
bool  is_tracked 
)

Definition at line 418 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

419  : name_(name), rep(), type('t'), tracked(is_tracked ? '+' : '-') {
420  if (!encode(rep, val))
421  throwEncodeError("InputTag");
422  validate();
423  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< InputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 428 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

429  : name_(name), rep(), type('v'), tracked(is_tracked ? '+' : '-') {
430  if (!encode(rep, val))
431  throwEncodeError("VInputTag");
432  validate();
433  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
ESInputTag const &  tag,
bool  is_tracked 
)

Definition at line 438 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

439  : name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') {
440  if (!encode(rep, val))
441  throwEncodeError("InputTag");
442  validate();
443  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< ESInputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 448 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

449  : name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') {
450  if (!encode(rep, val))
451  throwEncodeError("VESInputTag");
452  validate();
453  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
EventID const &  tag,
bool  is_tracked 
)

Definition at line 458 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

459  : name_(name), rep(), type('E'), tracked(is_tracked ? '+' : '-') {
460  if (!encode(rep, val))
461  throwEncodeError("EventID");
462  validate();
463  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< EventID > const &  vtag,
bool  is_tracked 
)

Definition at line 468 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

469  : name_(name), rep(), type('e'), tracked(is_tracked ? '+' : '-') {
470  if (!encode(rep, val))
471  throwEncodeError("VEventID");
472  validate();
473  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
LuminosityBlockID const &  tag,
bool  is_tracked 
)

Definition at line 478 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

479  : name_(name), rep(), type('M'), tracked(is_tracked ? '+' : '-') {
480  if (!encode(rep, val))
481  throwEncodeError("LuminosityBlockID");
482  validate();
483  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockID > const &  vtag,
bool  is_tracked 
)

Definition at line 488 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

489  : name_(name), rep(), type('m'), tracked(is_tracked ? '+' : '-') {
490  if (!encode(rep, val))
491  throwEncodeError("VLuminosityBlockID");
492  validate();
493  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
LuminosityBlockRange const &  tag,
bool  is_tracked 
)

Definition at line 498 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

499  : name_(name), rep(), type('A'), tracked(is_tracked ? '+' : '-') {
500  if (!encode(rep, val))
501  throwEncodeError("LuminosityBlockRange");
502  validate();
503  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockRange > const &  vtag,
bool  is_tracked 
)

Definition at line 508 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

509  : name_(name), rep(), type('a'), tracked(is_tracked ? '+' : '-') {
510  if (!encode(rep, val))
511  throwEncodeError("VLuminosityBlockRange");
512  validate();
513  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
EventRange const &  tag,
bool  is_tracked 
)

Definition at line 518 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

519  : name_(name), rep(), type('R'), tracked(is_tracked ? '+' : '-') {
520  if (!encode(rep, val))
521  throwEncodeError("EventRange");
522  validate();
523  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< EventRange > const &  vtag,
bool  is_tracked 
)

Definition at line 528 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

529  : name_(name), rep(), type('r'), tracked(is_tracked ? '+' : '-') {
530  if (!encode(rep, val))
531  throwEncodeError("VEventRange");
532  validate();
533  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
ParameterSet const &  val,
bool  is_tracked 
)

Definition at line 538 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

539  : name_(name), rep(), type('P'), tracked(is_tracked ? '+' : '-') {
540  if (!encode(rep, val))
541  throwEncodeError("ParameterSet");
542  validate();
543  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::vector< ParameterSet > const &  val,
bool  is_tracked 
)

Definition at line 548 of file Entry.cc.

References edm::encode(), rep, throwEncodeError(), and validate().

549  : name_(name), rep(), type('p'), tracked(is_tracked ? '+' : '-') {
550  if (!encode(rep, val))
551  throwEncodeError("vector<ParameterSet>");
552  validate();
553  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:86
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::string const &  code 
)

Definition at line 558 of file Entry.cc.

References fromString(), throwEncodeError(), and validate().

558  : name_(name), rep(), type('?'), tracked('?') {
559  if (!fromString(code.begin(), code.end()))
560  throwEncodeError("coded string");
561  validate();
562  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
void throwEncodeError(char const *type) const
Definition: Entry.cc:1098
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:643
char tracked
Definition: Entry.h:184
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::string const &  value,
bool  is_tracked 
)

Definition at line 564 of file Entry.cc.

References edm::errors::Configuration, Exception, fromString(), AlCaHLTBitMon_QueryRunRegistry::string, type, edm::pset::TypeTrans::type2Code_, validate(), and relativeConstraints::value.

565  : name_(name), rep(), type('?'), tracked('?') {
566  std::string codedString(is_tracked ? "-" : "+");
567 
568  Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type);
569  if (itFound == sTypeTranslations.type2Code_.end()) {
570  throw Exception(errors::Configuration) << "bad type name used for Entry : " << type;
571  }
572 
573  codedString += itFound->second;
574  codedString += '(';
575  codedString += value;
576  codedString += ')';
577 
578  if (!fromString(codedString.begin(), codedString.end())) {
579  throw Exception(errors::Configuration) << "bad encoded Entry string " << codedString;
580  }
581  validate();
582  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:643
char tracked
Definition: Entry.h:184
std::map< std::string, char > type2Code_
Definition: Entry.cc:31
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:72
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::vector< std::string > const &  value,
bool  is_tracked 
)

Definition at line 584 of file Entry.cc.

References edm::errors::Configuration, MillePedeFileConverter_cfg::e, Exception, fromString(), mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, type, edm::pset::TypeTrans::type2Code_, and validate().

585  : name_(name), rep(), type('?'), tracked('?') {
586  std::string codedString(is_tracked ? "-" : "+");
587 
588  Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type);
589  if (itFound == sTypeTranslations.type2Code_.end()) {
590  throw Exception(errors::Configuration) << "bad type name used for Entry : " << type;
591  }
592 
593  codedString += itFound->second;
594  codedString += '(';
595  codedString += '{';
596  std::vector<std::string>::const_iterator i = value.begin();
597  std::vector<std::string>::const_iterator e = value.end();
598  std::string const kSeparator(",");
599  std::string sep("");
600  for (; i != e; ++i) {
601  codedString += sep;
602  codedString += *i;
603  sep = kSeparator;
604  }
605  codedString += '}';
606  codedString += ')';
607 
608  if (!fromString(codedString.begin(), codedString.end())) {
609  throw Exception(errors::Configuration) << "bad encoded Entry string " << codedString;
610  }
611  validate();
612  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
Definition: value.py:1
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:643
char tracked
Definition: Entry.h:184
std::map< std::string, char > type2Code_
Definition: Entry.cc:31
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:72
edm::Entry::~Entry ( )
default
edm::Entry::Entry ( Entry const &  )
default
edm::Entry::Entry ( Entry &&  )
default

Member Function Documentation

bool Entry::fromString ( std::string::const_iterator  b,
std::string::const_iterator  e 
)
private

Definition at line 643 of file Entry.cc.

References rep, AlCaHLTBitMon_QueryRunRegistry::string, and tracked.

Referenced by Entry().

643  {
644  if (static_cast<unsigned int>(e - b) < 4u || b[2] != '(' || e[-1] != ')')
645 
646  return false;
647 
648  tracked = b[0];
649  type = b[1];
650  rep = std::string(b + 3, e - 1);
651 
652  return true;
653  } // from_string()
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
char tracked
Definition: Entry.h:184
double b
Definition: hdecay.h:120
bool Entry::getBool ( ) const

Definition at line 662 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

662  {
663  if (type != 'B')
664  throwValueError("bool");
665  bool val;
666  if (!decode(val, rep))
667  throwEntryError("bool", rep);
668  return val;
669  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
double Entry::getDouble ( ) const

Definition at line 770 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

770  {
771  if (type != 'D')
772  throwValueError("double");
773  double val;
774  if (!decode(val, rep))
775  throwEntryError("double", rep);
776  return val;
777  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
ESInputTag Entry::getESInputTag ( ) const

Definition at line 854 of file Entry.cc.

References edm::decode(), kTESInputTag, rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

854  {
855  if (type != kTESInputTag)
856  throwValueError("ESInputTag");
857  ESInputTag val;
858  if (!decode(val, rep))
859  throwEntryError("ESInputTag", rep);
860  return val;
861  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
EventID Entry::getEventID ( ) const

Definition at line 878 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

878  {
879  if (type != 'E')
880  throwValueError("EventID");
881  EventID val;
882  if (!decode(val, rep))
883  throwEntryError("EventID", rep);
884  return val;
885  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
EventRange Entry::getEventRange ( ) const

Definition at line 949 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

949  {
950  if (type != 'R')
951  throwValueError("EventRange");
952  EventRange val;
953  if (!decode(val, rep))
954  throwEntryError("EventRange", rep);
955  return val;
956  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
FileInPath Entry::getFileInPath ( ) const

Definition at line 818 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getAllFileInPaths(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), PhysicsTools::MVAComputerESSourceBase::MVAComputerESSourceBase(), and PhysicsTools::MVATrainerLooper::Trainer::Trainer().

818  {
819  if (type != 'F')
820  throwValueError("FileInPath");
821  FileInPath val;
822  if (!decode(val, rep))
823  throwEntryError("FileInPath", rep);
824  return val;
825  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
InputTag Entry::getInputTag ( ) const

Definition at line 830 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

830  {
831  if (type != 't')
832  throwValueError("InputTag");
833  InputTag val;
834  if (!decode(val, rep))
835  throwEntryError("InputTag", rep);
836  return val;
837  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
int Entry::getInt32 ( ) const

Definition at line 674 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::pdtentry::getPdtEntry(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), and edm::operator<<().

674  {
675  if (type != 'I')
676  throwValueError("int");
677  int val;
678  if (!decode(val, rep))
679  throwEntryError("int", rep);
680  return val;
681  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
long long Entry::getInt64 ( ) const

Definition at line 698 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

698  {
699  if (type != 'L')
700  throwValueError("int64");
701  long long val;
702  if (!decode(val, rep))
703  throwEntryError("int64", rep);
704  return val;
705  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
LuminosityBlockID Entry::getLuminosityBlockID ( ) const

Definition at line 902 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

902  {
903  if (type != 'M')
904  throwValueError("LuminosityBlockID");
905  LuminosityBlockID val;
906  if (!decode(val, rep))
907  throwEntryError("LuminosityBlockID", rep);
908  return val;
909  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
LuminosityBlockRange Entry::getLuminosityBlockRange ( ) const

Definition at line 925 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

925  {
926  if (type != 'A')
927  throwValueError("LuminosityBlockRange");
929  if (!decode(val, rep))
930  throwEntryError("LuminosityBlockRange", rep);
931  return val;
932  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
ParameterSet Entry::getPSet ( ) const

Definition at line 974 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::fromString(), and edm::operator<<().

974  {
975  if (type != 'P')
976  throwValueError("ParameterSet");
978  if (!decode(val, rep))
979  throwEntryError("ParameterSet", rep);
980  return val;
981  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::string Entry::getString ( void  ) const
unsigned Entry::getUInt32 ( ) const

Definition at line 722 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), FWPSetTableManager::handleEntry(), and edm::operator<<().

722  {
723  if (type != 'U')
724  throwValueError("unsigned int");
725  unsigned val;
726  if (!decode(val, rep))
727  throwEntryError("unsigned int", rep);
728  return val;
729  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
unsigned long long Entry::getUInt64 ( ) const

Definition at line 746 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), and FWPSetTableManager::handleEntry().

746  {
747  if (type != 'X')
748  throwValueError("uint64");
749  unsigned long long val;
750  if (!decode(val, rep))
751  throwEntryError("uint64", rep);
752  return val;
753  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< double > Entry::getVDouble ( ) const

Definition at line 782 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< double > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< double > >().

782  {
783  if (type != 'd')
784  throwValueError("vector<double>");
785  std::vector<double> val;
786  if (!decode(val, rep))
787  throwEntryError("vector<double>", rep);
788  return val;
789  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< ESInputTag > Entry::getVESInputTag ( ) const

Definition at line 866 of file Entry.cc.

References edm::decode(), kTVESInputTag, rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::operator<<(), edm::ParameterSet::getParameter< std::vector< ESInputTag > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< ESInputTag > >().

866  {
867  if (type != kTVESInputTag)
868  throwValueError("VESInputTag");
869  std::vector<ESInputTag> val;
870  if (!decode(val, rep))
871  throwEntryError("VESInputTag", rep);
872  return val;
873  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< EventID > Entry::getVEventID ( ) const

Definition at line 890 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< EventID > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< EventID > >().

890  {
891  if (type != 'e')
892  throwValueError("VEventID");
893  std::vector<EventID> val;
894  if (!decode(val, rep))
895  throwEntryError("EventID", rep);
896  return val;
897  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< EventRange > Entry::getVEventRange ( ) const

Definition at line 961 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< EventRange > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< EventRange > >().

961  {
962  if (type != 'r')
963  throwValueError("VEventRange");
964  std::vector<EventRange> val;
965  if (!decode(val, rep))
966  throwEntryError("EventRange", rep);
967  return val;
968  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< InputTag > Entry::getVInputTag ( ) const

Definition at line 842 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::operator<<(), edm::ParameterSet::getParameter< std::vector< InputTag > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< InputTag > >().

842  {
843  if (type != 'v')
844  throwValueError("VInputTag");
845  std::vector<InputTag> val;
846  if (!decode(val, rep))
847  throwEntryError("VInputTag", rep);
848  return val;
849  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< int > Entry::getVInt32 ( ) const

Definition at line 686 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::pdtentry::getPdtEntryVector(), FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< int > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< int > >().

686  {
687  if (type != 'i')
688  throwValueError("vector<int>");
689  std::vector<int> val;
690  if (!decode(val, rep))
691  throwEntryError("vector<int>", rep);
692  return val;
693  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< long long > Entry::getVInt64 ( ) const

Definition at line 710 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< long long > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< long long > >().

710  {
711  if (type != 'l')
712  throwValueError("vector<int64>");
713  std::vector<long long> val;
714  if (!decode(val, rep))
715  throwEntryError("vector<int64>", rep);
716  return val;
717  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID ( ) const

Definition at line 914 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< LuminosityBlockID > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< LuminosityBlockID > >().

914  {
915  if (type != 'm')
916  throwValueError("VLuminosityBlockID");
917  std::vector<LuminosityBlockID> val;
918  if (!decode(val, rep))
919  throwEntryError("LuminosityBlockID", rep);
920  return val;
921  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange ( ) const

Definition at line 937 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< LuminosityBlockRange > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< LuminosityBlockRange > >().

937  {
938  if (type != 'a')
939  throwValueError("VLuminosityBlockRange");
940  std::vector<LuminosityBlockRange> val;
941  if (!decode(val, rep))
942  throwEntryError("LuminosityBlockRange", rep);
943  return val;
944  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< ParameterSet > Entry::getVPSet ( ) const

Definition at line 986 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::ParameterSet::fromString(), and edm::operator<<().

986  {
987  if (type != 'p')
988  throwValueError("vector<ParameterSet>");
989  std::vector<ParameterSet> val;
990  if (!decode(val, rep))
991  throwEntryError("vector<ParameterSet>", rep);
992  return val;
993  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< std::string > Entry::getVString ( ) const

Definition at line 806 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by edm::pdtentry::getPdtEntryVector(), FWPSetTableManager::handleEntry(), edm::operator<<(), edm::ParameterSet::getParameter< std::vector< std::string > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< std::string > >().

806  {
807  if (type != 's')
808  throwValueError("vector<string>");
809  std::vector<std::string> val;
810  if (!decode(val, rep))
811  throwEntryError("vector<string>", rep);
812  return val;
813  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< unsigned > Entry::getVUInt32 ( ) const

Definition at line 734 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< unsigned int > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< unsigned int > >().

734  {
735  if (type != 'u')
736  throwValueError("vector<unsigned int>");
737  std::vector<unsigned> val;
738  if (!decode(val, rep))
739  throwEntryError("vector<unsigned int>", rep);
740  return val;
741  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
std::vector< unsigned long long > Entry::getVUInt64 ( ) const

Definition at line 758 of file Entry.cc.

References edm::decode(), rep, throwEntryError(), throwValueError(), and heppy_batch::val.

Referenced by FWPSetTableManager::handleEntry(), edm::ParameterSet::getParameter< std::vector< unsigned long long > >(), and edm::ParameterSet::getUntrackedParameter< std::vector< unsigned long long > >().

758  {
759  if (type != 'x')
760  throwValueError("vector<uint64>");
761  std::vector<unsigned long long> val;
762  if (!decode(val, rep))
763  throwEntryError("vector<uint64>", rep);
764  return val;
765  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1088
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
bool edm::Entry::isTracked ( ) const
inline
Entry& edm::Entry::operator= ( Entry const &  )
default
Entry& edm::Entry::operator= ( Entry &&  )
default
size_t edm::Entry::sizeOfString ( ) const
inline

Definition at line 171 of file Entry.h.

References cuy::rep.

Referenced by toString().

171 { return rep.size() + 4; }
std::string rep
Definition: Entry.h:182
void Entry::throwEncodeError ( char const *  type) const
private

Definition at line 1098 of file Entry.cc.

References edm::errors::Configuration, Exception, name_, and type.

Referenced by Entry().

1098  {
1099  throw Exception(errors::Configuration, "EncodingError") << "can not encode " << name_ << " as type: " << type;
1100  }
char type
Definition: Entry.h:183
std::string name_
Definition: Entry.h:181
void Entry::throwEntryError ( char const *  expectedType,
std::string const &  badRep 
) const
private
void Entry::throwValueError ( char const *  expectedType) const
private
void Entry::toDigest ( cms::Digest digest) const

Definition at line 627 of file Entry.cc.

References cms::Digest::append(), rep, and tracked.

627  {
628  digest.append(&tracked, 1);
629  digest.append(&type, 1);
630  digest.append("(", 1);
631  digest.append(rep);
632  digest.append(")", 1);
633  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
char tracked
Definition: Entry.h:184
void append(std::string const &s)
Definition: Digest.cc:161
std::string Entry::toString ( ) const
void Entry::toString ( std::string &  result) const

Definition at line 618 of file Entry.cc.

References rep, sizeOfString(), tracked, and type.

618  {
619  result.reserve(result.size() + sizeOfString());
620  result += tracked;
621  result += type;
622  result += '(';
623  result += rep;
624  result += ')';
625  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
size_t sizeOfString() const
Definition: Entry.h:171
char tracked
Definition: Entry.h:184
char edm::Entry::typeCode ( ) const
inline
void Entry::validate ( ) const
private

Definition at line 79 of file Entry.cc.

References edm::errors::Configuration, edm::decode(), Exception, kTESInputTag, kTVESInputTag, cuy::rep, AlCaHLTBitMon_QueryRunRegistry::string, and heppy_batch::val.

Referenced by Entry().

79  {
80  // tracked
81  assert(tracked == '+' || tracked == '-');
82  // if(tracked != '+' && tracked != '-')
83  // throw EntryError(std::string("invalid tracked code ") + tracked);
84 
85  // type and rep
86  switch (type) {
87  case 'B': { // Bool
88  bool val;
89  if (!decode(val, rep))
90  throwEntryError("bool", rep);
91  break;
92  }
93  case 'b': { // vBool
94  std::vector<bool> val;
95  if (!decode(val, rep))
96  throwEntryError("vector<bool>", rep);
97  break;
98  }
99  case 'I': { // Int32
100  int val;
101  if (!decode(val, rep))
102  throwEntryError("int", rep);
103  break;
104  }
105  case 'i': { // vInt32
106  std::vector<int> val;
107  if (!decode(val, rep))
108  throwEntryError("vector<int>", rep);
109  break;
110  }
111  case 'U': { // Uint32
112  unsigned val;
113  if (!decode(val, rep))
114  throwEntryError("unsigned int", rep);
115  break;
116  }
117  case 'u': { // vUint32
118  std::vector<unsigned> val;
119  if (!decode(val, rep))
120  throwEntryError("vector<unsigned int>", rep);
121  break;
122  }
123  case 'L': { // Int64
124  int val;
125  if (!decode(val, rep))
126  throwEntryError("int64", rep);
127  break;
128  }
129  case 'l': { // vInt64
130  std::vector<int> val;
131  if (!decode(val, rep))
132  throwEntryError("vector<int64>", rep);
133  break;
134  }
135  case 'X': { // Uint64
136  unsigned val;
137  if (!decode(val, rep))
138  throwEntryError("unsigned int64", rep);
139  break;
140  }
141  case 'x': { // vUint64
142  std::vector<unsigned> val;
143  if (!decode(val, rep))
144  throwEntryError("vector<unsigned int64>", rep);
145  break;
146  }
147  case 'S': { // String
149  if (!decode(val, rep))
150  throwEntryError("string", rep);
151  break;
152  }
153  case 's': { // vString
154  std::vector<std::string> val;
155  if (!decode(val, rep))
156  throwEntryError("vector<string>", rep);
157  break;
158  }
159  case 'F': { // FileInPath
160  FileInPath val;
161  if (!decode(val, rep))
162  throwEntryError("FileInPath", rep);
163  break;
164  }
165  case 't': { // InputTag
166  InputTag val;
167  if (!decode(val, rep))
168  throwEntryError("InputTag", rep);
169  break;
170  }
171  case 'v': { // VInputTag
172  std::vector<InputTag> val;
173  if (!decode(val, rep))
174  throwEntryError("VInputTag", rep);
175  break;
176  }
177  case kTESInputTag: { //ESInputTag
178  ESInputTag val;
179  if (!decode(val, rep))
180  throwEntryError("ESInputTag", rep);
181  break;
182  }
183  case kTVESInputTag: { //ESInputTag
184  std::vector<ESInputTag> val;
185  if (!decode(val, rep))
186  throwEntryError("VESInputTag", rep);
187  break;
188  }
189  case 'E': { // EventID
190  EventID val;
191  if (!decode(val, rep))
192  throwEntryError("EventID", rep);
193  break;
194  }
195  case 'e': { // VEventID
196  std::vector<EventID> val;
197  if (!decode(val, rep))
198  throwEntryError("VEventID", rep);
199  break;
200  }
201  case 'M': { // LuminosityBlockID
202  LuminosityBlockID val;
203  if (!decode(val, rep))
204  throwEntryError("LuminosityBlockID", rep);
205  break;
206  }
207  case 'm': { // VLuminosityBlockID
208  std::vector<LuminosityBlockID> val;
209  if (!decode(val, rep))
210  throwEntryError("VLuminosityBlockID", rep);
211  break;
212  }
213  case 'D': { // Double
214  double val;
215  if (!decode(val, rep))
216  throwEntryError("double", rep);
217  break;
218  }
219  case 'd': { // vDouble
220  std::vector<double> val;
221  if (!decode(val, rep))
222  throwEntryError("vector<double>", rep);
223  break;
224  }
225  case 'P': { // ParameterSet
227  if (!decode(val, rep))
228  throwEntryError("ParameterSet", rep);
229  break;
230  }
231  case 'p': { // vParameterSet
232  std::vector<ParameterSet> val;
233  if (!decode(val, rep))
234  throwEntryError("vector<ParameterSet>", rep);
235  break;
236  }
237  case 'A': { // LuminosityBlockRange
239  if (!decode(val, rep))
240  throwEntryError("LuminosityBlockRange", rep);
241  break;
242  }
243  case 'a': { // VLuminosityBlockRange
244  std::vector<LuminosityBlockRange> val;
245  if (!decode(val, rep))
246  throwEntryError("VLuminosityBlockRange", rep);
247  break;
248  }
249  case 'R': { // EventRange
250  EventRange val;
251  if (!decode(val, rep))
252  throwEntryError("EventRange", rep);
253  break;
254  }
255  case 'r': { // VEventRange
256  std::vector<EventRange> val;
257  if (!decode(val, rep))
258  throwEntryError("VEventRange", rep);
259  break;
260  }
261  default: {
262  // We should never get here.
263  throw edm::Exception(edm::errors::Configuration) << "Unknown ParameterSet Entry type encoding: '" << type
264  << "'.\n This could be caused by reading a file which was "
265  "written using a newer incompatible software release.";
266  break;
267  }
268  } // switch(type)
269  } // Entry::validate()
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:182
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1093
bool decode(bool &, std::string const &)
Definition: types.cc:72
char tracked
Definition: Entry.h:184

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ost,
Entry const &  entry 
)
friend

Definition at line 995 of file Entry.cc.

995  {
996  os << sTypeTranslations.table_[entry.typeCode()] << " " << (entry.isTracked() ? "tracked " : "untracked ") << " = ";
997 
998  // now handle the difficult cases
999  switch (entry.typeCode()) {
1000  case 'P': // ParameterSet
1001  {
1002  os << entry.getPSet();
1003  break;
1004  }
1005  case 'p': // vector<ParameterSet>
1006  {
1007  // Make sure we get the representation of each contained
1008  // ParameterSet including *only* tracked parameters
1009  std::vector<ParameterSet> whole = entry.getVPSet();
1010  std::vector<ParameterSet>::const_iterator i = whole.begin();
1011  std::vector<ParameterSet>::const_iterator e = whole.end();
1012  std::string start = "";
1013  std::string const between(",\n");
1014  os << "{" << std::endl;
1015  for (; i != e; ++i) {
1016  os << start << *i;
1017  start = between;
1018  }
1019  if (!whole.empty()) {
1020  os << std::endl;
1021  }
1022  os << "}";
1023  break;
1024  }
1025  case 'S': {
1026  os << "'" << entry.getString() << "'";
1027  break;
1028  }
1029  case 's': {
1030  os << "{";
1031  std::string start = "'";
1032  std::string const between(",'");
1033  std::vector<std::string> strings = entry.getVString();
1034  for (std::vector<std::string>::const_iterator it = strings.begin(), itEnd = strings.end(); it != itEnd; ++it) {
1035  os << start << *it << "'";
1036  start = between;
1037  }
1038  os << "}";
1039  break;
1040  }
1041  case 'I': {
1042  os << entry.getInt32();
1043  break;
1044  }
1045  case 'U': {
1046  os << entry.getUInt32();
1047  break;
1048  }
1049  case 'v': {
1050  //VInputTag needs to be treated seperately because it is encode like
1051  // vector<string> rather than using the individual encodings of each InputTag
1052  os << "{";
1053  std::string start = "";
1054  std::string const between(",");
1055  std::vector<InputTag> tags = entry.getVInputTag();
1056  for (std::vector<InputTag>::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it) {
1057  os << start << it->encode();
1058  start = between;
1059  }
1060  os << "}";
1061  break;
1062  }
1063  case kTVESInputTag: {
1064  //VESInputTag needs to be treated seperately because it is encode like
1065  // vector<string> rather than using the individual encodings of each ESInputTag
1066  os << "{";
1067  std::string start = "";
1068  std::string const between(",");
1069  std::vector<ESInputTag> tags = entry.getVESInputTag();
1070  for (std::vector<ESInputTag>::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it) {
1071  os << start << it->encode();
1072  start = between;
1073  }
1074  os << "}";
1075  break;
1076  }
1077  default: {
1078  os << entry.rep;
1079  break;
1080  }
1081  }
1082 
1083  return os;
1084  }
Definition: start.py:1
CodeMap table_
Definition: Entry.cc:30
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:72

Member Data Documentation

std::string edm::Entry::name_
private

Definition at line 181 of file Entry.h.

Referenced by throwEncodeError(), throwEntryError(), and throwValueError().

std::string edm::Entry::rep
private
char edm::Entry::tracked
private

Definition at line 184 of file Entry.h.

Referenced by fromString(), toDigest(), and toString().

char edm::Entry::type
private