CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
edm::Entry Class Reference

#include <Entry.h>

Public Member Functions

 Entry (std::string const &name, bool val, bool is_tracked)
 
 Entry (std::string const &name, int val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< int > const &val, bool is_tracked)
 
 Entry (std::string const &name, unsigned val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< unsigned > const &val, bool is_tracked)
 
 Entry (std::string const &name, long long val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< long long > const &val, bool is_tracked)
 
 Entry (std::string const &name, unsigned long long val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< unsigned long long > const &val, bool is_tracked)
 
 Entry (std::string const &name, double val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< double > const &val, bool is_tracked)
 
 Entry (std::string const &name, std::string const &val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< std::string > const &val, bool is_tracked)
 
 Entry (std::string const &name, FileInPath const &val, bool is_tracked)
 
 Entry (std::string const &name, InputTag const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< InputTag > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, ESInputTag const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< ESInputTag > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, EventID const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< EventID > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, LuminosityBlockID const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< LuminosityBlockID > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, LuminosityBlockRange const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< LuminosityBlockRange > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, EventRange const &tag, bool is_tracked)
 
 Entry (std::string const &name, std::vector< EventRange > const &vtag, bool is_tracked)
 
 Entry (std::string const &name, ParameterSet const &val, bool is_tracked)
 
 Entry (std::string const &name, std::vector< ParameterSet > const &val, bool is_tracked)
 
 Entry (std::string const &name, std::string const &)
 
 Entry (std::string const &name, std::string const &type, std::string const &value, bool is_tracked)
 
 Entry (std::string const &name, std::string const &type, std::vector< std::string > const &value, bool is_tracked)
 
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
 
size_t sizeOfString () const
 
std::string toString () const
 
void toString (std::string &result) const
 
char typeCode () const
 
 ~Entry ()
 

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

Constructor & Destructor Documentation

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

Definition at line 256 of file Entry.cc.

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

256  :
257  name_(name), rep(), type('B'), tracked(is_tracked ? '+' : '-') {
258  if(!encode(rep, val)) throwEncodeError("bool");
259  validate();
260  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
int  val,
bool  is_tracked 
)

Definition at line 265 of file Entry.cc.

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

265  :
266  name_(name), rep(), type('I'), tracked(is_tracked ? '+' : '-') {
267  if(!encode(rep, val)) throwEncodeError("int");
268  validate();
269  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< int > const &  val,
bool  is_tracked 
)

Definition at line 274 of file Entry.cc.

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

274  :
275  name_(name), rep(), type('i'), tracked(is_tracked ? '+' : '-') {
276  if(!encode(rep, val)) throwEncodeError("vector<int>");
277  validate();
278  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
unsigned  val,
bool  is_tracked 
)

Definition at line 283 of file Entry.cc.

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

283  :
284  name_(name), rep(), type('U'), tracked(is_tracked ? '+' : '-') {
285  if(!encode(rep, val)) throwEncodeError("unsigned int");
286  validate();
287  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< unsigned > const &  val,
bool  is_tracked 
)

Definition at line 292 of file Entry.cc.

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

292  :
293  name_(name), rep(), type('u'), tracked(is_tracked ? '+' : '-') {
294  if(!encode(rep, val)) throwEncodeError("vector<unsigned int>");
295  validate();
296  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
long long  val,
bool  is_tracked 
)

Definition at line 301 of file Entry.cc.

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

301  :
302  name_(name), rep(), type('L'), tracked(is_tracked ? '+' : '-') {
303  if(!encode(rep, val)) throwEncodeError("int64");
304  validate();
305  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< long long > const &  val,
bool  is_tracked 
)

Definition at line 310 of file Entry.cc.

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

310  :
311  name_(name), rep(), type('l'), tracked(is_tracked ? '+' : '-') {
312  if(!encode(rep, val)) throwEncodeError("vector<int64>");
313  validate();
314  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
unsigned long long  val,
bool  is_tracked 
)

Definition at line 319 of file Entry.cc.

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

