CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Enumerations | Functions
edm::writeParameterValue Namespace Reference

Enumerations

enum  ValueFormat { CFI, DOC }
 

Functions

void formatDouble (double value, std::string &result)
 
bool hasNestedContent (int const &value)
 
bool hasNestedContent (std::vector< int > const &value)
 
bool hasNestedContent (unsigned const &value)
 
bool hasNestedContent (std::vector< unsigned > const &value)
 
bool hasNestedContent (long long const &value)
 
bool hasNestedContent (std::vector< long long > const &value)
 
bool hasNestedContent (unsigned long long const &value)
 
bool hasNestedContent (std::vector< unsigned long long > const &value)
 
bool hasNestedContent (double const &value)
 
bool hasNestedContent (std::vector< double > const &value)
 
bool hasNestedContent (bool const &value)
 
bool hasNestedContent (std::string const &value)
 
bool hasNestedContent (std::vector< std::string > const &value)
 
bool hasNestedContent (EventID const &value)
 
bool hasNestedContent (std::vector< EventID > const &value)
 
bool hasNestedContent (LuminosityBlockID const &value)
 
bool hasNestedContent (std::vector< LuminosityBlockID > const &value)
 
bool hasNestedContent (LuminosityBlockRange const &value)
 
bool hasNestedContent (std::vector< LuminosityBlockRange > const &value)
 
bool hasNestedContent (EventRange const &value)
 
bool hasNestedContent (std::vector< EventRange > const &value)
 
bool hasNestedContent (InputTag const &value)
 
bool hasNestedContent (std::vector< InputTag > const &value)
 
bool hasNestedContent (ESInputTag const &value)
 
bool hasNestedContent (std::vector< ESInputTag > const &value)
 
bool hasNestedContent (FileInPath const &value)
 
template<typename T >
void writeSingleValue (std::ostream &os, T const &value, ValueFormat)
 
template<>
void writeSingleValue< bool > (std::ostream &os, bool const &value, ValueFormat)
 
template<>
void writeSingleValue< double > (std::ostream &os, double const &value, ValueFormat)
 
template<>
void writeSingleValue< ESInputTag > (std::ostream &os, ESInputTag const &value, ValueFormat format)
 
template<>
void writeSingleValue< EventID > (std::ostream &os, EventID const &value, ValueFormat format)
 
template<>
void writeSingleValue< EventRange > (std::ostream &os, EventRange const &value, ValueFormat format)
 
template<>
void writeSingleValue< FileInPath > (std::ostream &os, FileInPath const &value, ValueFormat)
 
template<>
void writeSingleValue< InputTag > (std::ostream &os, InputTag const &value, ValueFormat format)
 
template<>
void writeSingleValue< LuminosityBlockID > (std::ostream &os, LuminosityBlockID const &value, ValueFormat format)
 
template<>
void writeSingleValue< LuminosityBlockRange > (std::ostream &os, LuminosityBlockRange const &value, ValueFormat format)
 
template<>
void writeSingleValue< std::string > (std::ostream &os, std::string const &value, ValueFormat)
 
void writeValue (std::ostream &os, int indentation, int const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< int > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, unsigned const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< unsigned > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, long long const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< long long > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, unsigned long long const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< unsigned long long > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, double const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< double > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, bool const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::string const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< std::string > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, EventID const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< EventID > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, LuminosityBlockID const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< LuminosityBlockID > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, LuminosityBlockRange const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< LuminosityBlockRange > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, EventRange const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< EventRange > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, InputTag const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< InputTag > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, ESInputTag const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, std::vector< ESInputTag > const &value_, ValueFormat format)
 
void writeValue (std::ostream &os, int indentation, FileInPath const &value_, ValueFormat format)
 
template<typename T >
void writeValue (std::ostream &os, T const &value_, ValueFormat format)
 
template<typename T >
void writeValueInVector (std::ostream &os, T const &value, ValueFormat format)
 
template<>
void writeValueInVector< ESInputTag > (std::ostream &os, ESInputTag const &value, ValueFormat)
 
