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 41 of file Entry.h.

Constructor & Destructor Documentation

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

Definition at line 255 of file Entry.cc.

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

255  :
256  name_(name), rep(), type('B'), tracked(is_tracked ? '+' : '-') {
257  if(!encode(rep, val)) throwEncodeError("bool");
258  validate();
259  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
int  val,
bool  is_tracked 
)

Definition at line 264 of file Entry.cc.

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

264  :
265  name_(name), rep(), type('I'), tracked(is_tracked ? '+' : '-') {
266  if(!encode(rep, val)) throwEncodeError("int");
267  validate();
268  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< int > const &  val,
bool  is_tracked 
)

Definition at line 273 of file Entry.cc.

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

273  :
274  name_(name), rep(), type('i'), tracked(is_tracked ? '+' : '-') {
275  if(!encode(rep, val)) throwEncodeError("vector<int>");
276  validate();
277  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
unsigned  val,
bool  is_tracked 
)

Definition at line 282 of file Entry.cc.

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

282  :
283  name_(name), rep(), type('U'), tracked(is_tracked ? '+' : '-') {
284  if(!encode(rep, val)) throwEncodeError("unsigned int");
285  validate();
286  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< unsigned > const &  val,
bool  is_tracked 
)

Definition at line 291 of file Entry.cc.

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

291  :
292  name_(name), rep(), type('u'), tracked(is_tracked ? '+' : '-') {
293  if(!encode(rep, val)) throwEncodeError("vector<unsigned int>");
294  validate();
295  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
long long  val,
bool  is_tracked 
)

Definition at line 300 of file Entry.cc.

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

300  :
301  name_(name), rep(), type('L'), tracked(is_tracked ? '+' : '-') {
302  if(!encode(rep, val)) throwEncodeError("int64");
303  validate();
304  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< long long > const &  val,
bool  is_tracked 
)

Definition at line 309 of file Entry.cc.

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

309  :
310  name_(name), rep(), type('l'), tracked(is_tracked ? '+' : '-') {
311  if(!encode(rep, val)) throwEncodeError("vector<int64>");
312  validate();
313  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
unsigned long long  val,
bool  is_tracked 
)

Definition at line 318 of file Entry.cc.

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

318  :
319  name_(name), rep(), type('X'), tracked(is_tracked ? '+' : '-') {
320  if(!encode(rep, val)) throwEncodeError("unsigned int64");
321  validate();
322  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< unsigned long long > const &  val,
bool  is_tracked 
)

Definition at line 327 of file Entry.cc.

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

327  :
328  name_(name), rep(), type('x'), tracked(is_tracked ? '+' : '-') {
329  if(!encode(rep, val)) throwEncodeError("vector<unsigned int64>");
330  validate();
331  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
double  val,
bool  is_tracked 
)

Definition at line 336 of file Entry.cc.

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

336  :
337  name_(name), rep(), type('D'), tracked(is_tracked ? '+' : '-') {
338  if(!encode(rep, val)) throwEncodeError("double");
339  validate();
340  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< double > const &  val,
bool  is_tracked 
)

Definition at line 345 of file Entry.cc.

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

345  :
346  name_(name), rep(), type('d'), tracked(is_tracked ? '+' : '-') {
347  if(!encode(rep, val)) throwEncodeError("vector<double>");
348  validate();
349  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::string const &  val,
bool  is_tracked 
)

Definition at line 354 of file Entry.cc.

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

354  :
355  name_(name), rep(), type('S'), tracked(is_tracked ? '+' : '-') {
356  if(!encode(rep, val)) throwEncodeError("string");
357  validate();
358  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< std::string > const &  val,
bool  is_tracked 
)

Definition at line 363 of file Entry.cc.

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

363  :
364  name_(name), rep(), type('s'), tracked(is_tracked ? '+' : '-') {
365  if(!encode(rep, val)) throwEncodeError("vector<string>");
366  validate();
367  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
FileInPath const &  val,
bool  is_tracked 
)