319  :
320  name_(name), rep(), type('X'), tracked(is_tracked ? '+' : '-') {
321  if(!encode(rep, val)) throwEncodeError("unsigned int64");
322  validate();
323  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< unsigned long long > const &  val,
bool  is_tracked 
)

Definition at line 328 of file Entry.cc.

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

328  :
329  name_(name), rep(), type('x'), tracked(is_tracked ? '+' : '-') {
330  if(!encode(rep, val)) throwEncodeError("vector<unsigned int64>");
331  validate();
332  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
double  val,
bool  is_tracked 
)

Definition at line 337 of file Entry.cc.

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

337  :
338  name_(name), rep(), type('D'), tracked(is_tracked ? '+' : '-') {
339  if(!encode(rep, val)) throwEncodeError("double");
340  validate();
341  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< double > const &  val,
bool  is_tracked 
)

Definition at line 346 of file Entry.cc.

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

346  :
347  name_(name), rep(), type('d'), tracked(is_tracked ? '+' : '-') {
348  if(!encode(rep, val)) throwEncodeError("vector<double>");
349  validate();
350  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::string const &  val,
bool  is_tracked 
)

Definition at line 355 of file Entry.cc.

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

355  :
356  name_(name), rep(), type('S'), tracked(is_tracked ? '+' : '-') {
357  if(!encode(rep, val)) throwEncodeError("string");
358  validate();
359  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< std::string > const &  val,
bool  is_tracked 
)

Definition at line 364 of file Entry.cc.

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

364  :
365  name_(name), rep(), type('s'), tracked(is_tracked ? '+' : '-') {
366  if(!encode(rep, val)) throwEncodeError("vector<string>");
367  validate();
368  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
FileInPath const &  val,
bool  is_tracked 
)

Definition at line 373 of file Entry.cc.

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

373  :
374  name_(name), rep(), type('F'), tracked(is_tracked ? '+' : '-') {
375  if (!encode(rep, val)) throwEncodeError("FileInPath");
376  validate();
377  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
InputTag const &  tag,
bool  is_tracked 
)

Definition at line 382 of file Entry.cc.

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

382  :
383  name_(name), rep(), type('t'), tracked(is_tracked ? '+' : '-') {
384  if (!encode(rep, val)) throwEncodeError("InputTag");
385  validate();
386  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< InputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 392 of file Entry.cc.

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

392  :
393  name_(name), rep(), type('v'), tracked(is_tracked ? '+' : '-') {
394  if (!encode(rep, val)) throwEncodeError("VInputTag");
395  validate();
396  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
ESInputTag const &  tag,
bool  is_tracked 
)

Definition at line 402 of file Entry.cc.

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

402  :
403  name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') {
404  if (!encode(rep, val)) throwEncodeError("InputTag");
405  validate();
406  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< ESInputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 411 of file Entry.cc.

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

411  :
412  name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') {
413  if (!encode(rep, val)) throwEncodeError("VESInputTag");
414  validate();
415  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
EventID const &  tag,
bool  is_tracked 
)

Definition at line 421 of file Entry.cc.

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

421  :
422  name_(name), rep(), type('E'), tracked(is_tracked ? '+' : '-') {
423  if (!encode(rep, val)) throwEncodeError("EventID");
424  validate();
425  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< EventID > const &  vtag,
bool  is_tracked 
)

Definition at line 431 of file Entry.cc.

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

431  :
432  name_(name), rep(), type('e'), tracked(is_tracked ? '+' : '-') {
433  if (!encode(rep, val)) throwEncodeError("VEventID");
434  validate();
435  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
LuminosityBlockID const &  tag,
bool  is_tracked 
)

Definition at line 442 of file Entry.cc.

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

442  :
443  name_(name), rep(), type('M'), tracked(is_tracked ? '+' : '-') {
444  if (!encode(rep, val)) throwEncodeError("LuminosityBlockID");
445  validate();
446  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockID > const &  vtag,
bool  is_tracked 
)

Definition at line 452 of file Entry.cc.

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