template<>
void writeValueInVector< EventID > (std::ostream &os, EventID const &value, ValueFormat format)
 
template<>
void writeValueInVector< InputTag > (std::ostream &os, InputTag const &value, ValueFormat)
 
template<>
void writeValueInVector< LuminosityBlockID > (std::ostream &os, LuminosityBlockID const &value, ValueFormat format)
 
template<typename T >
void writeValueInVectorWithSpace (T const &value, std::ostream &os, int indentation, bool &startWithComma, ValueFormat format, int &i)
 
template<typename T >
void writeVector (std::ostream &os, int indentation, std::vector< T > const &value_, ValueFormat format)
 

Enumeration Type Documentation

Function Documentation

void edm::writeParameterValue::formatDouble ( double  value,
std::string &  result 
)

Definition at line 414 of file ParameterDescription.cc.

References contentValuesCheck::ss, AlCaHLTBitMon_QueryRunRegistry::string, ctpps_dqm_sourceclient-live_cfg::test, and relativeConstraints::value.

Referenced by writeSingleValue< double >().

414  {
415  {
416  std::stringstream ss;
417  ss << std::setprecision(17) << value;
418  result = ss.str();
419  }
420  if (result.size() > 15 && std::string::npos != result.find('.')) {
421  std::stringstream ss;
422  ss << std::setprecision(15) << value;
423  std::string resultLessPrecision = ss.str();
424 
425  if (resultLessPrecision.size() < result.size() - 2) {
426  double test = std::strtod(resultLessPrecision.c_str(), nullptr);
427  if (test == value) {
428  result = resultLessPrecision;
429  }
430  }
431  }
432  }
tuple result
Definition: mps_fire.py:311
bool edm::writeParameterValue::hasNestedContent ( int const &  value)

Definition at line 752 of file ParameterDescription.cc.

Referenced by edm::ParameterDescription< std::vector< std::string > >::hasNestedContent_().

752 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< int > const &  value)

Definition at line 753 of file ParameterDescription.cc.

753 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( unsigned const &  value)

Definition at line 754 of file ParameterDescription.cc.

754 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< unsigned > const &  value)

Definition at line 755 of file ParameterDescription.cc.

755 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( long long const &  value)

Definition at line 756 of file ParameterDescription.cc.

756 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< long long > const &  value)

Definition at line 757 of file ParameterDescription.cc.

757 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( unsigned long long const &  value)

Definition at line 758 of file ParameterDescription.cc.

758 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< unsigned long long > const &  value)

Definition at line 759 of file ParameterDescription.cc.

759 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( double const &  value)

Definition at line 760 of file ParameterDescription.cc.

760 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< double > const &  value)

Definition at line 761 of file ParameterDescription.cc.

761 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( bool const &  value)

Definition at line 762 of file ParameterDescription.cc.

762 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::string const &  value)

Definition at line 763 of file ParameterDescription.cc.

763 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< std::string > const &  value)

Definition at line 764 of file ParameterDescription.cc.

764 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( EventID const &  value)

Definition at line 765 of file ParameterDescription.cc.

765 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< EventID > const &  value)

Definition at line 766 of file ParameterDescription.cc.

766 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( LuminosityBlockID const &  value)

Definition at line 767 of file ParameterDescription.cc.

767 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< LuminosityBlockID > const &  value)

Definition at line 768 of file ParameterDescription.cc.

768 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( LuminosityBlockRange const &  value)

Definition at line 769 of file ParameterDescription.cc.

769 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< LuminosityBlockRange > const &  value)

Definition at line 770 of file ParameterDescription.cc.

770 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( EventRange const &  value)

Definition at line 771 of file ParameterDescription.cc.

771 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< EventRange > const &  value)

Definition at line 772 of file ParameterDescription.cc.

772 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( InputTag const &  value)

Definition at line 773 of file ParameterDescription.cc.

773 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< InputTag > const &  value)

Definition at line 774 of file ParameterDescription.cc.

774 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( ESInputTag const &  value)

