CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 (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< 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, 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< 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 470 of file ParameterDescription.cc.

References alignCSCRings::s, AlCaHLTBitMon_QueryRunRegistry::string, run_regression::test, and relativeConstraints::value.

Referenced by writeSingleValue< double >().

470  {
471  std::stringstream s;
472  s << std::setprecision(17) << value;
473  result = s.str();
474 
475  if(result.size() > 15 && std::string::npos != result.find(".")) {
476  std::stringstream s;
477  s << std::setprecision(15) << value;
478  std::string resultLessPrecision = s.str();
479 
480  if(resultLessPrecision.size() < result.size() - 2) {
481  double test = std::strtod(resultLessPrecision.c_str(), 0);
482  if(test == value) {
483  result = resultLessPrecision;
484  }
485  }
486  }
487  }
tuple result
Definition: query.py:137
bool edm::writeParameterValue::hasNestedContent ( int const &  value)

Definition at line 757 of file ParameterDescription.cc.

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

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

Definition at line 758 of file ParameterDescription.cc.

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

Definition at line 759 of file ParameterDescription.cc.

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

Definition at line 760 of file ParameterDescription.cc.

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

Definition at line 761 of file ParameterDescription.cc.

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

Definition at line 762 of file ParameterDescription.cc.

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

Definition at line 763 of file ParameterDescription.cc.

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

Definition at line 764 of file ParameterDescription.cc.

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

Definition at line 765 of file ParameterDescription.cc.

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

Definition at line 766 of file ParameterDescription.cc.

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

Definition at line 767 of file ParameterDescription.cc.

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

Definition at line 768 of file ParameterDescription.cc.

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

Definition at line 769 of file ParameterDescription.cc.

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

Definition at line 770 of file ParameterDescription.cc.

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

Definition at line 771 of file ParameterDescription.cc.

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

Definition at line 772 of file ParameterDescription.cc.

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

Definition at line 773 of file ParameterDescription.cc.

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

Definition at line 774 of file ParameterDescription.cc.

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

Definition at line 775 of file ParameterDescription.cc.

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

Definition at line 776 of file ParameterDescription.cc.

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

Definition at line 777 of file ParameterDescription.cc.

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

Definition at line 778 of file ParameterDescription.cc.

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

Definition at line 779 of file ParameterDescription.cc.

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

Definition at line 780 of file ParameterDescription.cc.

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

Definition at line 447 of file ParameterDescription.cc.

References relativeConstraints::value.

447  {
448  os << value;
449  }
template<>
void edm::writeParameterValue::writeSingleValue< bool > ( std::ostream &  os,
bool const &  value,
ValueFormat   
)

Definition at line 497 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 490 of file ParameterDescription.cc.

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

490  {
491  std::string sValue;
492  formatDouble(value, sValue);
493  os << sValue;
494  }
void formatDouble(double value, std::string &result)
template<>
void edm::writeParameterValue::writeSingleValue< EventID > ( std::ostream &  os,
EventID const &  value,
ValueFormat  format 
)

Definition at line 507 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

507  {
508  if(format == CFI) {
509  os << value.run() << ", " << value.luminosityBlock() << ", " << value.event();
510  } else {
511  if(value.luminosityBlock() == 0U) {
512  os << value.run() << ":" << value.event();
513  } else {
514  os << value.run() << ":" << value.luminosityBlock() << ":" << value.event();
515  }
516  }
517  }
template<>
void edm::writeParameterValue::writeSingleValue< EventRange > ( std::ostream &  os,
EventRange const &  value,
ValueFormat  format 
)

Definition at line 526 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

526  {
527  if(value.startLumi() == 0U) {
528  if(format == CFI) os << "'" << value.startRun() << ":" << value.startEvent() << "-"
529  << value.endRun() << ":" << value.endEvent() << "'";
530  else os << value.startRun() << ":" << value.startEvent() << "-"
531  << value.endRun() << ":" << value.endEvent();
532  } else {
533  if(format == CFI) os << "'" << value.startRun() << ":" << value.startLumi() << ":" << value.startEvent() << "-"
534  << value.endRun() << ":" << value.endLumi() << ":" << value.endEvent() << "'";
535  else os << value.startRun() << ":" << value.startLumi() << ":" << value.startEvent() << "-"
536  << value.endRun() << ":" << value.endLumi() << ":" << value.endEvent();
537  }
538  }
template<>
void edm::writeParameterValue::writeSingleValue< FileInPath > ( std::ostream &  os,
FileInPath const &  value,
ValueFormat   
)

Definition at line 571 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 549 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

549  {
550  if(format == CFI) {
551  os << "'" << value.label() << "'";
552  if(!value.instance().empty() || !value.process().empty()) {
553  os << ", '" << value.instance() << "'";
554  }
555  if(!value.process().empty()) {
556  os << ", '" << value.process() << "'";
557  }
558  } else {
559  os << "'" << value.label();
560  if(!value.instance().empty() || !value.process().empty()) {
561  os << ":" << value.instance();
562  }
563  if(!value.process().empty()) {
564  os << ":" << value.process();
565  }
566  os << "'";
567  }
568  }
template<>
void edm::writeParameterValue::writeSingleValue< LuminosityBlockID > ( std::ostream &  os,
LuminosityBlockID const &  value,
ValueFormat  format 
)

Definition at line 520 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

520  {
521  if(format == CFI) os << value.run() << ", " << value.luminosityBlock();
522  else os << value.run() << ":" << value.luminosityBlock();
523  }
template<>
void edm::writeParameterValue::writeSingleValue< LuminosityBlockRange > ( std::ostream &  os,
LuminosityBlockRange const &  value,
ValueFormat  format 
)

Definition at line 541 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

541  {
542  if(format == CFI) os << "'" << value.startRun() << ":" << value.startLumi() << "-"
543  << value.endRun() << ":" << value.endLumi() << "'";
544  else os << value.startRun() << ":" << value.startLumi() << "-"
545  << value.endRun() << ":" << value.endLumi();
546  }
template<>
void edm::writeParameterValue::writeSingleValue< std::string > ( std::ostream &  os,
std::string const &  value,
ValueFormat   
)

Definition at line 502 of file ParameterDescription.cc.

References relativeConstraints::value.

502  {
503  os << "'" << value << "'";
504  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
int const &  value_,
ValueFormat  format 
)

Definition at line 661 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

Referenced by edm::ParameterDescription< std::vector< std::string > >::writeCfi_(), and edm::ParameterDescription< std::vector< std::string > >::writeDoc_().

661  {
662  writeValue<int>(os, value_, format);
663  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< int > const &  value_,
ValueFormat  format 
)

Definition at line 665 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

665  {
666  writeVector<int>(os, indentation, value_, format);
667  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
unsigned const &  value_,
ValueFormat  format 
)

Definition at line 669 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

669  {
670  writeValue<unsigned>(os, value_, format);
671  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< unsigned > const &  value_,
ValueFormat  format 
)

Definition at line 673 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

673  {
674  writeVector<unsigned>(os, indentation, value_, format);
675  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
long long const &  value_,
ValueFormat  format 
)

Definition at line 677 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

677  {
678  writeValue<long long>(os, value_, format);
679  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< long long > const &  value_,
ValueFormat  format 
)

Definition at line 681 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

681  {
682  writeVector<long long>(os, indentation, value_, format);
683  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
unsigned long long const &  value_,
ValueFormat  format 
)

Definition at line 685 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

685  {
686  writeValue<unsigned long long>(os, value_, format);
687  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< unsigned long long > const &  value_,
ValueFormat  format 
)

Definition at line 689 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

689  {
690  writeVector<unsigned long long>(os, indentation, value_, format);
691  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
double const &  value_,
ValueFormat  format 
)

Definition at line 693 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

693  {
694  writeValue<double>(os, value_, format);
695  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< double > const &  value_,
ValueFormat  format 
)

Definition at line 697 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

697  {
698  writeVector<double>(os, indentation, value_, format);
699  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
bool const &  value_,
ValueFormat  format 
)

Definition at line 701 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

701  {
702  writeValue<bool>(os, value_, format);
703  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::string const &  value_,
ValueFormat  format 
)

Definition at line 705 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

705  {
706  writeValue<std::string>(os, value_, format);
707  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< std::string > const &  value_,
ValueFormat  format 
)

Definition at line 709 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

709  {
710  writeVector<std::string>(os, indentation, value_, format);
711  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
EventID const &  value_,
ValueFormat  format 
)

Definition at line 713 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

713  {
714  writeValue<EventID>(os, value_, format);
715  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< EventID > const &  value_,
ValueFormat  format 
)

Definition at line 717 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

717  {
718  writeVector<EventID>(os, indentation, value_, format);
719  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
LuminosityBlockID const &  value_,
ValueFormat  format 
)

Definition at line 721 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

721  {
722  writeValue<LuminosityBlockID>(os, value_, format);
723  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< LuminosityBlockID > const &  value_,
ValueFormat  format 
)

Definition at line 725 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

725  {
726  writeVector<LuminosityBlockID>(os, indentation, value_, format);
727  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
LuminosityBlockRange const &  value_,
ValueFormat  format 
)

Definition at line 729 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

729  {
730  writeValue<LuminosityBlockRange>(os, value_, format);
731  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< LuminosityBlockRange > const &  value_,
ValueFormat  format 
)

Definition at line 733 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

733  {
734  writeVector<LuminosityBlockRange>(os, indentation, value_, format);
735  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
EventRange const &  value_,
ValueFormat  format 
)

Definition at line 737 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

737  {
738  writeValue<EventRange>(os, value_, format);
739  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< EventRange > const &  value_,
ValueFormat  format 
)

Definition at line 741 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

741  {
742  writeVector<EventRange>(os, indentation, value_, format);
743  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
InputTag const &  value_,
ValueFormat  format 
)

Definition at line 745 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

745  {
746  writeValue<InputTag>(os, value_, format);
747  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
std::vector< InputTag > const &  value_,
ValueFormat  format 
)

Definition at line 749 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

749  {
750  writeVector<InputTag>(os, indentation, value_, format);
751  }
string format
Some error handling for the usage.
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
FileInPath const &  value_,
ValueFormat  format 
)