452  :
453  name_(name), rep(), type('m'), tracked(is_tracked ? '+' : '-') {
454  if (!encode(rep, val)) throwEncodeError("VLuminosityBlockID");
455  validate();
456  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
LuminosityBlockRange const &  tag,
bool  is_tracked 
)

Definition at line 461 of file Entry.cc.

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

461  :
462  name_(name), rep(), type('A'), tracked(is_tracked ? '+' : '-') {
463  if (!encode(rep, val)) throwEncodeError("LuminosityBlockRange");
464  validate();
465  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockRange > const &  vtag,
bool  is_tracked 
)

Definition at line 471 of file Entry.cc.

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

471  :
472  name_(name), rep(), type('a'), tracked(is_tracked ? '+' : '-') {
473  if (!encode(rep, val)) throwEncodeError("VLuminosityBlockRange");
474  validate();
475  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
EventRange const &  tag,
bool  is_tracked 
)

Definition at line 480 of file Entry.cc.

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

480  :
481  name_(name), rep(), type('R'), tracked(is_tracked ? '+' : '-') {
482  if (!encode(rep, val)) throwEncodeError("EventRange");
483  validate();
484  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< EventRange > const &  vtag,
bool  is_tracked 
)

Definition at line 489 of file Entry.cc.

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

489  :
490  name_(name), rep(), type('r'), tracked(is_tracked ? '+' : '-') {
491  if (!encode(rep, val)) throwEncodeError("VEventRange");
492  validate();
493  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
ParameterSet const &  val,
bool  is_tracked 
)

Definition at line 499 of file Entry.cc.

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

499  :
500  name_(name), rep(), type('P'), tracked(is_tracked ? '+' : '-') {
501  if(!encode(rep, val)) throwEncodeError("ParameterSet");
502  validate();
503  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::vector< ParameterSet > const &  val,
bool  is_tracked 
)

Definition at line 508 of file Entry.cc.

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

508  :
509  name_(name), rep(), type('p'), tracked(is_tracked ? '+' : '-') {
510  if(!encode(rep, val)) throwEncodeError("vector<ParameterSet>");
511  validate();
512  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
bool encode(std::string &, bool)
Definition: types.cc:76
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::string const &  code 
)

Definition at line 517 of file Entry.cc.

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

517  :
518  name_(name), rep(), type('?'), tracked('?') {
519  if(!fromString(code.begin(), code.end()))
520  throwEncodeError("coded string");
521  validate();
522  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
void throwEncodeError(char const *type) const
Definition: Entry.cc:1066
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:607
char tracked
Definition: Entry.h:178
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::string const &  value,
bool  is_tracked 
)

Definition at line 525 of file Entry.cc.

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

526  :
527  name_(name), rep(), type('?'), tracked('?') {
528  std::string codedString(is_tracked ?"-":"+");
529 
530  Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type);
531  if(itFound == sTypeTranslations.type2Code_.end()) {
533  << "bad type name used for Entry : " << type;
534  }
535 
536  codedString += itFound->second;
537  codedString +='(';
538  codedString += value;
539  codedString +=')';
540 
541  if(!fromString(codedString.begin(), codedString.end())) {
543  << "bad encoded Entry string " << codedString;
544  }
545  validate();
546  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:607
char tracked
Definition: Entry.h:178
std::map< std::string, char > type2Code_
Definition: Entry.cc:34
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:77
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::vector< std::string > const &  value,
bool  is_tracked 
)

Definition at line 548 of file Entry.cc.

References edm::errors::Configuration, ExpressReco_HICollisions_FallBack::e, edm::hlt::Exception, fromString(), i, edm::sTypeTranslations, type, edm::pset::TypeTrans::type2Code_, and validate().