Definition at line 775 of file ParameterDescription.cc.

775 { return false; }
bool edm::writeParameterValue::hasNestedContent ( std::vector< ESInputTag > const &  value)

Definition at line 776 of file ParameterDescription.cc.

776 { return value.size() > 5U; }
bool edm::writeParameterValue::hasNestedContent ( FileInPath const &  value)

Definition at line 777 of file ParameterDescription.cc.

777 { return false; }
template<typename T >
void edm::writeParameterValue::writeSingleValue ( std::ostream &  os,
T const &  value,
ValueFormat   
)

Definition at line 391 of file ParameterDescription.cc.

References relativeConstraints::value.

391  {
392  os << value;
393  }
template<>
void edm::writeParameterValue::writeSingleValue< bool > ( std::ostream &  os,
bool const &  value,
ValueFormat   
)

Definition at line 442 of file ParameterDescription.cc.

References relativeConstraints::value.

442  {
443  value ? os << "True" : os << "False";
444  }
template<>
void edm::writeParameterValue::writeSingleValue< double > ( std::ostream &  os,
double const &  value,
ValueFormat   
)

Definition at line 435 of file ParameterDescription.cc.

References formatDouble(), AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

435  {
436  std::string sValue;
437  formatDouble(value, sValue);
438  os << sValue;
439  }
void formatDouble(double value, std::string &result)
template<>
void edm::writeParameterValue::writeSingleValue< ESInputTag > ( std::ostream &  os,
ESInputTag const &  value,
ValueFormat  format 
)

Definition at line 524 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

524  {
525  if (format == CFI) {
526  os << "'" << value.module() << "', '" << value.data() << "'";
527  } else {
528  os << "'" << value.module() << ":" << value.data() << "'";
529  }
530  }
template<>
void edm::writeParameterValue::writeSingleValue< EventID > ( std::ostream &  os,
EventID const &  value,
ValueFormat  format 
)

Definition at line 452 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

452  {
453  if (format == CFI) {
454  os << value.run() << ", " << value.luminosityBlock() << ", " << value.event();
455  } else {
456  if (value.luminosityBlock() == 0U) {
457  os << value.run() << ":" << value.event();
458  } else {
459  os << value.run() << ":" << value.luminosityBlock() << ":" << value.event();
460  }
461  }
462  }
template<>
void edm::writeParameterValue::writeSingleValue< EventRange > ( std::ostream &  os,
EventRange const &  value,
ValueFormat  format 
)

Definition at line 473 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

473  {
474  if (value.startLumi() == 0U) {
475  if (format == CFI)
476  os << "'" << value.startRun() << ":" << value.startEvent() << "-" << value.endRun() << ":" << value.endEvent()
477  << "'";
478  else
479  os << value.startRun() << ":" << value.startEvent() << "-" << value.endRun() << ":" << value.endEvent();
480  } else {
481  if (format == CFI)
482  os << "'" << value.startRun() << ":" << value.startLumi() << ":" << value.startEvent() << "-"
483  << value.endRun() << ":" << value.endLumi() << ":" << value.endEvent() << "'";
484  else
485  os << value.startRun() << ":" << value.startLumi() << ":" << value.startEvent() << "-" << value.endRun()
486  << ":" << value.endLumi() << ":" << value.endEvent();
487  }
488  }
template<>
void edm::writeParameterValue::writeSingleValue< FileInPath > ( std::ostream &  os,
FileInPath const &  value,
ValueFormat   
)

Definition at line 533 of file ParameterDescription.cc.

References relativeConstraints::value.

533  {
534  os << "'" << value.relativePath() << "'";
535  }
template<>
void edm::writeParameterValue::writeSingleValue< InputTag > ( std::ostream &  os,
InputTag const &  value,
ValueFormat  format 
)

Definition at line 502 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

