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 473 of file ParameterDescription.cc.

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

Referenced by writeSingleValue< double >().

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

Definition at line 760 of file ParameterDescription.cc.

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

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

Definition at line 761 of file ParameterDescription.cc.

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

Definition at line 762 of file ParameterDescription.cc.

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

Definition at line 763 of file ParameterDescription.cc.

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

Definition at line 764 of file ParameterDescription.cc.

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

Definition at line 765 of file ParameterDescription.cc.

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

Definition at line 766 of file ParameterDescription.cc.

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

Definition at line 767 of file ParameterDescription.cc.

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

Definition at line 768 of file ParameterDescription.cc.

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

Definition at line 769 of file ParameterDescription.cc.

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

Definition at line 770 of file ParameterDescription.cc.

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

Definition at line 771 of file ParameterDescription.cc.

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

Definition at line 772 of file ParameterDescription.cc.

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

Definition at line 773 of file ParameterDescription.cc.

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

Definition at line 774 of file ParameterDescription.cc.

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

Definition at line 775 of file ParameterDescription.cc.

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

Definition at line 776 of file ParameterDescription.cc.

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

Definition at line 777 of file ParameterDescription.cc.

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

Definition at line 778 of file ParameterDescription.cc.

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

Definition at line 779 of file ParameterDescription.cc.

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

Definition at line 780 of file ParameterDescription.cc.

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

Definition at line 781 of file ParameterDescription.cc.

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

Definition at line 782 of file ParameterDescription.cc.

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

Definition at line 783 of file ParameterDescription.cc.

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

Definition at line 450 of file ParameterDescription.cc.

References relativeConstraints::value.

450  {
451  os << value;
452  }
template<>
void edm::writeParameterValue::writeSingleValue< bool > ( std::ostream &  os,
bool const &  value,
ValueFormat   
)

Definition at line 500 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 493 of file ParameterDescription.cc.

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

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

Definition at line 510 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 529 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 574 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 552 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 523 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 544 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 505 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 664 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

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

664  {
665  writeValue<int>(os, value_, format);
666  }
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 668 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

668  {
669  writeVector<int>(os, indentation, value_, format);
670  }
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 672 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

672  {
673  writeValue<unsigned>(os, value_, format);
674  }
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 676 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

676  {
677  writeVector<unsigned>(os, indentation, value_, format);
678  }
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 680 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

680  {
681  writeValue<long long>(os, value_, format);
682  }
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 684 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

684  {
685  writeVector<long long>(os, indentation, value_, format);
686  }
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 688 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

688  {
689  writeValue<unsigned long long>(os, value_, format);
690  }
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 692 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

692  {
693  writeVector<unsigned long long>(os, indentation, value_, format);
694  }
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 696 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

696  {
697  writeValue<double>(os, value_, format);
698  }
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 700 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

700  {
701  writeVector<double>(os, indentation, value_, format);
702  }
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 704 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

704  {
705  writeValue<bool>(os, value_, format);
706  }
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 708 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

708  {
709  writeValue<std::string>(os, value_, format);
710  }
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 712 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

712  {
713  writeVector<std::string>(os, indentation, value_, format);
714  }
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 716 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

716  {
717  writeValue<EventID>(os, value_, format);
718  }
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 720 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

720  {
721  writeVector<EventID>(os, indentation, value_, format);
722  }
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 724 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

724  {
725  writeValue<LuminosityBlockID>(os, value_, format);
726  }
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 728 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

728  {
729  writeVector<LuminosityBlockID>(os, indentation, value_, format);
730  }
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 732 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

732  {
733  writeValue<LuminosityBlockRange>(os, value_, format);
734  }
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 736 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

736  {
737  writeVector<LuminosityBlockRange>(os, indentation, value_, format);
738  }
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 740 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

740  {
741  writeValue<EventRange>(os, value_, format);
742  }
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 744 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

744  {
745  writeVector<EventRange>(os, indentation, value_, format);
746  }
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 748 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

748  {
749  writeValue<InputTag>(os, value_, format);
750  }
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 752 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

752  {
753  writeVector<InputTag>(os, indentation, value_, format);
754  }
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 756 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

756  {
757  writeValue<FileInPath>(os, value_, format);
758  }
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 579 of file ParameterDescription.cc.

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

579  {
580  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
581  os.width(0);
582  writeSingleValue<T>(os, value_, format);
583  os.flags(ff);
584  }
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 587 of file ParameterDescription.cc.

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

587  {
588  writeSingleValue<T>(os, value, format);
589  }
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 594 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 611 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 605 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 623 of file ParameterDescription.cc.

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

628  {
629  if(startWithComma && format == CFI) os << ",";
630  startWithComma = true;
631  os << "\n" << std::setw(indentation) << "";
632  if(format == DOC) os << "[" << i << "]: ";
633  writeValueInVector<T>(os, value, format);
634  ++i;
635  }
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 638 of file ParameterDescription.cc.

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

638  {
639  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
640  char oldFill = os.fill();
641  os.width(0);
642  if(value_.size() == 0U && format == DOC) {
643  os << "empty";
644  } else if(value_.size() == 1U && format == CFI) {
645  writeValueInVector<T>(os, value_[0], format);
646  } else if(value_.size() >= 1U) {
647  if(format == DOC) os << "(vector size = " << value_.size() << ")";
648  os.fill(' ');
649  bool startWithComma = false;
650  int i = 0;
651  for_all(value_, std::bind(&writeValueInVectorWithSpace<T>,
652  std::placeholders::_1,
653  std::ref(os),
654  indentation + 2,
655  std::ref(startWithComma),
656  format,
657  std::ref(i)));
658  if(format == CFI) os << "\n" << std::setw(indentation) << "";
659  }
660  os.flags(ff);
661  os.fill(oldFill);
662  }
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