550  :
551  name_(name), rep() , type('?'), tracked('?') {
552  std::string codedString(is_tracked ?"-":"+");
553 
554  Type2Code::const_iterator itFound =
556  if(itFound == sTypeTranslations.type2Code_.end()) {
558  << "bad type name used for Entry : " << type;
559  }
560 
561  codedString += itFound->second;
562  codedString += '(';
563  codedString += '{';
564  std::vector<std::string>::const_iterator i = value.begin();
565  std::vector<std::string>::const_iterator e = value.end();
566  std::string const kSeparator(",");
567  std::string sep("");
568  for(; i!= e; ++i) {
569  codedString += sep;
570  codedString += *i;
571  sep = kSeparator;
572  }
573  codedString += '}';
574  codedString += ')';
575 
576  if(!fromString(codedString.begin(), codedString.end())) {
578  << "bad encoded Entry string " << codedString;
579  }
580  validate();
581  }
type
Definition: HCALResponse.h:22
int i
Definition: DBlmapReader.cc:9
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
void validate() const
Definition: Entry.cc:87
std::string name_
Definition: Entry.h:175
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:607
char tracked
Definition: Entry.h:178
std::map< std::string, char > type2Code_
Definition: Entry.cc:34
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:77
Entry::~Entry ( )

Definition at line 80 of file Entry.cc.

80 {}

Member Function Documentation

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

Definition at line 607 of file Entry.cc.

References rep, and tracked.

Referenced by Entry().

607  {
608  if(static_cast<unsigned int>(e - b) < 4u || b[2] != '(' || e[-1] != ')')
609 
610  return false;
611 
612  tracked = b[0];
613  type = b[1];
614  rep = std::string(b+3, e-1);
615 
616  return true;
617  } // from_string()
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
char tracked
Definition: Entry.h:178
double b
Definition: hdecay.h:120
bool Entry::getBool ( ) const

Definition at line 628 of file Entry.cc.

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

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