Definition at line 753 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

753  {
754  writeValue<FileInPath>(os, value_, format);
755  }
string format
Some error handling for the usage.
template<typename T >
void edm::writeParameterValue::writeValue ( std::ostream &  os,
T const &  value_,
ValueFormat  format 
)

Definition at line 576 of file ParameterDescription.cc.

References TauDecayModes::dec, alignCSCRings::ff, and cmsPerfStripChart::format.

576  {
577  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
578  os.width(0);
579  writeSingleValue<T>(os, value_, format);
580  os.flags(ff);
581  }
string format
Some error handling for the usage.
template<typename T >
void edm::writeParameterValue::writeValueInVector ( std::ostream &  os,
T const &  value,
ValueFormat  format 
)

Definition at line 584 of file ParameterDescription.cc.

References cmsPerfStripChart::format, and relativeConstraints::value.

584  {
585  writeSingleValue<T>(os, value, format);
586  }
string format
Some error handling for the usage.
template<>
void edm::writeParameterValue::writeValueInVector< EventID > ( std::ostream &  os,
EventID const &  value,
ValueFormat  format 
)

Definition at line 591 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

591  {
592  if(value.luminosityBlock() == 0U) {
593  if(format == CFI) os << "'" << value.run() << ":" << value.event() << "'";
594  else os << value.run() << ":" << value.event();
595  } else {
596  if(format == CFI) os << "'" << value.run() << ":" << value.luminosityBlock() << ":" << value.event() << "'";
597  else os << value.run() << ":" << value.luminosityBlock() << ":" << value.event();
598  }
599  }
template<>
void edm::writeParameterValue::writeValueInVector< InputTag > ( std::ostream &  os,
InputTag const &  value,
ValueFormat   
)

