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() [1/33]

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

Definition at line 409 of file Entry.cc.

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

410  : name_(name), rep(), type(kTbool), tracked(is_tracked ? '+' : '-') {
411  if (!encode(rep, val))
412  throwEncodeError("bool");
413  validate();
414  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
Definition: Entry.cc:23
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [2/33]

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

Definition at line 419 of file Entry.cc.

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

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

◆ Entry() [3/33]

Entry::Entry ( std::string const &  name,
std::vector< int > const &  val,
bool  is_tracked 
)

Definition at line 429 of file Entry.cc.

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

430  : name_(name), rep(), type(kTvint32), tracked(is_tracked ? '+' : '-') {
431  if (!encode(rep, val))
432  throwEncodeError("vector<int>");
433  validate();
434  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [4/33]

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

Definition at line 439 of file Entry.cc.

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

440  : name_(name), rep(), type(kTuint32), tracked(is_tracked ? '+' : '-') {
441  if (!encode(rep, val))
442  throwEncodeError("unsigned int");
443  validate();
444  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [5/33]

Entry::Entry ( std::string const &  name,
std::vector< unsigned > const &  val,
bool  is_tracked 
)

Definition at line 449 of file Entry.cc.

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

450  : name_(name), rep(), type(kTvuint32), tracked(is_tracked ? '+' : '-') {
451  if (!encode(rep, val))
452  throwEncodeError("vector<unsigned int>");
453  validate();
454  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [6/33]

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

Definition at line 459 of file Entry.cc.

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

460  : name_(name), rep(), type(kTint64), tracked(is_tracked ? '+' : '-') {
461  if (!encode(rep, val))
462  throwEncodeError("int64");
463  validate();
464  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
Definition: Entry.cc:29
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [7/33]

Entry::Entry ( std::string const &  name,
std::vector< long long > const &  val,
bool  is_tracked 
)

Definition at line 469 of file Entry.cc.

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

470  : name_(name), rep(), type(kTvint64), tracked(is_tracked ? '+' : '-') {
471  if (!encode(rep, val))
472  throwEncodeError("vector<int64>");
473  validate();
474  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [8/33]

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

Definition at line 479 of file Entry.cc.

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

480  : name_(name), rep(), type(kTuint64), tracked(is_tracked ? '+' : '-') {
481  if (!encode(rep, val))
482  throwEncodeError("unsigned int64");
483  validate();
484  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [9/33]

Entry::Entry ( std::string const &  name,
std::vector< unsigned long long > const &  val,
bool  is_tracked 
)

Definition at line 489 of file Entry.cc.

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

490  : name_(name), rep(), type(kTvuint64), tracked(is_tracked ? '+' : '-') {
491  if (!encode(rep, val))
492  throwEncodeError("vector<unsigned int64>");
493  validate();
494  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [10/33]

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

Definition at line 499 of file Entry.cc.

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

500  : name_(name), rep(), type(kTdouble), tracked(is_tracked ? '+' : '-') {
501  if (!encode(rep, val))
502  throwEncodeError("double");
503  validate();
504  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [11/33]

Entry::Entry ( std::string const &  name,
std::vector< double > const &  val,
bool  is_tracked 
)

Definition at line 509 of file Entry.cc.

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

510  : name_(name), rep(), type(kTvdouble), tracked(is_tracked ? '+' : '-') {
511  if (!encode(rep, val))
512  throwEncodeError("vector<double>");
513  validate();
514  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [12/33]

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

Definition at line 519 of file Entry.cc.

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

520  : name_(name), rep(), type(kTstring), tracked(is_tracked ? '+' : '-') {
521  if (!encode(rep, val))
522  throwEncodeError("string");
523  validate();
524  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [13/33]

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

Definition at line 529 of file Entry.cc.

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

530  : name_(name), rep(), type(kTvstring), tracked(is_tracked ? '+' : '-') {
531  if (!encode(rep, val))
532  throwEncodeError("vector<string>");
533  validate();
534  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [14/33]

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

Definition at line 539 of file Entry.cc.

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

540  : name_(name), rep(), type(kTFileInPath), tracked(is_tracked ? '+' : '-') {
541  if (!encode(rep, val))
542  throwEncodeError("FileInPath");
543  validate();
544  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [15/33]

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

Definition at line 549 of file Entry.cc.

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

550  : name_(name), rep(), type(kTInputTag), tracked(is_tracked ? '+' : '-') {
551  if (!encode(rep, val))
552  throwEncodeError("InputTag");
553  validate();
554  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [16/33]

Entry::Entry ( std::string const &  name,
std::vector< InputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 559 of file Entry.cc.

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

560  : name_(name), rep(), type(kTVInputTag), tracked(is_tracked ? '+' : '-') {
561  if (!encode(rep, val))
562  throwEncodeError("VInputTag");
563  validate();
564  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [17/33]

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

Definition at line 569 of file Entry.cc.

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

570  : name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') {
571  if (!encode(rep, val))
572  throwEncodeError("InputTag");
573  validate();
574  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [18/33]

Entry::Entry ( std::string const &  name,
std::vector< ESInputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 579 of file Entry.cc.

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

580  : name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') {
581  if (!encode(rep, val))
582  throwEncodeError("VESInputTag");
583  validate();
584  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [19/33]

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

Definition at line 589 of file Entry.cc.

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

590  : name_(name), rep(), type(kTEventID), tracked(is_tracked ? '+' : '-') {
591  if (!encode(rep, val))
592  throwEncodeError("EventID");
593  validate();
594  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [20/33]

Entry::Entry ( std::string const &  name,
std::vector< EventID > const &  vtag,
bool  is_tracked 
)

Definition at line 599 of file Entry.cc.

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

600  : name_(name), rep(), type(kTVEventID), tracked(is_tracked ? '+' : '-') {
601  if (!encode(rep, val))
602  throwEncodeError("VEventID");
603  validate();
604  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [21/33]

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

Definition at line 609 of file Entry.cc.

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

610  : name_(name), rep(), type(kTLuminosityBlockID), tracked(is_tracked ? '+' : '-') {
611  if (!encode(rep, val))
612  throwEncodeError("LuminosityBlockID");
613  validate();
614  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [22/33]

Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockID > const &  vtag,
bool  is_tracked 
)

Definition at line 619 of file Entry.cc.

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

620  : name_(name), rep(), type(kTVLuminosityBlockID), tracked(is_tracked ? '+' : '-') {
621  if (!encode(rep, val))
622  throwEncodeError("VLuminosityBlockID");
623  validate();
624  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [23/33]

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

Definition at line 629 of file Entry.cc.

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

630  : name_(name), rep(), type(kTLuminosityBlockRange), tracked(is_tracked ? '+' : '-') {
631  if (!encode(rep, val))
632  throwEncodeError("LuminosityBlockRange");
633  validate();
634  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [24/33]

Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockRange > const &  vtag,
bool  is_tracked 
)

Definition at line 639 of file Entry.cc.

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

640  : name_(name), rep(), type(kTVLuminosityBlockRange), tracked(is_tracked ? '+' : '-') {
641  if (!encode(rep, val))
642  throwEncodeError("VLuminosityBlockRange");
643  validate();
644  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [25/33]

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

Definition at line 649 of file Entry.cc.

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

650  : name_(name), rep(), type(kTEventRange), tracked(is_tracked ? '+' : '-') {
651  if (!encode(rep, val))
652  throwEncodeError("EventRange");
653  validate();
654  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [26/33]

Entry::Entry ( std::string const &  name,
std::vector< EventRange > const &  vtag,
bool  is_tracked 
)

Definition at line 659 of file Entry.cc.

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

660  : name_(name), rep(), type(kTVEventRange), tracked(is_tracked ? '+' : '-') {
661  if (!encode(rep, val))
662  throwEncodeError("VEventRange");
663  validate();
664  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [27/33]

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

Definition at line 669 of file Entry.cc.

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

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

◆ Entry() [28/33]

Entry::Entry ( std::string const &  name,
std::vector< ParameterSet > const &  val,
bool  is_tracked 
)

Definition at line 679 of file Entry.cc.

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

680  : name_(name), rep(), type(kTvPSet), tracked(is_tracked ? '+' : '-') {
681  if (!encode(rep, val))
682  throwEncodeError("vector<ParameterSet>");
683  validate();
684  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
bool encode(std::string &, bool)
Definition: types.cc:85
Definition: Entry.cc:38
std::string name_
Definition: Entry.h:181
char tracked
Definition: Entry.h:184

◆ Entry() [29/33]

Entry::Entry ( std::string const &  name,
std::string const &  code 
)

Definition at line 689 of file Entry.cc.

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

689  : name_(name), rep(), type('?'), tracked('?') {
690  if (!fromString(code.begin(), code.end()))
691  throwEncodeError("coded string");
692  validate();
693  }
void validate() const
Definition: Entry.cc:210
std::string rep
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1219
char type
Definition: Entry.h:183
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:764
char tracked
Definition: Entry.h:184

◆ Entry() [30/33]

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

Definition at line 695 of file Entry.cc.

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

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

◆ Entry() [31/33]

Entry::Entry ( std::string const &  name,
std::string const &  type,
std::vector< std::string > const &  value,
bool  is_tracked 
)

Definition at line 710 of file Entry.cc.

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

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

◆ ~Entry()

edm::Entry::~Entry ( )
default

◆ Entry() [32/33]

edm::Entry::Entry ( Entry const &  )
default

◆ Entry() [33/33]

edm::Entry::Entry ( Entry &&  )
default

Member Function Documentation

◆ fromString()

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

Definition at line 764 of file Entry.cc.

References b, MillePedeFileConverter_cfg::e, rep, AlCaHLTBitMon_QueryRunRegistry::string, and tracked.

Referenced by Entry().

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

◆ getBool()

bool Entry::getBool ( ) const

Definition at line 783 of file Entry.cc.

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

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

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

◆ getDouble()

double Entry::getDouble ( ) const

Definition at line 891 of file Entry.cc.

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

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

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

◆ getESInputTag()

ESInputTag Entry::getESInputTag ( ) const

Definition at line 975 of file Entry.cc.

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

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

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

◆ getEventID()

EventID Entry::getEventID ( ) const

Definition at line 999 of file Entry.cc.

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

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

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

◆ getEventRange()

EventRange Entry::getEventRange ( ) const

Definition at line 1070 of file Entry.cc.

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

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

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

◆ getFileInPath()

FileInPath Entry::getFileInPath ( ) const

Definition at line 939 of file Entry.cc.

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

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

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

◆ getInputTag()

InputTag Entry::getInputTag ( ) const

Definition at line 951 of file Entry.cc.

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

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

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

◆ getInt32()

int Entry::getInt32 ( ) const

Definition at line 795 of file Entry.cc.

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

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

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

◆ getInt64()

long long Entry::getInt64 ( ) const

Definition at line 819 of file Entry.cc.

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

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

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

◆ getLuminosityBlockID()

LuminosityBlockID Entry::getLuminosityBlockID ( ) const

Definition at line 1023 of file Entry.cc.

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

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

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

◆ getLuminosityBlockRange()

LuminosityBlockRange Entry::getLuminosityBlockRange ( ) const

Definition at line 1046 of file Entry.cc.

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

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

1046  {
1048  throwValueError("LuminosityBlockRange");
1050  if (!decode(val, rep))
1051  throwEntryError("LuminosityBlockRange", rep);
1052  return val;
1053  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1209
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1214
bool decode(bool &, std::string const &)
Definition: types.cc:71

◆ getPSet()

ParameterSet Entry::getPSet ( ) const

Definition at line 1095 of file Entry.cc.

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

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

◆ getString()

std::string Entry::getString ( void  ) const

Definition at line 915 of file Entry.cc.

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

Referenced by edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter< std::string >().

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

◆ getUInt32()

unsigned Entry::getUInt32 ( ) const

Definition at line 843 of file Entry.cc.

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

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

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

◆ getUInt64()

unsigned long long Entry::getUInt64 ( ) const

Definition at line 867 of file Entry.cc.

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

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

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

◆ getVDouble()

std::vector< double > Entry::getVDouble ( ) const

Definition at line 903 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< double > >().

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

◆ getVESInputTag()

std::vector< ESInputTag > Entry::getVESInputTag ( ) const

Definition at line 987 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< ESInputTag > >().

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

◆ getVEventID()

std::vector< EventID > Entry::getVEventID ( ) const

Definition at line 1011 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< EventID > >().

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

◆ getVEventRange()

std::vector< EventRange > Entry::getVEventRange ( ) const

Definition at line 1082 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< EventRange > >().

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

◆ getVInputTag()

std::vector< InputTag > Entry::getVInputTag ( ) const

Definition at line 963 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< InputTag > >().

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

◆ getVInt32()

std::vector< int > Entry::getVInt32 ( ) const

Definition at line 807 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< int > >().

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

◆ getVInt64()

std::vector< long long > Entry::getVInt64 ( ) const

Definition at line 831 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< long long > >().

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

◆ getVLuminosityBlockID()

std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID ( ) const

Definition at line 1035 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< LuminosityBlockID > >().

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

◆ getVLuminosityBlockRange()

std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange ( ) const

Definition at line 1058 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< LuminosityBlockRange > >().

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

◆ getVPSet()

std::vector< ParameterSet > Entry::getVPSet ( ) const

Definition at line 1107 of file Entry.cc.

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

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

◆ getVString()

std::vector< std::string > Entry::getVString ( ) const

Definition at line 927 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< std::string > >().

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

◆ getVUInt32()

std::vector< unsigned > Entry::getVUInt32 ( ) const

Definition at line 855 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< unsigned int > >().

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

◆ getVUInt64()

std::vector< unsigned long long > Entry::getVUInt64 ( ) const

Definition at line 879 of file Entry.cc.

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

Referenced by edm::ParameterSet::getUntrackedParameter< std::vector< unsigned long long > >().

879  {
880  if (type != kTvuint64)
881  throwValueError("vector<uint64>");
882  std::vector<unsigned long long> val;
883  if (!decode(val, rep))
884  throwEntryError("vector<uint64>", rep);
885  return val;
886  }
std::string rep
Definition: Entry.h:182
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1209
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1214
bool decode(bool &, std::string const &)
Definition: types.cc:71

◆ isTracked()

bool edm::Entry::isTracked ( ) const
inline

◆ operator=() [1/2]

Entry& edm::Entry::operator= ( Entry const &  )
default

◆ operator=() [2/2]

Entry& edm::Entry::operator= ( Entry &&  )
default

◆ sizeOfString()

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

◆ throwEncodeError()

void Entry::throwEncodeError ( char const *  type) const
private

Definition at line 1219 of file Entry.cc.

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

Referenced by Entry().

1219  {
1220  throw Exception(errors::Configuration, "EncodingError") << "can not encode " << name_ << " as type: " << type;
1221  }
char type
Definition: Entry.h:183
std::string name_
Definition: Entry.h:181

◆ throwEntryError()

void Entry::throwEntryError ( char const *  expectedType,
std::string const &  badRep 
) const
private

◆ throwValueError()

void Entry::throwValueError ( char const *  expectedType) const
private

◆ toDigest()

void Entry::toDigest ( cms::Digest digest) const

Definition at line 748 of file Entry.cc.

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

748  {
749  digest.append(&tracked, 1);
750  digest.append(&type, 1);
751  digest.append("(", 1);
752  digest.append(rep);
753  digest.append(")", 1);
754  }
std::string rep
Definition: Entry.h:182
char tracked
Definition: Entry.h:184
void append(std::string const &s)
Definition: Digest.cc:161

◆ toString() [1/2]

std::string Entry::toString ( ) const

◆ toString() [2/2]

void Entry::toString ( std::string &  result) const

Definition at line 739 of file Entry.cc.

References rep, mps_fire::result, sizeOfString(), tracked, and type.

739  {
740  result.reserve(result.size() + sizeOfString());
741  result += tracked;
742  result += type;
743  result += '(';
744  result += rep;
745  result += ')';
746  }
std::string rep
Definition: Entry.h:182
size_t sizeOfString() const
Definition: Entry.h:171
char type
Definition: Entry.h:183
char tracked
Definition: Entry.h:184

◆ typeCode()

char edm::Entry::typeCode ( ) const
inline

Definition at line 176 of file Entry.h.

References type.

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

176 { return type; }
char type
Definition: Entry.h:183

◆ validate()

void Entry::validate ( ) const
private

Definition at line 210 of file Entry.cc.

References cms::cuda::assert(), edm::errors::Configuration, edm::decode(), Exception, 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 heppy_batch::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  long long int val;
256  if (!decode(val, rep))
257  throwEntryError("int64", rep);
258  break;
259  }
260  case kTvint64: { // vInt64
261  std::vector<long long int> val;
262  if (!decode(val, rep))
263  throwEntryError("vector<int64>", rep);
264  break;
265  }
266  case kTuint64: { // Uint64
267  unsigned long long int val;
268  if (!decode(val, rep))
269  throwEntryError("unsigned int64", rep);
270  break;
271  }
272  case kTvuint64: { // vUint64
273  std::vector<unsigned long long int> 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  throw edm::Exception(edm::errors::Configuration) << "Unknown ParameterSet Entry type encoding: '" << type
395  << "'.\n This could be caused by reading a file which was "
396  "written using a newer incompatible software release.";
397  break;
398  }
399  } // switch(type)
400  } // Entry::validate()
std::string rep
Definition: Entry.h:182
Definition: Entry.cc:23
Definition: Entry.cc:37
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1214
Definition: Entry.cc:38
Definition: Entry.cc:29
assert(be >=bs)
bool decode(bool &, std::string const &)
Definition: types.cc:71
Definition: Entry.cc:24
char tracked
Definition: Entry.h:184
Definition: Entry.cc:25

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 1116 of file Entry.cc.

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

Member Data Documentation

◆ name_

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

Definition at line 181 of file Entry.h.

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

◆ rep

std::string edm::Entry::rep
private

◆ tracked

char edm::Entry::tracked
private

Definition at line 184 of file Entry.h.

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

◆ type

char edm::Entry::type
private