502  {
503  if (format == CFI) {
504  os << "'" << value.label() << "'";
505  if (!value.instance().empty() || !value.process().empty()) {
506  os << ", '" << value.instance() << "'";
507  }
508  if (!value.process().empty()) {
509  os << ", '" << value.process() << "'";
510  }
511  } else {
512  os << "'" << value.label();
513  if (!value.instance().empty() || !value.process().empty()) {
514  os << ":" << value.instance();
515  }
516  if (!value.process().empty()) {
517  os << ":" << value.process();
518  }
519  os << "'";
520  }
521  }
template<>
void edm::writeParameterValue::writeSingleValue< LuminosityBlockID > ( std::ostream &  os,
LuminosityBlockID const &  value,
ValueFormat  format 
)

Definition at line 465 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

465  {
466  if (format == CFI)
467  os << value.run() << ", " << value.luminosityBlock();
468  else
469  os << value.run() << ":" << value.luminosityBlock();
470  }
template<>
void edm::writeParameterValue::writeSingleValue< LuminosityBlockRange > ( std::ostream &  os,
LuminosityBlockRange const &  value,
ValueFormat  format 
)

Definition at line 491 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

493  {
494  if (format == CFI)
495  os << "'" << value.startRun() << ":" << value.startLumi() << "-" << value.endRun() << ":" << value.endLumi()
496  << "'";
497  else
498  os << value.startRun() << ":" << value.startLumi() << "-" << value.endRun() << ":" << value.endLumi();
499  }
template<>
void edm::writeParameterValue::writeSingleValue< std::string > ( std::ostream &  os,
std::string const &  value,
ValueFormat   
)

Definition at line 447 of file ParameterDescription.cc.

References relativeConstraints::value.

447  {
448  os << "'" << value << "'";
449  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
int const &  value_,
ValueFormat  format 
)
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< int > const &  value_,
ValueFormat  format 
)

Definition at line 643 of file ParameterDescription.cc.

References diffTreeTool::format().

643  {
644  writeVector<int>(os, indentation, value_, format);
645  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
unsigned const &  value_,
ValueFormat  format 
)

Definition at line 647 of file ParameterDescription.cc.

References diffTreeTool::format().

647  {
648  writeValue<unsigned>(os, value_, format);
649  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< unsigned > const &  value_,
ValueFormat  format 
)

Definition at line 651 of file ParameterDescription.cc.

References diffTreeTool::format().

651  {
652  writeVector<unsigned>(os, indentation, value_, format);
653  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
long long const &  value_,
ValueFormat  format 
)

Definition at line 655 of file ParameterDescription.cc.

References diffTreeTool::format().

655  {
656  writeValue<long long>(os, value_, format);
657  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< long long > const &  value_,
ValueFormat  format 
)

Definition at line 659 of file ParameterDescription.cc.

References diffTreeTool::format().

659  {
660  writeVector<long long>(os, indentation, value_, format);
661  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
unsigned long long const &  value_,
ValueFormat  format 
)

Definition at line 663 of file ParameterDescription.cc.

References diffTreeTool::format().

663  {
664  writeValue<unsigned long long>(os, value_, format);
665  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< unsigned long long > const &  value_,
ValueFormat  format 
)

Definition at line 667 of file ParameterDescription.cc.

References diffTreeTool::format().

670  {
671  writeVector<unsigned long long>(os, indentation, value_, format);
672  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
double const &  value_,
ValueFormat  format 
)

Definition at line 674 of file ParameterDescription.cc.

References diffTreeTool::format().

674  {
675  writeValue<double>(os, value_, format);
676  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< double > const &  value_,
ValueFormat  format 
)

Definition at line 678 of file ParameterDescription.cc.

References diffTreeTool::format().

678  {
679  writeVector<double>(os, indentation, value_, format);
680  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
bool const &  value_,
ValueFormat  format 
)

Definition at line 682 of file ParameterDescription.cc.

References diffTreeTool::format().

682  {
683  writeValue<bool>(os, value_, format);
684  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::string const &  value_,
ValueFormat  format 
)

Definition at line 686 of file ParameterDescription.cc.

References diffTreeTool::format().