Definition at line 372 of file Entry.cc.

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

372  :
373  name_(name), rep(), type('F'), tracked(is_tracked ? '+' : '-') {
374  if (!encode(rep, val)) throwEncodeError("FileInPath");
375  validate();
376  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
InputTag const &  tag,
bool  is_tracked 
)

Definition at line 381 of file Entry.cc.

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

381  :
382  name_(name), rep(), type('t'), tracked(is_tracked ? '+' : '-') {
383  if (!encode(rep, val)) throwEncodeError("InputTag");
384  validate();
385  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< InputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 391 of file Entry.cc.

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

391  :
392  name_(name), rep(), type('v'), tracked(is_tracked ? '+' : '-') {
393  if (!encode(rep, val)) throwEncodeError("VInputTag");
394  validate();
395  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
ESInputTag const &  tag,
bool  is_tracked 
)

Definition at line 401 of file Entry.cc.

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

401  :
402  name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') {
403  if (!encode(rep, val)) throwEncodeError("InputTag");
404  validate();
405  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< ESInputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 410 of file Entry.cc.

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

410  :
411  name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') {
412  if (!encode(rep, val)) throwEncodeError("VESInputTag");
413  validate();
414  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
EventID const &  tag,
bool  is_tracked 
)

Definition at line 420 of file Entry.cc.

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

420  :
421  name_(name), rep(), type('E'), tracked(is_tracked ? '+' : '-') {
422  if (!encode(rep, val)) throwEncodeError("EventID");
423  validate();
424  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< EventID > const &  vtag,
bool  is_tracked 
)

Definition at line 430 of file Entry.cc.

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

430  :
431  name_(name), rep(), type('e'), tracked(is_tracked ? '+' : '-') {
432  if (!encode(rep, val)) throwEncodeError("VEventID");
433  validate();
434  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
LuminosityBlockID const &  tag,
bool  is_tracked 
)

Definition at line 441 of file Entry.cc.

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

441  :
442  name_(name), rep(), type('M'), tracked(is_tracked ? '+' : '-') {
443  if (!encode(rep, val)) throwEncodeError("LuminosityBlockID");
444  validate();
445  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockID > const &  vtag,
bool  is_tracked 
)

Definition at line 451 of file Entry.cc.

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

451  :
452  name_(name), rep(), type('m'), tracked(is_tracked ? '+' : '-') {
453  if (!encode(rep, val)) throwEncodeError("VLuminosityBlockID");
454  validate();
455  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
LuminosityBlockRange const &  tag,
bool  is_tracked 
)

Definition at line 460 of file Entry.cc.

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

460  :
461  name_(name), rep(), type('A'), tracked(is_tracked ? '+' : '-') {
462  if (!encode(rep, val)) throwEncodeError("LuminosityBlockRange");
463  validate();
464  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockRange > const &  vtag,
bool  is_tracked 
)

Definition at line 470 of file Entry.cc.

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

470  :
471  name_(name), rep(), type('a'), tracked(is_tracked ? '+' : '-') {
472  if (!encode(rep, val)) throwEncodeError("VLuminosityBlockRange");
473  validate();
474  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
EventRange const &  tag,
bool  is_tracked 
)

Definition at line 479 of file Entry.cc.

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

479  :
480  name_(name), rep(), type('R'), tracked(is_tracked ? '+' : '-') {
481  if (!encode(rep, val)) throwEncodeError("EventRange");
482  validate();
483  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< EventRange > const &  vtag,
bool  is_tracked 
)

Definition at line 488 of file Entry.cc.

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

488  :
489  name_(name), rep(), type('r'), tracked(is_tracked ? '+' : '-') {
490  if (!encode(rep, val)) throwEncodeError("VEventRange");
491  validate();
492  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
ParameterSet const &  val,
bool  is_tracked 
)

Definition at line 498 of file Entry.cc.

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

