CMS 3D CMS Logo

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

#include <Entry.h>

Public Member Functions

 Entry (std::string const &name, bool val, bool is_tracked)
 
 Entry (std::string const &name, int val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< int > const &val, bool is_tracked)
 
 Entry (std::string const &name, unsigned val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< unsigned > const &val, bool is_tracked)
 
 Entry (std::string const &name, long long val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< long long > const &val, bool is_tracked)
 
 Entry (std::string const &name, unsigned long long val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< unsigned long long > const &val, bool is_tracked)
 
 Entry (std::string const &name, double val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< double > const &val, bool is_tracked)
 
 Entry (std::string const &name, std::string const &val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< std::string > const &val, bool is_tracked)
 
 Entry (std::string const &name, FileInPath const &val, bool is_tracked)
 
 Entry (std::string const &name, InputTag const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< InputTag > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, ESInputTag const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< ESInputTag > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, EventID const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< EventID > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, LuminosityBlockID const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< LuminosityBlockID > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, LuminosityBlockRange const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< LuminosityBlockRange > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, EventRange const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< EventRange > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, ParameterSet const &val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< ParameterSet > const &val, bool is_tracked)
 
 Entry (std::string const &name, std::string const &)
 
 Entry (std::string const &name, std::string const &type, std::string const &value, bool is_tracked)
 
 Entry (std::string const &name, std::string const &type, std::vector< std::string > const &value, bool is_tracked)
 
 Entry (Entry const &)=default
 
 Entry (Entry &&)=default
 
bool getBool () const
 
double getDouble () const
 
ESInputTag getESInputTag () const
 
EventID getEventID () const
 
EventRange getEventRange () const
 
FileInPath getFileInPath () const
 
InputTag getInputTag () const
 
int getInt32 () const
 
long long getInt64 () const
 
LuminosityBlockID getLuminosityBlockID () const
 
LuminosityBlockRange getLuminosityBlockRange () const
 
ParameterSet getPSet () const
 
std::string getString () const
 
unsigned getUInt32 () const
 
unsigned long long getUInt64 () const
 
std::vector< double > getVDouble () const
 
std::vector< ESInputTaggetVESInputTag () const
 
std::vector< EventIDgetVEventID () const
 
std::vector< EventRangegetVEventRange () const
 
std::vector< InputTaggetVInputTag () const
 
std::vector< int > getVInt32 () const
 
std::vector< long long > getVInt64 () const
 
std::vector< LuminosityBlockIDgetVLuminosityBlockID () const
 
std::vector< LuminosityBlockRangegetVLuminosityBlockRange () const
 
std::vector< ParameterSetgetVPSet () const
 
std::vector< std::string > getVString () const
 
std::vector< unsigned > getVUInt32 () const
 
std::vector< unsigned long long > getVUInt64 () const
 
bool isTracked () const
 
Entryoperator= (Entry const &)=default
 
Entryoperator= (Entry &&)=default
 
size_t sizeOfString () const
 
void toDigest (cms::Digest &digest) const
 
std::string toString () const
 
void toString (std::string &result) const
 
char typeCode () const
 
 ~Entry ()=default
 

Private Member Functions

bool fromString (std::string::const_iterator b, std::string::const_iterator e)
 
void throwEncodeError (char const *type) const
 
void throwEntryError (char const *expectedType, std::string const &badRep) const
 
void throwValueError (char const *expectedType) const
 
void validate () const
 

Private Attributes

std::string name_
 
std::string rep
 
char tracked
 
char type
 

Friends

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

Detailed Description

Definition at line 40 of file Entry.h.

Constructor & Destructor Documentation

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

Definition at line 277 of file Entry.cc.

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

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

Definition at line 287 of file Entry.cc.

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

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

Definition at line 297 of file Entry.cc.

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

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

Definition at line 307 of file Entry.cc.

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

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

Definition at line 317 of file Entry.cc.

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

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

Definition at line 327 of file Entry.cc.

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

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

Definition at line 337 of file Entry.cc.

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

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

Definition at line 347 of file Entry.cc.

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

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

