test
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, ctpps_dqm_sourceclient-live_cfg::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: mps_fire.py:84
bool edm::writeParameterValue::hasNestedContent ( int const &  value)

Definition at line 762 of file ParameterDescription.cc.

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

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

Definition at line 763 of file ParameterDescription.cc.

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

Definition at line 764 of file ParameterDescription.cc.

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

Definition at line 765 of file ParameterDescription.cc.

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

Definition at line 766 of file ParameterDescription.cc.

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

Definition at line 767 of file ParameterDescription.cc.

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

Definition at line 768 of file ParameterDescription.cc.

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

Definition at line 769 of file ParameterDescription.cc.

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

Definition at line 770 of file ParameterDescription.cc.

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

Definition at line 771 of file ParameterDescription.cc.

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

Definition at line 772 of file ParameterDescription.cc.

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

Definition at line 773 of file ParameterDescription.cc.

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

Definition at line 774 of file ParameterDescription.cc.

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

Definition at line 775 of file ParameterDescription.cc.

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

Definition at line 776 of file ParameterDescription.cc.

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

Definition at line 777 of file ParameterDescription.cc.

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

Definition at line 778 of file ParameterDescription.cc.

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

Definition at line 779 of file ParameterDescription.cc.

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

Definition at line 780 of file ParameterDescription.cc.

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

Definition at line 781 of file ParameterDescription.cc.

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

Definition at line 782 of file ParameterDescription.cc.

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

Definition at line 783 of file ParameterDescription.cc.

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

Definition at line 784 of file ParameterDescription.cc.

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

Definition at line 785 of file ParameterDescription.cc.

785 { 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 666 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

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

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

758  {
759  writeValue<FileInPath>(os, value_, format);
760  }
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  if(format == CFI and value_.size() > 255U) os << " *(";
649  os.fill(' ');
650  bool startWithComma = false;
651  int i = 0;
652  for_all(value_, std::bind(&writeValueInVectorWithSpace<T>,
653  std::placeholders::_1,
654  std::ref(os),
655  indentation + 2,
656  std::ref(startWithComma),
657  format,
658  std::ref(i)));
659  if(format == CFI) os << "\n" << std::setw(indentation) << "";
660  if(format == CFI and value_.size() > 255U) os << ") ";
661  }
662  os.flags(ff);
663  os.fill(oldFill);
664  }
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