498  :
499  name_(name), rep(), type('P'), tracked(is_tracked ? '+' : '-') {
500  if(!encode(rep, val)) throwEncodeError("ParameterSet");
501  validate();
502  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::vector< ParameterSet > const &  val,
bool  is_tracked 
)

Definition at line 507 of file Entry.cc.

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

507  :
508  name_(name), rep(), type('p'), tracked(is_tracked ? '+' : '-') {
509  if(!encode(rep, val)) throwEncodeError("vector<ParameterSet>");
510  validate();
511  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::string const &  code 
)

Definition at line 516 of file Entry.cc.

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

516  :
517  name_(name), rep(), type('?'), tracked('?') {
518  if(!fromString(code.begin(), code.end()))
519  throwEncodeError("coded string");
520  validate();
521  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
void throwEncodeError(char const *type) const
Definition: Entry.cc:1074
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:615
char tracked
Definition: Entry.h:187
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::string const &  value,
bool  is_tracked 
)

Definition at line 524 of file Entry.cc.

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

525  :
526  name_(name), rep(), type('?'), tracked('?') {
527  std::string codedString(is_tracked ?"-":"+");
528 
529  Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type);
530  if(itFound == sTypeTranslations.type2Code_.end()) {
532  << "bad type name used for Entry : " << type;
533  }
534 
535  codedString += itFound->second;
536  codedString +='(';
537  codedString += value;
538  codedString +=')';
539 
540  if(!fromString(codedString.begin(), codedString.end())) {
542  << "bad encoded Entry string " << codedString;
543  }
544  validate();
545  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:615
char tracked
Definition: Entry.h:187
std::map< std::string, char > type2Code_
Definition: Entry.cc:35
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:78
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::vector< std::string > const &  value,
bool  is_tracked 
)

Definition at line 547 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().