Definition at line 357 of file Entry.cc.

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

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

Definition at line 367 of file Entry.cc.

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

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

Definition at line 377 of file Entry.cc.

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

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

Definition at line 387 of file Entry.cc.

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

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

Definition at line 397 of file Entry.cc.

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

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

Definition at line 407 of file Entry.cc.

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

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

Definition at line 417 of file Entry.cc.

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

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

Definition at line 427 of file Entry.cc.

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

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

Definition at line 437 of file Entry.cc.

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

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

Definition at line 447 of file Entry.cc.

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

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

Definition at line 457 of file Entry.cc.

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

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

Definition at line 467 of file Entry.cc.

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

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

Definition at line 477 of file Entry.cc.

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

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

Definition at line 487 of file Entry.cc.

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

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

Definition at line 497 of file Entry.cc.

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

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

Definition at line 507 of file Entry.cc.

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

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

Definition at line 517 of file Entry.cc.

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

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

Definition at line 527 of file Entry.cc.

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

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

Definition at line 537 of file Entry.cc.

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

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

Definition at line 547 of file Entry.cc.

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

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

Definition at line 557 of file Entry.cc.

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

557  : name_(name), rep(), type('?'), tracked('?') {
558  if (!fromString(code.begin(), code.end()))
559  throwEncodeError("coded string");
560  validate();
561  }
std::string rep
Definition: Entry.h:182
char type
Definition: Entry.h:183
void throwEncodeError(char const *type) const
Definition: Entry.cc:1097
void validate() const
Definition: Entry.cc:79
std::string name_
Definition: Entry.h:181
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:642
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 563 of file Entry.cc.

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

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

Definition at line 583 of file Entry.cc.

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

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

Member Function Documentation

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

Definition at line 642 of file Entry.cc.

References rep, AlCaHLTBitMon_QueryRunRegistry::string, and tracked.

Referenced by Entry().

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

Definition at line 661 of file Entry.cc.

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

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

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

Definition at line 769 of file Entry.cc.

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

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

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

Definition at line 853 of file Entry.cc.

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

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

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

Definition at line 877 of file Entry.cc.

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

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

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

Definition at line 948 of file Entry.cc.

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

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

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

Definition at line 817 of file Entry.cc.

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

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

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

Definition at line 829 of file Entry.cc.

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

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

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

Definition at line 673 of file Entry.cc.

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

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

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

Definition at line 697 of file Entry.cc.

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

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

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

Definition at line 901 of file Entry.cc.

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

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

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

Definition at line 924 of file Entry.cc.

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

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

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

Definition at line 973 of file Entry.cc.

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

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

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

Definition at line 721 of file Entry.cc.

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

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

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

Definition at line 745 of file Entry.cc.

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

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

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

Definition at line 781 of file Entry.cc.

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

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

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

Definition at line 865 of file Entry.cc.

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

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

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

Definition at line 889 of file Entry.cc.

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

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

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

Definition at line 960 of file Entry.cc.

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

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

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

Definition at line 841 of file Entry.cc.

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

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

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

Definition at line 685 of file Entry.cc.

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

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

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

Definition at line 709 of file Entry.cc.

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

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

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

Definition at line 913 of file Entry.cc.

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

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

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

Definition at line 936 of file Entry.cc.

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

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

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

Definition at line 985 of file Entry.cc.

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

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

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

Definition at line 805 of file Entry.cc.

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

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

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

Definition at line 733 of file Entry.cc.

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

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

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

Definition at line 757 of file Entry.cc.

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

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

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

Definition at line 171 of file Entry.h.

References cuy::rep.

Referenced by toString().

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

Definition at line 1097 of file Entry.cc.

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

Referenced by Entry().

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

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

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

Definition at line 617 of file Entry.cc.

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

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

Definition at line 79 of file Entry.cc.

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

Referenced by Entry().

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

Friends And Related Function Documentation

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

Definition at line 994 of file Entry.cc.

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

Member Data Documentation

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

Definition at line 181 of file Entry.h.

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

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

Definition at line 184 of file Entry.h.

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

char edm::Entry::type
private