Definition at line 608 of file ParameterDescription.cc.

References relativeConstraints::value.

608  {
609  os << "'" << value.label();
610  if(!value.instance().empty() || !value.process().empty()) {
611  os << ":" << value.instance();
612  }
613  if(!value.process().empty()) {
614  os << ":" << value.process();
615  }
616  os << "'";
617  }
template<>
void edm::writeParameterValue::writeValueInVector< LuminosityBlockID > ( std::ostream &  os,
LuminosityBlockID const &  value,
ValueFormat  format 
)

Definition at line 602 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

602  {
603  if(format == CFI) os << "'" << value.run() << ":" << value.luminosityBlock() << "'";
604  else os << value.run() << ":" << value.luminosityBlock();
605  }
template<typename T >
void edm::writeParameterValue::writeValueInVectorWithSpace ( T const &  value,
std::ostream &  os,
int  indentation,
bool &  startWithComma,
ValueFormat  format,
int &  i 
)

Definition at line 620 of file ParameterDescription.cc.

References CFI, DOC, cmsPerfStripChart::format, i, and relativeConstraints::value.

625  {
626  if(startWithComma && format == CFI) os << ",";
627  startWithComma = true;
628  os << "\n" << std::setw(indentation) << "";
629  if(format == DOC) os << "[" << i << "]: ";
630  writeValueInVector<T>(os, value, format);
631  ++i;
632  }
int i
Definition: DBlmapReader.cc:9
string format
Some error handling for the usage.
template<typename T >
void edm::writeParameterValue::writeVector ( std::ostream &  os,
int  indentation,
std::vector< T > const &  value_,
ValueFormat  format 
)

Definition at line 635 of file ParameterDescription.cc.

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

635  {
636  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
637  char oldFill = os.fill();
638  os.width(0);
639  if(value_.size() == 0U && format == DOC) {
640  os << "empty";
641  } else if(value_.size() == 1U && format == CFI) {
642  writeValueInVector<T>(os, value_[0], format);
643  } else if(value_.size() >= 1U) {
644  if(format == DOC) os << "(vector size = " << value_.size() << ")";
645  os.fill(' ');
646  bool startWithComma = false;
647  int i = 0;
648  for_all(value_, std::bind(&writeValueInVectorWithSpace<T>,
649  std::placeholders::_1,
650  std::ref(os),
651  indentation + 2,
652  std::ref(startWithComma),
653  format,
654  std::ref(i)));
655  if(format == CFI) os << "\n" << std::setw(indentation) << "";
656  }
657  os.flags(ff);
658  os.fill(oldFill);
659  }
int i
Definition: DBlmapReader.cc:9
string format
Some error handling for the usage.
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16