549  :
550  name_(name), rep() , type('?'), tracked('?') {
551  std::string codedString(is_tracked ?"-":"+");
552 
553  Type2Code::const_iterator itFound =
555  if(itFound == sTypeTranslations.type2Code_.end()) {
557  << "bad type name used for Entry : " << type;
558  }
559 
560  codedString += itFound->second;
561  codedString += '(';
562  codedString += '{';
563  std::vector<std::string>::const_iterator i = value.begin();
564  std::vector<std::string>::const_iterator e = value.end();
565  std::string const kSeparator(",");
566  std::string sep("");
567  for(; i!= e; ++i) {
568  codedString += sep;
569  codedString += *i;
570  sep = kSeparator;
571  }
572  codedString += '}';
573  codedString += ')';
574 
575  if(!fromString(codedString.begin(), codedString.end())) {
577  << "bad encoded Entry string " << codedString;
578  }
579  validate();
580  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
Definition: value.py:1
void validate() const
Definition: Entry.cc:86
std::string name_
Definition: Entry.h:184
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:615
char tracked
Definition: Entry.h:187
std::map< std::string, char > type2Code_
Definition: Entry.cc:35
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:78
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 615 of file Entry.cc.

References rep, AlCaHLTBitMon_QueryRunRegistry::string, and tracked.

Referenced by Entry().

615  {
616  if(static_cast<unsigned int>(e - b) < 4u || b[2] != '(' || e[-1] != ')')
617 
618  return false;
619 
620  tracked = b[0];
621  type = b[1];
622  rep = std::string(b+3, e-1);
623 
624  return true;
625  } // from_string()
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
char tracked
Definition: Entry.h:187
double b
Definition: hdecay.h:120
bool Entry::getBool ( ) const

Definition at line 636 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().

636  {
637  if (type != 'B') throwValueError("bool");
638  bool val;
639  if (!decode(val, rep)) throwEntryError("bool", rep);
640  return val;
641  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
double Entry::getDouble ( ) const

Definition at line 740 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().

740  {
741  if(type != 'D') throwValueError("double");
742  double val;
743  if(!decode(val, rep)) throwEntryError("double", rep);
744  return val;
745  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
ESInputTag Entry::getESInputTag ( ) const

Definition at line 820 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().

820  {
821  if(type != kTESInputTag) throwValueError("ESInputTag");
822  ESInputTag val;
823  if(!decode(val, rep)) throwEntryError("ESInputTag", rep);
824  return val;
825  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
EventID Entry::getEventID ( ) const

Definition at line 843 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().

843  {
844  if(type != 'E') throwValueError("EventID");
845  EventID val;
846  if(!decode(val, rep)) throwEntryError("EventID", rep);
847  return val;
848  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
EventRange Entry::getEventRange ( ) const

Definition at line 909 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().

909  {
910  if(type != 'R') throwValueError("EventRange");
911  EventRange val;
912  if(!decode(val, rep)) throwEntryError("EventRange", rep);
913  return val;
914  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
FileInPath Entry::getFileInPath ( ) const

Definition at line 785 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().

785  {
786  if(type != 'F') throwValueError("FileInPath");
787  FileInPath val;
788  if(!decode(val, rep)) throwEntryError("FileInPath", rep);
789  return val;
790  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
InputTag Entry::getInputTag ( ) const

Definition at line 796 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().

796  {
797  if(type != 't') throwValueError("InputTag");
798  InputTag val;
799  if(!decode(val, rep)) throwEntryError("InputTag", rep);
800  return val;
801  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
int Entry::getInt32 ( ) const

Definition at line 648 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<<().

648  {
649  if(type != 'I') throwValueError("int");
650  int val;
651  if(!decode(val, rep)) throwEntryError("int", rep);
652  return val;
653  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
long long Entry::getInt64 ( ) const

Definition at line 671 of file Entry.cc.

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

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

671  {
672  if(type != 'L') throwValueError("int64");
673  long long val;
674  if(!decode(val, rep)) throwEntryError("int64", rep);
675  return val;
676  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
LuminosityBlockID Entry::getLuminosityBlockID ( ) const

Definition at line 866 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().

866  {
867  if(type != 'M') throwValueError("LuminosityBlockID");
868  LuminosityBlockID val;
869  if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep);
870  return val;
871  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
LuminosityBlockRange Entry::getLuminosityBlockRange ( ) const

Definition at line 887 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().

887  {
888  if(type != 'A') throwValueError("LuminosityBlockRange");
890  if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep);
891  return val;
892  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
ParameterSet Entry::getPSet ( ) const

Definition at line 932 of file Entry.cc.

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

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

932  {
933  if(type != 'P') throwValueError("ParameterSet");
935  if(!decode(val, rep)) throwEntryError("ParameterSet", rep);
936  return val;
937  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::string Entry::getString ( void  ) const
unsigned Entry::getUInt32 ( ) const

Definition at line 695 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<<().

695  {
696  if(type != 'U') throwValueError("unsigned int");
697  unsigned val;
698  if(!decode(val, rep)) throwEntryError("unsigned int", rep);
699  return val;
700  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
unsigned long long Entry::getUInt64 ( ) const

Definition at line 718 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().

718  {
719  if(type != 'X') throwValueError("uint64");
720  unsigned long long val;
721  if(!decode(val, rep)) throwEntryError("uint64", rep);
722  return val;
723  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< double > Entry::getVDouble ( ) const

Definition at line 751 of file Entry.cc.

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

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

751  {
752  if(type != 'd') throwValueError("vector<double>");
753  std::vector<double> val;
754  if(!decode(val, rep)) throwEntryError("vector<double>", rep);
755  return val;
756  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< ESInputTag > Entry::getVESInputTag ( ) const

Definition at line 832 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 > >().

832  {
833  if(type != kTVESInputTag) throwValueError("VESInputTag");
834  std::vector<ESInputTag> val;
835  if(!decode(val, rep)) throwEntryError("VESInputTag", rep);
836  return val;
837  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< EventID > Entry::getVEventID ( ) const

Definition at line 854 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 > >().

854  {
855  if(type != 'e') throwValueError("VEventID");
856  std::vector<EventID> val;
857  if(!decode(val, rep)) throwEntryError("EventID", rep);
858  return val;
859  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< EventRange > Entry::getVEventRange ( ) const

Definition at line 920 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 > >().

920  {
921  if(type != 'r') throwValueError("VEventRange");
922  std::vector<EventRange> val;
923  if(!decode(val, rep)) throwEntryError("EventRange", rep);
924  return val;
925  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< InputTag > Entry::getVInputTag ( ) const

Definition at line 808 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 > >().

808  {
809  if(type != 'v') throwValueError("VInputTag");
810  std::vector<InputTag> val;
811  if(!decode(val, rep)) throwEntryError("VInputTag", rep);
812  return val;
813  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< int > Entry::getVInt32 ( ) const

Definition at line 659 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 > >().

659  {
660  if(type != 'i') throwValueError("vector<int>");
661  std::vector<int> val;
662  if(!decode(val, rep)) throwEntryError("vector<int>", rep);
663  return val;
664  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< long long > Entry::getVInt64 ( ) const

Definition at line 682 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 > >().

682  {
683  if(type != 'l') throwValueError("vector<int64>");
684  std::vector<long long> val;
685  if(!decode(val, rep)) throwEntryError("vector<int64>", rep);
686  return val;
687  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID ( ) const

Definition at line 877 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 > >().

877  {
878  if(type != 'm') throwValueError("VLuminosityBlockID");
879  std::vector<LuminosityBlockID> val;
880  if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep);
881  return val;
882  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange ( ) const

Definition at line 898 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 > >().

898  {
899  if(type != 'a') throwValueError("VLuminosityBlockRange");
900  std::vector<LuminosityBlockRange> val;
901  if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep);
902  return val;
903  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< ParameterSet > Entry::getVPSet ( ) const

Definition at line 943 of file Entry.cc.

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

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

943  {
944  if(type != 'p') throwValueError("vector<ParameterSet>");
945  std::vector<ParameterSet> val;
946  if(!decode(val, rep)) throwEntryError("vector<ParameterSet>", rep);
947  return val;
948  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< std::string > Entry::getVString ( ) const

Definition at line 773 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 > >().

773  {
774  if(type != 's') throwValueError("vector<string>");
775  std::vector<std::string> val;
776  if(!decode(val, rep)) throwEntryError("vector<string>", rep);
777  return val;
778  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< unsigned > Entry::getVUInt32 ( ) const

Definition at line 706 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 > >().

706  {
707  if(type != 'u') throwValueError("vector<unsigned int>");
708  std::vector<unsigned> val;
709  if(!decode(val, rep)) throwEntryError("vector<unsigned int>", rep);
710  return val;
711  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< unsigned long long > Entry::getVUInt64 ( ) const

Definition at line 729 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 > >().

729  {
730  if(type != 'x') throwValueError("vector<uint64>");
731  std::vector<unsigned long long> val;
732  if(!decode(val, rep)) throwEntryError("vector<uint64>", rep);
733  return val;
734  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1060
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1066
bool decode(bool &, std::string const &)
Definition: types.cc:62
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 174 of file Entry.h.

References cuy::rep.

Referenced by toString().

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

Definition at line 1074 of file Entry.cc.

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

Referenced by Entry().

1074  {
1075  throw Exception(errors::Configuration, "EncodingError")
1076  << "can not encode " << name_ << " as type: " << type;
1077  }
char type
Definition: Entry.h:186
std::string name_
Definition: Entry.h:184
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 597 of file Entry.cc.

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

597  {
598  digest.append(&tracked, 1);
599  digest.append(&type, 1);
600  digest.append("(", 1);
601  digest.append(rep);
602  digest.append(")", 1);
603  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:185
char tracked
Definition: Entry.h:187
void append(std::string const &s)
Definition: Digest.cc:182
std::string Entry::toString ( ) const
void Entry::toString ( std::string &  result) const

Definition at line 587 of file Entry.cc.

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

587  {
588  result.reserve(result.size() + sizeOfString());
589  result += tracked;
590  result += type;
591  result += '(';
592  result += rep;
593  result += ')';
594  }
std::string rep
Definition: Entry.h:185
char type
Definition: Entry.h:186
size_t sizeOfString() const
Definition: Entry.h:174
char tracked
Definition: Entry.h:187
char edm::Entry::typeCode ( ) const
inline
void Entry::validate ( ) const
private

Definition at line 86 of file Entry.cc.

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

Referenced by Entry().

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

Friends And Related Function Documentation

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

Definition at line 952 of file Entry.cc.

952  {
953  os << sTypeTranslations.table_[entry.typeCode()] << " "
954  << (entry.isTracked() ? "tracked " : "untracked ") <<" = ";
955 
956  // now handle the difficult cases
957  switch(entry.typeCode()) {
958  case 'P': // ParameterSet
959  {
960  os << entry.getPSet();
961  break;
962  }
963  case 'p': // vector<ParameterSet>
964  {
965  // Make sure we get the representation of each contained
966  // ParameterSet including *only* tracked parameters
967  std::vector<ParameterSet> whole = entry.getVPSet();
968  std::vector<ParameterSet>::const_iterator i = whole.begin();
969  std::vector<ParameterSet>::const_iterator e = whole.end();
970  std::string start ="";
971  std::string const between(",\n");
972  os << "{"<<std::endl;
973  for (; i != e; ++i) {
974  os << start<< *i;
975  start = between;
976  }
977  if (!whole.empty()) {
978  os << std::endl;
979  }
980  os << "}";
981  break;
982  }
983  case 'S':
984  {
985  os << "'" << entry.getString() << "'";
986  break;
987  }
988  case 's':
989  {
990 
991  os << "{";
992  std::string start ="'";
993  std::string const between(",'");
994  std::vector<std::string> strings = entry.getVString();
995  for(std::vector<std::string>::const_iterator it = strings.begin(), itEnd = strings.end();
996  it != itEnd;
997  ++it) {
998  os << start << *it << "'";
999  start = between;
1000  }
1001  os << "}";
1002  break;
1003  }
1004  case 'I':
1005  {
1006  os << entry.getInt32();
1007  break;
1008  }
1009  case 'U':
1010  {
1011  os << entry.getUInt32();
1012  break;
1013  }
1014  case 'v':
1015  {
1016  //VInputTag needs to be treated seperately because it is encode like
1017  // vector<string> rather than using the individual encodings of each InputTag
1018  os << "{";
1019  std::string start = "";
1020  std::string const between(",");
1021  std::vector<InputTag> tags = entry.getVInputTag();
1022  for(std::vector<InputTag>::const_iterator it = tags.begin(), itEnd = tags.end();
1023  it != itEnd;
1024  ++it) {
1025  os << start << it->encode();
1026  start = between;
1027  }
1028  os << "}";
1029  break;
1030  }
1031  case kTVESInputTag:
1032  {
1033  //VESInputTag needs to be treated seperately because it is encode like
1034  // vector<string> rather than using the individual encodings of each ESInputTag
1035  os << "{";
1036  std::string start = "";
1037  std::string const between(",");
1038  std::vector<ESInputTag> tags = entry.getVESInputTag();
1039  for(std::vector<ESInputTag>::const_iterator it = tags.begin(), itEnd = tags.end();
1040  it != itEnd;
1041  ++it) {
1042  os << start << it->encode();
1043  start = between;
1044  }
1045  os << "}";
1046  break;
1047  }
1048  default:
1049  {
1050  os << entry.rep;
1051  break;
1052  }
1053  }
1054 
1055  return os;
1056  }
Definition: start.py:1
CodeMap table_
Definition: Entry.cc:34
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:78

Member Data Documentation

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

Definition at line 184 of file Entry.h.

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

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

Definition at line 187 of file Entry.h.

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

char edm::Entry::type
private