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
 
void toDigest (cms::Digest &digest) 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 41 of file Entry.h.

Constructor & Destructor Documentation

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

Definition at line 257 of file Entry.cc.

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

257  :
258  name_(name), rep(), type('B'), tracked(is_tracked ? '+' : '-') {
259  if(!encode(rep, val)) throwEncodeError("bool");
260  validate();
261  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
int  val,
bool  is_tracked 
)

Definition at line 266 of file Entry.cc.

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

266  :
267  name_(name), rep(), type('I'), tracked(is_tracked ? '+' : '-') {
268  if(!encode(rep, val)) throwEncodeError("int");
269  validate();
270  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< int > const &  val,
bool  is_tracked 
)

Definition at line 275 of file Entry.cc.

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

275  :
276  name_(name), rep(), type('i'), tracked(is_tracked ? '+' : '-') {
277  if(!encode(rep, val)) throwEncodeError("vector<int>");
278  validate();
279  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
unsigned  val,
bool  is_tracked 
)

Definition at line 284 of file Entry.cc.

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

284  :
285  name_(name), rep(), type('U'), tracked(is_tracked ? '+' : '-') {
286  if(!encode(rep, val)) throwEncodeError("unsigned int");
287  validate();
288  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< unsigned > const &  val,
bool  is_tracked 
)

Definition at line 293 of file Entry.cc.

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

293  :
294  name_(name), rep(), type('u'), tracked(is_tracked ? '+' : '-') {
295  if(!encode(rep, val)) throwEncodeError("vector<unsigned int>");
296  validate();
297  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
long long  val,
bool  is_tracked 
)

Definition at line 302 of file Entry.cc.

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

302  :
303  name_(name), rep(), type('L'), tracked(is_tracked ? '+' : '-') {
304  if(!encode(rep, val)) throwEncodeError("int64");
305  validate();
306  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< long long > const &  val,
bool  is_tracked 
)

Definition at line 311 of file Entry.cc.

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

311  :
312  name_(name), rep(), type('l'), tracked(is_tracked ? '+' : '-') {
313  if(!encode(rep, val)) throwEncodeError("vector<int64>");
314  validate();
315  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
unsigned long long  val,
bool  is_tracked 
)

Definition at line 320 of file Entry.cc.

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

320  :
321  name_(name), rep(), type('X'), tracked(is_tracked ? '+' : '-') {
322  if(!encode(rep, val)) throwEncodeError("unsigned int64");
323  validate();
324  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< unsigned long long > const &  val,
bool  is_tracked 
)

Definition at line 329 of file Entry.cc.

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

329  :
330  name_(name), rep(), type('x'), tracked(is_tracked ? '+' : '-') {
331  if(!encode(rep, val)) throwEncodeError("vector<unsigned int64>");
332  validate();
333  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
double  val,
bool  is_tracked 
)

Definition at line 338 of file Entry.cc.

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

338  :
339  name_(name), rep(), type('D'), tracked(is_tracked ? '+' : '-') {
340  if(!encode(rep, val)) throwEncodeError("double");
341  validate();
342  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< double > const &  val,
bool  is_tracked 
)

Definition at line 347 of file Entry.cc.

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

347  :
348  name_(name), rep(), type('d'), tracked(is_tracked ? '+' : '-') {
349  if(!encode(rep, val)) throwEncodeError("vector<double>");
350  validate();
351  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::string const &  val,
bool  is_tracked 
)

Definition at line 356 of file Entry.cc.

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

356  :
357  name_(name), rep(), type('S'), tracked(is_tracked ? '+' : '-') {
358  if(!encode(rep, val)) throwEncodeError("string");
359  validate();
360  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< std::string > const &  val,
bool  is_tracked 
)

Definition at line 365 of file Entry.cc.

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

365  :
366  name_(name), rep(), type('s'), tracked(is_tracked ? '+' : '-') {
367  if(!encode(rep, val)) throwEncodeError("vector<string>");
368  validate();
369  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
FileInPath const &  val,
bool  is_tracked 
)

Definition at line 374 of file Entry.cc.

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

374  :
375  name_(name), rep(), type('F'), tracked(is_tracked ? '+' : '-') {
376  if (!encode(rep, val)) throwEncodeError("FileInPath");
377  validate();
378  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
InputTag const &  tag,
bool  is_tracked 
)