686  {
687  writeValue<std::string>(os, value_, format);
688  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< std::string > const &  value_,
ValueFormat  format 
)

Definition at line 690 of file ParameterDescription.cc.

References diffTreeTool::format().

690  {
691  writeVector<std::string>(os, indentation, value_, format);
692  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
EventID const &  value_,
ValueFormat  format 
)

Definition at line 694 of file ParameterDescription.cc.

References diffTreeTool::format().

694  {
695  writeValue<EventID>(os, value_, format);
696  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< EventID > const &  value_,
ValueFormat  format 
)

Definition at line 698 of file ParameterDescription.cc.

References diffTreeTool::format().

698  {
699  writeVector<EventID>(os, indentation, value_, format);
700  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
LuminosityBlockID const &  value_,
ValueFormat  format 
)

Definition at line 702 of file ParameterDescription.cc.

References diffTreeTool::format().

702  {
703  writeValue<LuminosityBlockID>(os, value_, format);
704  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< LuminosityBlockID > const &  value_,
ValueFormat  format 
)

Definition at line 706 of file ParameterDescription.cc.

References diffTreeTool::format().

709  {
710  writeVector<LuminosityBlockID>(os, indentation, value_, format);
711  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
LuminosityBlockRange const &  value_,
ValueFormat  format 
)

Definition at line 713 of file ParameterDescription.cc.

References diffTreeTool::format().

713  {
714  writeValue<LuminosityBlockRange>(os, value_, format);
715  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< LuminosityBlockRange > const &  value_,
ValueFormat  format 
)

Definition at line 717 of file ParameterDescription.cc.

References diffTreeTool::format().

720  {
721  writeVector<LuminosityBlockRange>(os, indentation, value_, format);
722  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
EventRange const &  value_,
ValueFormat  format 
)

Definition at line 724 of file ParameterDescription.cc.

References diffTreeTool::format().

724  {
725  writeValue<EventRange>(os, value_, format);
726  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< EventRange > const &  value_,
ValueFormat  format 
)

Definition at line 728 of file ParameterDescription.cc.

References diffTreeTool::format().

728  {
729  writeVector<EventRange>(os, indentation, value_, format);
730  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
InputTag const &  value_,
ValueFormat  format 
)

Definition at line 732 of file ParameterDescription.cc.

References diffTreeTool::format().

732  {
733  writeValue<InputTag>(os, value_, format);
734  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< InputTag > const &  value_,
ValueFormat  format 
)

Definition at line 736 of file ParameterDescription.cc.

References diffTreeTool::format().

736  {
737  writeVector<InputTag>(os, indentation, value_, format);
738  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
ESInputTag const &  value_,
ValueFormat  format 
)

Definition at line 740 of file ParameterDescription.cc.

References diffTreeTool::format().

740  {
741  writeValue<ESInputTag>(os, value_, format);
742  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< ESInputTag > const &  value_,
ValueFormat  format 
)

Definition at line 744 of file ParameterDescription.cc.

References diffTreeTool::format().

744  {
745  writeVector<ESInputTag>(os, indentation, value_, format);
746  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
FileInPath const &  value_,
ValueFormat  format 
)

Definition at line 748 of file ParameterDescription.cc.

References diffTreeTool::format().

748  {
749  writeValue<FileInPath>(os, value_, format);
750  }
template<typename T >
void edm::writeParameterValue::writeValue ( std::ostream &  os,
T const &  value_,
ValueFormat  format 
)

Definition at line 538 of file ParameterDescription.cc.

References TauDecayModes::dec, alignCSCRings::ff, and diffTreeTool::format().

538  {
539  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
540  os.width(0);
541  writeSingleValue<T>(os, value_, format);
542  os.flags(ff);
543  }
template<typename T >
void edm::writeParameterValue::writeValueInVector ( std::ostream &  os,
T const &  value,
ValueFormat  format 
)

Definition at line 546 of file ParameterDescription.cc.

References diffTreeTool::format(), and relativeConstraints::value.