628  {
629  if (type != 'B') throwValueError("bool");
630  bool val;
631  if (!decode(val, rep)) throwEntryError("bool", rep);
632  return val;
633  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
double Entry::getDouble ( ) const

Definition at line 732 of file Entry.cc.

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

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

732  {
733  if(type != 'D') throwValueError("double");
734  double val;
735  if(!decode(val, rep)) throwEntryError("double", rep);
736  return val;
737  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
ESInputTag Entry::getESInputTag ( ) const

Definition at line 812 of file Entry.cc.

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

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

812  {
813  if(type != kTESInputTag) throwValueError("ESInputTag");
814  ESInputTag val;
815  if(!decode(val, rep)) throwEntryError("ESInputTag", rep);
816  return val;
817  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
EventID Entry::getEventID ( ) const

Definition at line 835 of file Entry.cc.

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

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

835  {
836  if(type != 'E') throwValueError("EventID");
837  EventID val;
838  if(!decode(val, rep)) throwEntryError("EventID", rep);
839  return val;
840  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
EventRange Entry::getEventRange ( ) const

Definition at line 901 of file Entry.cc.

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

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

901  {
902  if(type != 'R') throwValueError("EventRange");
903  EventRange val;
904  if(!decode(val, rep)) throwEntryError("EventRange", rep);
905  return val;
906  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
FileInPath Entry::getFileInPath ( ) const

Definition at line 777 of file Entry.cc.

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

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

777  {
778  if(type != 'F') throwValueError("FileInPath");
779  FileInPath val;
780  if(!decode(val, rep)) throwEntryError("FileInPath", rep);
781  return val;
782  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
InputTag Entry::getInputTag ( ) const

Definition at line 788 of file Entry.cc.

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

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

788  {
789  if(type != 't') throwValueError("InputTag");
790  InputTag val;
791  if(!decode(val, rep)) throwEntryError("InputTag", rep);
792  return val;
793  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
int Entry::getInt32 ( ) const

Definition at line 640 of file Entry.cc.

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

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

640  {
641  if(type != 'I') throwValueError("int");
642  int val;
643  if(!decode(val, rep)) throwEntryError("int", rep);
644  return val;
645  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
long long Entry::getInt64 ( ) const

Definition at line 663 of file Entry.cc.

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

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

663  {
664  if(type != 'L') throwValueError("int64");
665  long long val;
666  if(!decode(val, rep)) throwEntryError("int64", rep);
667  return val;
668  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
LuminosityBlockID Entry::getLuminosityBlockID ( ) const

Definition at line 858 of file Entry.cc.

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

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

858  {
859  if(type != 'M') throwValueError("LuminosityBlockID");
860  LuminosityBlockID val;
861  if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep);
862  return val;
863  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
LuminosityBlockRange Entry::getLuminosityBlockRange ( ) const

Definition at line 879 of file Entry.cc.

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

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

879  {
880  if(type != 'A') throwValueError("LuminosityBlockRange");
882  if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep);
883  return val;
884  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
ParameterSet Entry::getPSet ( ) const

Definition at line 924 of file Entry.cc.

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

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

924  {
925  if(type != 'P') throwValueError("ParameterSet");
926  ParameterSet val;
927  if(!decode(val, rep)) throwEntryError("ParameterSet", rep);
928  return val;
929  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::string Entry::getString ( void  ) const

Definition at line 754 of file Entry.cc.

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

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

754  {
755  if(type != 'S') throwValueError("string");
756  std::string val;
757  if(!decode(val, rep)) throwEntryError("string", rep);
758  return val;
759  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
unsigned Entry::getUInt32 ( ) const

Definition at line 687 of file Entry.cc.

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

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

687  {
688  if(type != 'U') throwValueError("unsigned int");
689  unsigned val;
690  if(!decode(val, rep)) throwEntryError("unsigned int", rep);
691  return val;
692  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
unsigned long long Entry::getUInt64 ( ) const

Definition at line 710 of file Entry.cc.

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

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

710  {
711  if(type != 'X') throwValueError("uint64");
712  unsigned long long val;
713  if(!decode(val, rep)) throwEntryError("uint64", rep);
714  return val;
715  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< double > Entry::getVDouble ( ) const

Definition at line 743 of file Entry.cc.

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

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

743  {
744  if(type != 'd') throwValueError("vector<double>");
745  std::vector<double> val;
746  if(!decode(val, rep)) throwEntryError("vector<double>", rep);
747  return val;
748  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< ESInputTag > Entry::getVESInputTag ( ) const

Definition at line 824 of file Entry.cc.

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

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

824  {
825  if(type != kTVESInputTag) throwValueError("VESInputTag");
826  std::vector<ESInputTag> val;
827  if(!decode(val, rep)) throwEntryError("VESInputTag", rep);
828  return val;
829  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< EventID > Entry::getVEventID ( ) const

Definition at line 846 of file Entry.cc.

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

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

846  {
847  if(type != 'e') throwValueError("VEventID");
848  std::vector<EventID> val;
849  if(!decode(val, rep)) throwEntryError("EventID", rep);
850  return val;
851  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< EventRange > Entry::getVEventRange ( ) const

Definition at line 912 of file Entry.cc.

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

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

912  {
913  if(type != 'r') throwValueError("VEventRange");
914  std::vector<EventRange> val;
915  if(!decode(val, rep)) throwEntryError("EventRange", rep);
916  return val;
917  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< InputTag > Entry::getVInputTag ( ) const

Definition at line 800 of file Entry.cc.

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

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

800  {
801  if(type != 'v') throwValueError("VInputTag");
802  std::vector<InputTag> val;
803  if(!decode(val, rep)) throwEntryError("VInputTag", rep);
804  return val;
805  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< int > Entry::getVInt32 ( ) const

Definition at line 651 of file Entry.cc.

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

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

651  {
652  if(type != 'i') throwValueError("vector<int>");
653  std::vector<int> val;
654  if(!decode(val, rep)) throwEntryError("vector<int>", rep);
655  return val;
656  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< long long > Entry::getVInt64 ( ) const

Definition at line 674 of file Entry.cc.

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

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

674  {
675  if(type != 'l') throwValueError("vector<int64>");
676  std::vector<long long> val;
677  if(!decode(val, rep)) throwEntryError("vector<int64>", rep);
678  return val;
679  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID ( ) const

Definition at line 869 of file Entry.cc.

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

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

869  {
870  if(type != 'm') throwValueError("VLuminosityBlockID");
871  std::vector<LuminosityBlockID> val;
872  if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep);
873  return val;
874  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange ( ) const

Definition at line 890 of file Entry.cc.

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

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

890  {
891  if(type != 'a') throwValueError("VLuminosityBlockRange");
892  std::vector<LuminosityBlockRange> val;
893  if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep);
894  return val;
895  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< ParameterSet > Entry::getVPSet ( ) const

Definition at line 935 of file Entry.cc.

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

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

935  {
936  if(type != 'p') throwValueError("vector<ParameterSet>");
937  std::vector<ParameterSet> val;
938  if(!decode(val, rep)) throwEntryError("vector<ParameterSet>", rep);
939  return val;
940  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< std::string > Entry::getVString ( ) const

Definition at line 765 of file Entry.cc.

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

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

765  {
766  if(type != 's') throwValueError("vector<string>");
767  std::vector<std::string> val;
768  if(!decode(val, rep)) throwEntryError("vector<string>", rep);
769  return val;
770  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< unsigned > Entry::getVUInt32 ( ) const

Definition at line 698 of file Entry.cc.

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

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

698  {
699  if(type != 'u') throwValueError("vector<unsigned int>");
700  std::vector<unsigned> val;
701  if(!decode(val, rep)) throwEntryError("vector<unsigned int>", rep);
702  return val;
703  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
std::vector< unsigned long long > Entry::getVUInt64 ( ) const

Definition at line 721 of file Entry.cc.

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

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

721  {
722  if(type != 'x') throwValueError("vector<uint64>");
723  std::vector<unsigned long long> val;
724  if(!decode(val, rep)) throwEntryError("vector<uint64>", rep);
725  return val;
726  }
type
Definition: HCALResponse.h:22
std::string rep
Definition: Entry.h:176
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1052
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1058
bool decode(bool &, std::string const &)
Definition: types.cc:67
bool edm::Entry::isTracked ( ) const
inline
size_t edm::Entry::sizeOfString ( ) const
inline

Definition at line 165 of file Entry.h.

References rep.

Referenced by toString().

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

Definition at line 1066 of file Entry.cc.

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

Referenced by Entry().

1066  {
1067  throw Exception(errors::Configuration, "EncodingError")
1068  << "can not encode " << name_ << " as type: " << type;
1069  }
char type
Definition: Entry.h:177
std::string name_
Definition: Entry.h:175
void Entry::throwEntryError ( char const *  expectedType,
std::string const &  badRep 
) const
private
void Entry::throwValueError ( char const *  expectedType) const
private
std::string Entry::toString ( ) const

Definition at line 598 of file Entry.cc.

References query::result.

Referenced by edm::ParameterSet::getParameterAsString(), and edm::operator==().

598  {
599  std::string result;
600  toString(result);
601  return result;
602  }
tuple result
Definition: query.py:137
std::string toString() const
Definition: Entry.cc:598
void Entry::toString ( std::string &  result) const

Definition at line 588 of file Entry.cc.

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

588  {
589  result.reserve(result.size() + sizeOfString());
590  result += tracked;
591  result += type;
592  result += '(';
593  result += rep;
594  result += ')';
595  }
std::string rep
Definition: Entry.h:176
char type
Definition: Entry.h:177
size_t sizeOfString() const
Definition: Entry.h:165
tuple result
Definition: query.py:137
char tracked
Definition: Entry.h:178
char edm::Entry::typeCode ( ) const
inline
void Entry::validate ( ) const
private

Definition at line 87 of file Entry.cc.

References edm::decode(), kTESInputTag, kTVESInputTag, rep, throwEntryError(), and tracked.

Referenced by Entry(), and Config.Process::fillProcessDesc().

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

Friends And Related Function Documentation

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

Definition at line 944 of file Entry.cc.

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

Member Data Documentation

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

Definition at line 178 of file Entry.h.

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

char edm::Entry::type
private