CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 408 of file Entry.cc.

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

409  : name_(name), rep(), type(kTbool), tracked(is_tracked ? '+' : '-') {
410  if (!encode(rep, val))
411  throwEncodeError("bool");
412  validate();
413  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
Definition: Entry.cc:23
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 418 of file Entry.cc.

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

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

Definition at line 428 of file Entry.cc.

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

429  : name_(name), rep(), type(kTvint32), tracked(is_tracked ? '+' : '-') {
430  if (!encode(rep, val))
431  throwEncodeError("vector<int>");
432  validate();
433  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 438 of file Entry.cc.

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

439  : name_(name), rep(), type(kTuint32), tracked(is_tracked ? '+' : '-') {
440  if (!encode(rep, val))
441  throwEncodeError("unsigned int");
442  validate();
443  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 448 of file Entry.cc.

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

449  : name_(name), rep(), type(kTvuint32), tracked(is_tracked ? '+' : '-') {
450  if (!encode(rep, val))
451  throwEncodeError("vector<unsigned int>");
452  validate();
453  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 458 of file Entry.cc.

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

459  : name_(name), rep(), type(kTint64), tracked(is_tracked ? '+' : '-') {
460  if (!encode(rep, val))
461  throwEncodeError("int64");
462  validate();
463  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
Definition: Entry.cc:29
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 468 of file Entry.cc.

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

469  : name_(name), rep(), type(kTvint64), tracked(is_tracked ? '+' : '-') {
470  if (!encode(rep, val))
471  throwEncodeError("vector<int64>");
472  validate();
473  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 478 of file Entry.cc.

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

479  : name_(name), rep(), type(kTuint64), tracked(is_tracked ? '+' : '-') {
480  if (!encode(rep, val))
481  throwEncodeError("unsigned int64");
482  validate();
483  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 488 of file Entry.cc.

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

489  : name_(name), rep(), type(kTvuint64), tracked(is_tracked ? '+' : '-') {
490  if (!encode(rep, val))
491  throwEncodeError("vector<unsigned int64>");
492  validate();
493  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 498 of file Entry.cc.

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

499  : name_(name), rep(), type(kTdouble), tracked(is_tracked ? '+' : '-') {
500  if (!encode(rep, val))
501  throwEncodeError("double");
502  validate();
503  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 508 of file Entry.cc.

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

509  : name_(name), rep(), type(kTvdouble), tracked(is_tracked ? '+' : '-') {
510  if (!encode(rep, val))
511  throwEncodeError("vector<double>");
512  validate();
513  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 518 of file Entry.cc.

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

519  : name_(name), rep(), type(kTstring), tracked(is_tracked ? '+' : '-') {
520  if (!encode(rep, val))
521  throwEncodeError("string");
522  validate();
523  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 528 of file Entry.cc.

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

529  : name_(name), rep(), type(kTvstring), tracked(is_tracked ? '+' : '-') {
530  if (!encode(rep, val))
531  throwEncodeError("vector<string>");
532  validate();
533  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 538 of file Entry.cc.

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

539  : name_(name), rep(), type(kTFileInPath), tracked(is_tracked ? '+' : '-') {
540  if (!encode(rep, val))
541  throwEncodeError("FileInPath");
542  validate();
543  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 548 of file Entry.cc.

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

549  : name_(name), rep(), type(kTInputTag), tracked(is_tracked ? '+' : '-') {
550  if (!encode(rep, val))
551  throwEncodeError("InputTag");
552  validate();
553  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 558 of file Entry.cc.

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

559  : name_(name), rep(), type(kTVInputTag), tracked(is_tracked ? '+' : '-') {
560  if (!encode(rep, val))
561  throwEncodeError("VInputTag");
562  validate();
563  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 568 of file Entry.cc.

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

569  : name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') {
570  if (!encode(rep, val))
571  throwEncodeError("InputTag");
572  validate();
573  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 578 of file Entry.cc.

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

579  : name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') {
580  if (!encode(rep, val))
581  throwEncodeError("VESInputTag");
582  validate();
583  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 588 of file Entry.cc.

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

589  : name_(name), rep(), type(kTEventID), tracked(is_tracked ? '+' : '-') {
590  if (!encode(rep, val))
591  throwEncodeError("EventID");
592  validate();
593  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 598 of file Entry.cc.

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

599  : name_(name), rep(), type(kTVEventID), tracked(is_tracked ? '+' : '-') {
600  if (!encode(rep, val))
601  throwEncodeError("VEventID");
602  validate();
603  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 608 of file Entry.cc.

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

609  : name_(name), rep(), type(kTLuminosityBlockID), tracked(is_tracked ? '+' : '-') {
610  if (!encode(rep, val))
611  throwEncodeError("LuminosityBlockID");
612  validate();
613  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 618 of file Entry.cc.

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

619  : name_(name), rep(), type(kTVLuminosityBlockID), tracked(is_tracked ? '+' : '-') {
620  if (!encode(rep, val))
621  throwEncodeError("VLuminosityBlockID");
622  validate();
623  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 628 of file Entry.cc.

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

629  : name_(name), rep(), type(kTLuminosityBlockRange), tracked(is_tracked ? '+' : '-') {
630  if (!encode(rep, val))
631  throwEncodeError("LuminosityBlockRange");
632  validate();
633  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 638 of file Entry.cc.

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

639  : name_(name), rep(), type(kTVLuminosityBlockRange), tracked(is_tracked ? '+' : '-') {
640  if (!encode(rep, val))
641  throwEncodeError("VLuminosityBlockRange");
642  validate();
643  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 648 of file Entry.cc.

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

649  : name_(name), rep(), type(kTEventRange), tracked(is_tracked ? '+' : '-') {
650  if (!encode(rep, val))
651  throwEncodeError("EventRange");
652  validate();
653  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 658 of file Entry.cc.

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

659  : name_(name), rep(), type(kTVEventRange), tracked(is_tracked ? '+' : '-') {
660  if (!encode(rep, val))
661  throwEncodeError("VEventRange");
662  validate();
663  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 668 of file Entry.cc.

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

669  : name_(name), rep(), type(kTPSet), tracked(is_tracked ? '+' : '-') {
670  if (!encode(rep, val))
671  throwEncodeError("ParameterSet");
672  validate();
673  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184
Definition: Entry.cc:37
Entry::Entry ( std::string const &  name,
std::vector< ParameterSet > const &  val,
bool  is_tracked 
)

Definition at line 678 of file Entry.cc.

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

679  : name_(name), rep(), type(kTvPSet), tracked(is_tracked ? '+' : '-') {
680  if (!encode(rep, val))
681  throwEncodeError("vector<ParameterSet>");
682  validate();
683  }
std::string rep
Definition: Entry.h:182
Definition: Entry.cc:38
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
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 688 of file Entry.cc.

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

688  : name_(name), rep(), type('?'), tracked('?') {
689  if (!fromString(code.begin(), code.end()))
690  throwEncodeError("coded string");
691  validate();
692  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
void throwEncodeError(char const *type) const
Definition: Entry.cc:1218
void validate() const
Definition: Entry.cc:210
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:763
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 694 of file Entry.cc.

References codeFromType(), edm::errors::Configuration, Exception, fromString(), AlCaHLTBitMon_QueryRunRegistry::string, validate(), and relativeConstraints::value.

695  : name_(name), rep(), type('?'), tracked('?') {
696  std::string codedString(is_tracked ? "-" : "+");
697 
698  codedString += codeFromType(type);
699  codedString += '(';
700  codedString += value;
701  codedString += ')';
702 
703  if (!fromString(codedString.begin(), codedString.end())) {
704  throw Exception(errors::Configuration) << "bad encoded Entry string " << codedString;
705  }
706  validate();
707  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
void validate() const
Definition: Entry.cc:210
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:763
char tracked
Definition: Entry.h:184
static char codeFromType(const std::string &iType)
Definition: Entry.cc:198
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::vector< std::string > const &  value,
bool  is_tracked 
)

Definition at line 709 of file Entry.cc.

References codeFromType(), edm::errors::Configuration, alignCSCRings::e, Exception, fromString(), mps_fire::i, AlCaHLTBitMon_QueryRunRegistry::string, and validate().

710  : name_(name), rep(), type('?'), tracked('?') {
711  std::string codedString(is_tracked ? "-" : "+");
712 
713  codedString += codeFromType(type);
714  codedString += '(';
715  codedString += '{';
716  std::vector<std::string>::const_iterator i = value.begin();
717  std::vector<std::string>::const_iterator e = value.end();
718  std::string const kSeparator(",");
719  std::string sep("");
720  for (; i != e; ++i) {
721  codedString += sep;
722  codedString += *i;
723  sep = kSeparator;
724  }
725  codedString += '}';
726  codedString += ')';
727 
728  if (!fromString(codedString.begin(), codedString.end())) {
729  throw Exception(errors::Configuration) << "bad encoded Entry string " << codedString;
730  }
731  validate();
732  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
void validate() const
Definition: Entry.cc:210
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:763
char tracked
Definition: Entry.h:184
static char codeFromType(const std::string &iType)
Definition: Entry.cc:198
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 763 of file Entry.cc.

References rep, AlCaHLTBitMon_QueryRunRegistry::string, and tracked.

Referenced by Entry().

763  {
764  if (static_cast<unsigned int>(e - b) < 4u || b[2] != '(' || e[-1] != ')')
765 
766  return false;
767 
768  tracked = b[0];
769  type = b[1];
770  rep = std::string(b + 3, e - 1);
771 
772  return true;
773  } // from_string()
std::string rep
Definition: Entry.h:182
char tracked
Definition: Entry.h:184
double b
Definition: hdecay.h:118
bool Entry::getBool ( ) const

Definition at line 782 of file Entry.cc.

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

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

782  {
783  if (type != kTbool)
784  throwValueError("bool");
785  bool val;
786  if (!decode(val, rep))
787  throwEntryError("bool", rep);
788  return val;
789  }
std::string rep
Definition: Entry.h:182
Definition: Entry.cc:23
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
double Entry::getDouble ( ) const

Definition at line 890 of file Entry.cc.

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

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

890  {
891  if (type != kTdouble)
892  throwValueError("double");
893  double val;
894  if (!decode(val, rep))
895  throwEntryError("double", rep);
896  return val;
897  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
ESInputTag Entry::getESInputTag ( ) const

Definition at line 974 of file Entry.cc.

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

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

974  {
975  if (type != kTESInputTag)
976  throwValueError("ESInputTag");
977  ESInputTag val;
978  if (!decode(val, rep))
979  throwEntryError("ESInputTag", rep);
980  return val;
981  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
EventID Entry::getEventID ( ) const

Definition at line 998 of file Entry.cc.

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

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

998  {
999  if (type != kTEventID)
1000  throwValueError("EventID");
1001  EventID val;
1002  if (!decode(val, rep))
1003  throwEntryError("EventID", rep);
1004  return val;
1005  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
EventRange Entry::getEventRange ( ) const

Definition at line 1069 of file Entry.cc.

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

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

1069  {
1070  if (type != kTEventRange)
1071  throwValueError("EventRange");
1072  EventRange val;
1073  if (!decode(val, rep))
1074  throwEntryError("EventRange", rep);
1075  return val;
1076  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
FileInPath Entry::getFileInPath ( ) const

Definition at line 938 of file Entry.cc.

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

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

938  {
939  if (type != kTFileInPath)
940  throwValueError("FileInPath");
941  FileInPath val;
942  if (!decode(val, rep))
943  throwEntryError("FileInPath", rep);
944  return val;
945  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
InputTag Entry::getInputTag ( ) const

Definition at line 950 of file Entry.cc.

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

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

950  {
951  if (type != kTInputTag)
952  throwValueError("InputTag");
953  InputTag val;
954  if (!decode(val, rep))
955  throwEntryError("InputTag", rep);
956  return val;
957  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
int Entry::getInt32 ( ) const

Definition at line 794 of file Entry.cc.

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

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

794  {
795  if (type != kTint32)
796  throwValueError("int");
797  int val;
798  if (!decode(val, rep))
799  throwEntryError("int", rep);
800  return val;
801  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
Definition: Entry.cc:25
long long Entry::getInt64 ( ) const

Definition at line 818 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter().

818  {
819  if (type != kTint64)
820  throwValueError("int64");
821  long long val;
822  if (!decode(val, rep))
823  throwEntryError("int64", rep);
824  return val;
825  }
std::string rep
Definition: Entry.h:182
Definition: Entry.cc:29
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
LuminosityBlockID Entry::getLuminosityBlockID ( ) const

Definition at line 1022 of file Entry.cc.

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

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

1022  {
1023  if (type != kTLuminosityBlockID)
1024  throwValueError("LuminosityBlockID");
1025  LuminosityBlockID val;
1026  if (!decode(val, rep))
1027  throwEntryError("LuminosityBlockID", rep);
1028  return val;
1029  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
LuminosityBlockRange Entry::getLuminosityBlockRange ( ) const

Definition at line 1045 of file Entry.cc.

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

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

1045  {
1047  throwValueError("LuminosityBlockRange");
1049  if (!decode(val, rep))
1050  throwEntryError("LuminosityBlockRange", rep);
1051  return val;
1052  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
ParameterSet Entry::getPSet ( ) const

Definition at line 1094 of file Entry.cc.

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

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

1094  {
1095  if (type != kTPSet)
1096  throwValueError("ParameterSet");
1097  ParameterSet val;
1098  if (!decode(val, rep))
1099  throwEntryError("ParameterSet", rep);
1100  return val;
1101  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
Definition: Entry.cc:37
std::string Entry::getString ( void  ) const

Definition at line 914 of file Entry.cc.

References edm::decode(), kTstring, rep, AlCaHLTBitMon_QueryRunRegistry::string, throwEntryError(), throwValueError(), and hgcalPerformanceValidation::val.

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

914  {
915  if (type != kTstring)
916  throwValueError("string");
918  if (!decode(val, rep))
919  throwEntryError("string", rep);
920  return val;
921  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
unsigned Entry::getUInt32 ( ) const

Definition at line 842 of file Entry.cc.

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

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

842  {
843  if (type != kTuint32)
844  throwValueError("unsigned int");
845  unsigned val;
846  if (!decode(val, rep))
847  throwEntryError("unsigned int", rep);
848  return val;
849  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
unsigned long long Entry::getUInt64 ( ) const

Definition at line 866 of file Entry.cc.

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

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

866  {
867  if (type != kTuint64)
868  throwValueError("uint64");
869  unsigned long long val;
870  if (!decode(val, rep))
871  throwEntryError("uint64", rep);
872  return val;
873  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< double > Entry::getVDouble ( ) const

Definition at line 902 of file Entry.cc.

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

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

902  {
903  if (type != kTvdouble)
904  throwValueError("vector<double>");
905  std::vector<double> val;
906  if (!decode(val, rep))
907  throwEntryError("vector<double>", rep);
908  return val;
909  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< ESInputTag > Entry::getVESInputTag ( ) const

Definition at line 986 of file Entry.cc.

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

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

986  {
987  if (type != kTVESInputTag)
988  throwValueError("VESInputTag");
989  std::vector<ESInputTag> val;
990  if (!decode(val, rep))
991  throwEntryError("VESInputTag", rep);
992  return val;
993  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< EventID > Entry::getVEventID ( ) const

Definition at line 1010 of file Entry.cc.

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

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

1010  {
1011  if (type != kTVEventID)
1012  throwValueError("VEventID");
1013  std::vector<EventID> val;
1014  if (!decode(val, rep))
1015  throwEntryError("EventID", rep);
1016  return val;
1017  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< EventRange > Entry::getVEventRange ( ) const

Definition at line 1081 of file Entry.cc.

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

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

1081  {
1082  if (type != kTVEventRange)
1083  throwValueError("VEventRange");
1084  std::vector<EventRange> val;
1085  if (!decode(val, rep))
1086  throwEntryError("EventRange", rep);
1087  return val;
1088  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< InputTag > Entry::getVInputTag ( ) const

Definition at line 962 of file Entry.cc.

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

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

962  {
963  if (type != kTVInputTag)
964  throwValueError("VInputTag");
965  std::vector<InputTag> val;
966  if (!decode(val, rep))
967  throwEntryError("VInputTag", rep);
968  return val;
969  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< int > Entry::getVInt32 ( ) const

Definition at line 806 of file Entry.cc.

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

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

806  {
807  if (type != kTvint32)
808  throwValueError("vector<int>");
809  std::vector<int> val;
810  if (!decode(val, rep))
811  throwEntryError("vector<int>", rep);
812  return val;
813  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< long long > Entry::getVInt64 ( ) const

Definition at line 830 of file Entry.cc.

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

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

830  {
831  if (type != kTvint64)
832  throwValueError("vector<int64>");
833  std::vector<long long> val;
834  if (!decode(val, rep))
835  throwEntryError("vector<int64>", rep);
836  return val;
837  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID ( ) const

Definition at line 1034 of file Entry.cc.

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

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

1034  {
1035  if (type != kTVLuminosityBlockID)
1036  throwValueError("VLuminosityBlockID");
1037  std::vector<LuminosityBlockID> val;
1038  if (!decode(val, rep))
1039  throwEntryError("LuminosityBlockID", rep);
1040  return val;
1041  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange ( ) const

Definition at line 1057 of file Entry.cc.

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

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

1057  {
1059  throwValueError("VLuminosityBlockRange");
1060  std::vector<LuminosityBlockRange> val;
1061  if (!decode(val, rep))
1062  throwEntryError("LuminosityBlockRange", rep);
1063  return val;
1064  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< ParameterSet > Entry::getVPSet ( ) const

Definition at line 1106 of file Entry.cc.

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

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

1106  {
1107  if (type != kTvPSet)
1108  throwValueError("vector<ParameterSet>");
1109  std::vector<ParameterSet> val;
1110  if (!decode(val, rep))
1111  throwEntryError("vector<ParameterSet>", rep);
1112  return val;
1113  }
std::string rep
Definition: Entry.h:182
Definition: Entry.cc:38
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< std::string > Entry::getVString ( ) const

Definition at line 926 of file Entry.cc.

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

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

926  {
927  if (type != kTvstring)
928  throwValueError("vector<string>");
929  std::vector<std::string> val;
930  if (!decode(val, rep))
931  throwEntryError("vector<string>", rep);
932  return val;
933  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< unsigned > Entry::getVUInt32 ( ) const

Definition at line 854 of file Entry.cc.

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

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

854  {
855  if (type != kTvuint32)
856  throwValueError("vector<unsigned int>");
857  std::vector<unsigned> val;
858  if (!decode(val, rep))
859  throwEntryError("vector<unsigned int>", rep);
860  return val;
861  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
std::vector< unsigned long long > Entry::getVUInt64 ( ) const

Definition at line 878 of file Entry.cc.

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

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

878  {
879  if (type != kTvuint64)
880  throwValueError("vector<uint64>");
881  std::vector<unsigned long long> val;
882  if (!decode(val, rep))
883  throwEntryError("vector<uint64>", rep);
884  return val;
885  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1208
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
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 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 1218 of file Entry.cc.

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

Referenced by Entry().

1218  {
1219  throw Exception(errors::Configuration, "EncodingError") << "can not encode " << name_ << " as type: " << type;
1220  }
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 747 of file Entry.cc.

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

747  {
748  digest.append(&tracked, 1);
749  digest.append(&type, 1);
750  digest.append("(", 1);
751  digest.append(rep);
752  digest.append(")", 1);
753  }
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 738 of file Entry.cc.

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

738  {
739  result.reserve(result.size() + sizeOfString());
740  result += tracked;
741  result += type;
742  result += '(';
743  result += rep;
744  result += ')';
745  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
size_t sizeOfString() const
Definition: Entry.h:171
tuple result
Definition: mps_fire.py:311
char tracked
Definition: Entry.h:184
char edm::Entry::typeCode ( ) const
inline
void Entry::validate ( ) const
private

Definition at line 210 of file Entry.cc.

References cms::cuda::assert(), edm::decode(), kTbool, kTdouble, kTESInputTag, kTEventID, kTEventRange, kTFileInPath, kTInputTag, kTint32, kTint64, kTLuminosityBlockID, kTLuminosityBlockRange, kTPSet, kTstring, kTuint32, kTuint64, kTvBool, kTvdouble, kTVESInputTag, kTVEventID, kTVEventRange, kTVInputTag, kTvint32, kTvint64, kTVLuminosityBlockID, kTVLuminosityBlockRange, kTvPSet, kTvstring, kTvuint32, kTvuint64, rep, AlCaHLTBitMon_QueryRunRegistry::string, throwEntryError(), tracked, and hgcalPerformanceValidation::val.

Referenced by Entry().

210  {
211  // tracked
212  assert(tracked == '+' || tracked == '-');
213  // if(tracked != '+' && tracked != '-')
214  // throw EntryError(std::string("invalid tracked code ") + tracked);
215 
216  // type and rep
217  switch (type) {
218  case kTbool: { // Bool
219  bool val;
220  if (!decode(val, rep))
221  throwEntryError("bool", rep);
222  break;
223  }
224  case kTvBool: { // vBool
225  std::vector<bool> val;
226  if (!decode(val, rep))
227  throwEntryError("vector<bool>", rep);
228  break;
229  }
230  case kTint32: { // Int32
231  int val;
232  if (!decode(val, rep))
233  throwEntryError("int", rep);
234  break;
235  }
236  case kTvint32: { // vInt32
237  std::vector<int> val;
238  if (!decode(val, rep))
239  throwEntryError("vector<int>", rep);
240  break;
241  }
242  case kTuint32: { // Uint32
243  unsigned val;
244  if (!decode(val, rep))
245  throwEntryError("unsigned int", rep);
246  break;
247  }
248  case kTvuint32: { // vUint32
249  std::vector<unsigned> val;
250  if (!decode(val, rep))
251  throwEntryError("vector<unsigned int>", rep);
252  break;
253  }
254  case kTint64: { // Int64
255  int val;
256  if (!decode(val, rep))
257  throwEntryError("int64", rep);
258  break;
259  }
260  case kTvint64: { // vInt64
261  std::vector<int> val;
262  if (!decode(val, rep))
263  throwEntryError("vector<int64>", rep);
264  break;
265  }
266  case kTuint64: { // Uint64
267  unsigned val;
268  if (!decode(val, rep))
269  throwEntryError("unsigned int64", rep);
270  break;
271  }
272  case kTvuint64: { // vUint64
273  std::vector<unsigned> val;
274  if (!decode(val, rep))
275  throwEntryError("vector<unsigned int64>", rep);
276  break;
277  }
278  case kTstring: { // String
280  if (!decode(val, rep))
281  throwEntryError("string", rep);
282  break;
283  }
284  case kTvstring: { // vString
285  std::vector<std::string> val;
286  if (!decode(val, rep))
287  throwEntryError("vector<string>", rep);
288  break;
289  }
290  case kTFileInPath: { // FileInPath
291  FileInPath val;
292  if (!decode(val, rep))
293  throwEntryError("FileInPath", rep);
294  break;
295  }
296  case kTInputTag: { // InputTag
297  InputTag val;
298  if (!decode(val, rep))
299  throwEntryError("InputTag", rep);
300  break;
301  }
302  case kTVInputTag: { // VInputTag
303  std::vector<InputTag> val;
304  if (!decode(val, rep))
305  throwEntryError("VInputTag", rep);
306  break;
307  }
308  case kTESInputTag: { //ESInputTag
309  ESInputTag val;
310  if (!decode(val, rep))
311  throwEntryError("ESInputTag", rep);
312  break;
313  }
314  case kTVESInputTag: { //ESInputTag
315  std::vector<ESInputTag> val;
316  if (!decode(val, rep))
317  throwEntryError("VESInputTag", rep);
318  break;
319  }
320  case kTEventID: { // EventID
321  EventID val;
322  if (!decode(val, rep))
323  throwEntryError("EventID", rep);
324  break;
325  }
326  case kTVEventID: { // VEventID
327  std::vector<EventID> val;
328  if (!decode(val, rep))
329  throwEntryError("VEventID", rep);
330  break;
331  }
332  case kTLuminosityBlockID: { // LuminosityBlockID
333  LuminosityBlockID val;
334  if (!decode(val, rep))
335  throwEntryError("LuminosityBlockID", rep);
336  break;
337  }
338  case kTVLuminosityBlockID: { // VLuminosityBlockID
339  std::vector<LuminosityBlockID> val;
340  if (!decode(val, rep))
341  throwEntryError("VLuminosityBlockID", rep);
342  break;
343  }
344  case kTdouble: { // Double
345  double val;
346  if (!decode(val, rep))
347  throwEntryError("double", rep);
348  break;
349  }
350  case kTvdouble: { // vDouble
351  std::vector<double> val;
352  if (!decode(val, rep))
353  throwEntryError("vector<double>", rep);
354  break;
355  }
356  case kTPSet: { // ParameterSet
358  if (!decode(val, rep))
359  throwEntryError("ParameterSet", rep);
360  break;
361  }
362  case kTvPSet: { // vParameterSet
363  std::vector<ParameterSet> val;
364  if (!decode(val, rep))
365  throwEntryError("vector<ParameterSet>", rep);
366  break;
367  }
368  case kTLuminosityBlockRange: { // LuminosityBlockRange
370  if (!decode(val, rep))
371  throwEntryError("LuminosityBlockRange", rep);
372  break;
373  }
374  case kTVLuminosityBlockRange: { // VLuminosityBlockRange
375  std::vector<LuminosityBlockRange> val;
376  if (!decode(val, rep))
377  throwEntryError("VLuminosityBlockRange", rep);
378  break;
379  }
380  case kTEventRange: { // EventRange
381  EventRange val;
382  if (!decode(val, rep))
383  throwEntryError("EventRange", rep);
384  break;
385  }
386  case kTVEventRange: { // VEventRange
387  std::vector<EventRange> val;
388  if (!decode(val, rep))
389  throwEntryError("VEventRange", rep);
390  break;
391  }
392  default: {
393  // We should never get here.
394  assert("Invalid type code" == nullptr);
395  //throw EntryError(std::string("invalid type code ") + type);
396  break;
397  }
398  } // switch(type)
399  } // Entry::validate()
std::string rep
Definition: Entry.h:182
Definition: Entry.cc:38
Definition: Entry.cc:23
Definition: Entry.cc:29
assert(be >=bs)
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1213
bool decode(bool &, std::string const &)
Definition: types.cc:71
Definition: Entry.cc:24
char tracked
Definition: Entry.h:184
Definition: Entry.cc:37
Definition: Entry.cc:25

Friends And Related Function Documentation

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

Definition at line 1115 of file Entry.cc.

1115  {
1116  os << typeFromCode(entry.typeCode()) << " " << (entry.isTracked() ? "tracked " : "untracked ") << " = ";
1117 
1118  // now handle the difficult cases
1119  switch (entry.typeCode()) {
1120  case kTPSet: // ParameterSet
1121  {
1122  os << entry.getPSet();
1123  break;
1124  }
1125  case 'p': // vector<ParameterSet>
1126  {
1127  // Make sure we get the representation of each contained
1128  // ParameterSet including *only* tracked parameters
1129  std::vector<ParameterSet> whole = entry.getVPSet();
1130  std::vector<ParameterSet>::const_iterator i = whole.begin();
1131  std::vector<ParameterSet>::const_iterator e = whole.end();
1132  std::string start = "";
1133  std::string const between(",\n");
1134  os << "{" << std::endl;
1135  for (; i != e; ++i) {
1136  os << start << *i;
1137  start = between;
1138  }
1139  if (!whole.empty()) {
1140  os << std::endl;
1141  }
1142  os << "}";
1143  break;
1144  }
1145  case kTstring: {
1146  os << "'" << entry.getString() << "'";
1147  break;
1148  }
1149  case kTvstring: {
1150  os << "{";
1151  std::string start = "'";
1152  std::string const between(",'");
1153  std::vector<std::string> strings = entry.getVString();
1154  for (std::vector<std::string>::const_iterator it = strings.begin(), itEnd = strings.end(); it != itEnd; ++it) {
1155  os << start << *it << "'";
1156  start = between;
1157  }
1158  os << "}";
1159  break;
1160  }
1161  case kTint32: {
1162  os << entry.getInt32();
1163  break;
1164  }
1165  case kTuint32: {
1166  os << entry.getUInt32();
1167  break;
1168  }
1169  case kTVInputTag: {
1170  //VInputTag needs to be treated seperately because it is encode like
1171  // vector<string> rather than using the individual encodings of each InputTag
1172  os << "{";
1173  std::string start = "";
1174  std::string const between(",");
1175  std::vector<InputTag> tags = entry.getVInputTag();
1176  for (std::vector<InputTag>::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it) {
1177  os << start << it->encode();
1178  start = between;
1179  }
1180  os << "}";
1181  break;
1182  }
1183  case kTVESInputTag: {
1184  //VESInputTag needs to be treated seperately because it is encode like
1185  // vector<string> rather than using the individual encodings of each ESInputTag
1186  os << "{";
1187  std::string start = "";
1188  std::string const between(",");
1189  std::vector<ESInputTag> tags = entry.getVESInputTag();
1190  for (std::vector<ESInputTag>::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it) {
1191  os << start << it->encode();
1192  start = between;
1193  }
1194  os << "}";
1195  break;
1196  }
1197  default: {
1198  os << entry.rep;
1199  break;
1200  }
1201  }
1202 
1203  return os;
1204  }
static constexpr std::string_view typeFromCode(char iCode)
Definition: Entry.cc:196
list entry
Definition: mps_splice.py:68
Definition: Entry.cc:37
Definition: Entry.cc:25

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(), isTracked(), toDigest(), toString(), and validate().

char edm::Entry::type
private