Definition at line 383 of file Entry.cc.

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

383  :
384  name_(name), rep(), type('t'), tracked(is_tracked ? '+' : '-') {
385  if (!encode(rep, val)) throwEncodeError("InputTag");
386  validate();
387  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< InputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 393 of file Entry.cc.

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

393  :
394  name_(name), rep(), type('v'), tracked(is_tracked ? '+' : '-') {
395  if (!encode(rep, val)) throwEncodeError("VInputTag");
396  validate();
397  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
ESInputTag const &  tag,
bool  is_tracked 
)

Definition at line 403 of file Entry.cc.

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

403  :
404  name_(name), rep(), type(kTESInputTag), tracked(is_tracked ? '+' : '-') {
405  if (!encode(rep, val)) throwEncodeError("InputTag");
406  validate();
407  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< ESInputTag > const &  vtag,
bool  is_tracked 
)

Definition at line 412 of file Entry.cc.

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

412  :
413  name_(name), rep(), type(kTVESInputTag), tracked(is_tracked ? '+' : '-') {
414  if (!encode(rep, val)) throwEncodeError("VESInputTag");
415  validate();
416  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
EventID const &  tag,
bool  is_tracked 
)

Definition at line 422 of file Entry.cc.

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

422  :
423  name_(name), rep(), type('E'), tracked(is_tracked ? '+' : '-') {
424  if (!encode(rep, val)) throwEncodeError("EventID");
425  validate();
426  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< EventID > const &  vtag,
bool  is_tracked 
)

Definition at line 432 of file Entry.cc.

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

432  :
433  name_(name), rep(), type('e'), tracked(is_tracked ? '+' : '-') {
434  if (!encode(rep, val)) throwEncodeError("VEventID");
435  validate();
436  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
LuminosityBlockID const &  tag,
bool  is_tracked 
)

Definition at line 443 of file Entry.cc.

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

443  :
444  name_(name), rep(), type('M'), tracked(is_tracked ? '+' : '-') {
445  if (!encode(rep, val)) throwEncodeError("LuminosityBlockID");
446  validate();
447  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockID > const &  vtag,
bool  is_tracked 
)

Definition at line 453 of file Entry.cc.

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

453  :
454  name_(name), rep(), type('m'), tracked(is_tracked ? '+' : '-') {
455  if (!encode(rep, val)) throwEncodeError("VLuminosityBlockID");
456  validate();
457  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
LuminosityBlockRange const &  tag,
bool  is_tracked 
)

Definition at line 462 of file Entry.cc.

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

462  :
463  name_(name), rep(), type('A'), tracked(is_tracked ? '+' : '-') {
464  if (!encode(rep, val)) throwEncodeError("LuminosityBlockRange");
465  validate();
466  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< LuminosityBlockRange > const &  vtag,
bool  is_tracked 
)

Definition at line 472 of file Entry.cc.

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

472  :
473  name_(name), rep(), type('a'), tracked(is_tracked ? '+' : '-') {
474  if (!encode(rep, val)) throwEncodeError("VLuminosityBlockRange");
475  validate();
476  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
EventRange const &  tag,
bool  is_tracked 
)

Definition at line 481 of file Entry.cc.

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

481  :
482  name_(name), rep(), type('R'), tracked(is_tracked ? '+' : '-') {
483  if (!encode(rep, val)) throwEncodeError("EventRange");
484  validate();
485  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< EventRange > const &  vtag,
bool  is_tracked 
)

Definition at line 490 of file Entry.cc.

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

490  :
491  name_(name), rep(), type('r'), tracked(is_tracked ? '+' : '-') {
492  if (!encode(rep, val)) throwEncodeError("VEventRange");
493  validate();
494  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
ParameterSet const &  val,
bool  is_tracked 
)

Definition at line 500 of file Entry.cc.

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

500  :
501  name_(name), rep(), type('P'), tracked(is_tracked ? '+' : '-') {
502  if(!encode(rep, val)) throwEncodeError("ParameterSet");
503  validate();
504  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::vector< ParameterSet > const &  val,
bool  is_tracked 
)

Definition at line 509 of file Entry.cc.

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

509  :
510  name_(name), rep(), type('p'), tracked(is_tracked ? '+' : '-') {
511  if(!encode(rep, val)) throwEncodeError("vector<ParameterSet>");
512  validate();
513  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
bool encode(std::string &, bool)
Definition: types.cc:71
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::string const &  code 
)

Definition at line 518 of file Entry.cc.

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

518  :
519  name_(name), rep(), type('?'), tracked('?') {
520  if(!fromString(code.begin(), code.end()))
521  throwEncodeError("coded string");
522  validate();
523  }
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
void throwEncodeError(char const *type) const
Definition: Entry.cc:1076
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:617
char tracked
Definition: Entry.h:183
Entry::Entry ( std::string const &  name,
std::string const &  type,
std::string const &  value,
bool  is_tracked 
)

Definition at line 526 of file Entry.cc.

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

527  :
528  name_(name), rep(), type('?'), tracked('?') {
529  std::string codedString(is_tracked ?"-":"+");
530 
531  Type2Code::const_iterator itFound = sTypeTranslations.type2Code_.find(type);
532  if(itFound == sTypeTranslations.type2Code_.end()) {
534  << "bad type name used for Entry : " << type;
535  }
536 
537  codedString += itFound->second;
538  codedString +='(';
539  codedString += value;
540  codedString +=')';
541 
542  if(!fromString(codedString.begin(), codedString.end())) {
544  << "bad encoded Entry string " << codedString;
545  }
546  validate();
547  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:617
char tracked
Definition: Entry.h:183
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 549 of file Entry.cc.

References edm::errors::Configuration, alignCSCRings::e, Exception, fromString(), i, cmsHarvester::sep, AlCaHLTBitMon_QueryRunRegistry::string, edm::sTypeTranslations, type, edm::pset::TypeTrans::type2Code_, and validate().

551  :
552  name_(name), rep() , type('?'), tracked('?') {
553  std::string codedString(is_tracked ?"-":"+");
554 
555  Type2Code::const_iterator itFound =
557  if(itFound == sTypeTranslations.type2Code_.end()) {
559  << "bad type name used for Entry : " << type;
560  }
561 
562  codedString += itFound->second;
563  codedString += '(';
564  codedString += '{';
565  std::vector<std::string>::const_iterator i = value.begin();
566  std::vector<std::string>::const_iterator e = value.end();
567  std::string const kSeparator(",");
568  std::string sep("");
569  for(; i!= e; ++i) {
570  codedString += sep;
571  codedString += *i;
572  sep = kSeparator;
573  }
574  codedString += '}';
575  codedString += ')';
576 
577  if(!fromString(codedString.begin(), codedString.end())) {
579  << "bad encoded Entry string " << codedString;
580  }
581  validate();
582  }
type
Definition: HCALResponse.h:21
int i
Definition: DBlmapReader.cc:9
std::string rep
Definition: Entry.h:181
char type
Definition: Entry.h:182
void validate() const
Definition: Entry.cc:88
std::string name_
Definition: Entry.h:180
bool fromString(std::string::const_iterator b, std::string::const_iterator e)
Definition: Entry.cc:617
char tracked
Definition: Entry.h:183
std::map< std::string, char > type2Code_
Definition: Entry.cc:35
static pset::TypeTrans const sTypeTranslations
Definition: Entry.cc:78
Entry::~Entry ( )

Definition at line 81 of file Entry.cc.

81 {}

Member Function Documentation

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

Definition at line 617 of file Entry.cc.

References rep, AlCaHLTBitMon_QueryRunRegistry::string, and tracked.

Referenced by Entry().

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

Definition at line 638 of file Entry.cc.

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

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

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

Definition at line 742 of file Entry.cc.

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

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

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

Definition at line 822 of file Entry.cc.

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

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

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

Definition at line 845 of file Entry.cc.

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

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

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

Definition at line 911 of file Entry.cc.

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

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

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

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

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

Definition at line 798 of file Entry.cc.

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

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

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

Definition at line 650 of file Entry.cc.

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

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

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

Definition at line 673 of file Entry.cc.

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

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

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

Definition at line 868 of file Entry.cc.

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

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

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

Definition at line 889 of file Entry.cc.

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

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

889  {
890  if(type != 'A') throwValueError("LuminosityBlockRange");
892  if(!decode(val, rep)) throwEntryError("LuminosityBlockRange", rep);
893  return val;
894  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1062
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1068
bool decode(bool &, std::string const &)
Definition: types.cc:62
ParameterSet Entry::getPSet ( ) const

Definition at line 934 of file Entry.cc.

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

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

934  {
935  if(type != 'P') throwValueError("ParameterSet");
936  ParameterSet val;
937  if(!decode(val, rep)) throwEntryError("ParameterSet", rep);
938  return val;
939  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1062
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1068
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::string Entry::getString ( void  ) const

Definition at line 764 of file Entry.cc.

References edm::decode(), rep, AlCaHLTBitMon_QueryRunRegistry::string, 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().

764  {
765  if(type != 'S') throwValueError("string");
766  std::string val;
767  if(!decode(val, rep)) throwEntryError("string", rep);
768  return val;
769  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1062
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1068
bool decode(bool &, std::string const &)
Definition: types.cc:62
unsigned Entry::getUInt32 ( ) const

Definition at line 697 of file Entry.cc.

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

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

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

Definition at line 720 of file Entry.cc.

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

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

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

Definition at line 753 of file Entry.cc.

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

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

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

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

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

Definition at line 856 of file Entry.cc.

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

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

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

Definition at line 922 of file Entry.cc.

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

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

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

Definition at line 810 of file Entry.cc.

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

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

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

Definition at line 661 of file Entry.cc.

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

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

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

Definition at line 684 of file Entry.cc.

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

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

684  {
685  if(type != 'l') throwValueError("vector<int64>");
686  std::vector<long long> val;
687  if(!decode(val, rep)) throwEntryError("vector<int64>", rep);
688  return val;
689  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1062
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1068
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< LuminosityBlockID > Entry::getVLuminosityBlockID ( ) 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 != 'm') throwValueError("VLuminosityBlockID");
881  std::vector<LuminosityBlockID> val;
882  if(!decode(val, rep)) throwEntryError("LuminosityBlockID", rep);
883  return val;
884  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1062
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1068
bool decode(bool &, std::string const &)
Definition: types.cc:62
std::vector< LuminosityBlockRange > Entry::getVLuminosityBlockRange ( ) const

Definition at line 900 of file Entry.cc.

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

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

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

Definition at line 945 of file Entry.cc.

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

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

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

Definition at line 775 of file Entry.cc.

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

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

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

Definition at line 708 of file Entry.cc.

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

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

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

Definition at line 731 of file Entry.cc.

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

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

731  {
732  if(type != 'x') throwValueError("vector<uint64>");
733  std::vector<unsigned long long> val;
734  if(!decode(val, rep)) throwEntryError("vector<uint64>", rep);
735  return val;
736  }
type
Definition: HCALResponse.h:21
std::string rep
Definition: Entry.h:181
void throwValueError(char const *expectedType) const
Definition: Entry.cc:1062
void throwEntryError(char const *expectedType, std::string const &badRep) const
Definition: Entry.cc:1068
bool decode(bool &, std::string const &)
Definition: types.cc:62
bool edm::Entry::isTracked ( ) const
inline
size_t edm::Entry::sizeOfString ( ) const
inline

Definition at line 170 of file Entry.h.

References rep.

Referenced by toString().

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

Definition at line 1076 of file Entry.cc.

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

Referenced by Entry().

1076  {
1077  throw Exception(errors::Configuration, "EncodingError")
1078  << "can not encode " << name_ << " as type: " << type;
1079  }
char type
Definition: Entry.h:182
std::string name_
Definition: Entry.h:180
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 599 of file Entry.cc.

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

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

Definition at line 608 of file Entry.cc.

References query::result, and AlCaHLTBitMon_QueryRunRegistry::string.

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

608  {
610  toString(result);
611  return result;
612  }
tuple result
Definition: query.py:137
std::string toString() const
Definition: Entry.cc:608
void Entry::toString ( std::string &  result) const

Definition at line 589 of file Entry.cc.

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

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

Definition at line 88 of file Entry.cc.

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

Referenced by Entry().

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

Friends And Related Function Documentation

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

Definition at line 954 of file Entry.cc.

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

Member Data Documentation

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

Definition at line 180 of file Entry.h.

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

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

Definition at line 183 of file Entry.h.

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

char edm::Entry::type
private