546  {
547  writeSingleValue<T>(os, value, format);
548  }
template<>
void edm::writeParameterValue::writeValueInVector< ESInputTag > ( std::ostream &  os,
ESInputTag const &  value,
ValueFormat   
)

Definition at line 588 of file ParameterDescription.cc.

References relativeConstraints::value.

588  {
589  os << "'" << value.module() << ":" << value.data() << "'";
590  }
template<>
void edm::writeParameterValue::writeValueInVector< EventID > ( std::ostream &  os,
EventID const &  value,
ValueFormat  format 
)

Definition at line 553 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

553  {
554  if (value.luminosityBlock() == 0U) {
555  if (format == CFI)
556  os << "'" << value.run() << ":" << value.event() << "'";
557  else
558  os << value.run() << ":" << value.event();
559  } else {
560  if (format == CFI)
561  os << "'" << value.run() << ":" << value.luminosityBlock() << ":" << value.event() << "'";
562  else
563  os << value.run() << ":" << value.luminosityBlock() << ":" << value.event();
564  }
565  }
template<>
void edm::writeParameterValue::writeValueInVector< InputTag > ( std::ostream &  os,
InputTag const &  value,
ValueFormat   
)

Definition at line 576 of file ParameterDescription.cc.

References relativeConstraints::value.

576  {
577  os << "'" << value.label();
578  if (!value.instance().empty() || !value.process().empty()) {
579  os << ":" << value.instance();
580  }
581  if (!value.process().empty()) {
582  os << ":" << value.process();
583  }
584  os << "'";
585  }
template<>
void edm::writeParameterValue::writeValueInVector< LuminosityBlockID > ( std::ostream &  os,
LuminosityBlockID const &  value,
ValueFormat  format 
)

Definition at line 568 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

568  {
569  if (format == CFI)
570  os << "'" << value.run() << ":" << value.luminosityBlock() << "'";
571  else
572  os << value.run() << ":" << value.luminosityBlock();
573  }
template<typename T >
void edm::writeParameterValue::writeValueInVectorWithSpace ( T const &  value,
std::ostream &  os,
int  indentation,
bool &  startWithComma,
ValueFormat  format,
int &  i 
)

Definition at line 593 of file ParameterDescription.cc.

References CFI, DOC, diffTreeTool::format(), mps_fire::i, and relativeConstraints::value.

594  {
595  if (startWithComma && format == CFI)
596  os << ",";
597  startWithComma = true;
598  os << "\n" << std::setw(indentation) << "";
599  if (format == DOC)
600  os << "[" << i << "]: ";
601  writeValueInVector<T>(os, value, format);
602  ++i;
603  }
template<typename T >
void edm::writeParameterValue::writeVector ( std::ostream &  os,
int  indentation,
std::vector< T > const &  value_,
ValueFormat  format 
)

Definition at line 606 of file ParameterDescription.cc.

References CFI, TauDecayModes::dec, DOC, alignCSCRings::ff, edm::for_all(), diffTreeTool::format(), and mps_fire::i.

606  {
607  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
608  char oldFill = os.fill();
609  os.width(0);
610  if (value_.empty() && format == DOC) {
611  os << "empty";
612  } else if (value_.size() == 1U && format == CFI) {
613  writeValueInVector<T>(os, value_[0], format);
614  } else if (!value_.empty()) {
615  if (format == DOC)
616  os << "(vector size = " << value_.size() << ")";
617  if (format == CFI and value_.size() > 255U)
618  os << " *(";
619  os.fill(' ');
620  bool startWithComma = false;
621  int i = 0;
622  for_all(value_,
623  std::bind(&writeValueInVectorWithSpace<T>,
624  std::placeholders::_1,
625  std::ref(os),
626  indentation + 2,
627  std::ref(startWithComma),
628  format,
629  std::ref(i)));
630  if (format == CFI)
631  os << "\n" << std::setw(indentation) << "";
632  if (format == CFI and value_.size() > 255U)
633  os << ") ";
634  }
635  os.flags(ff);
636  os.fill(oldFill);
637  }
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:14