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

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

Referenced by writeSingleValue< double >().

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

Definition at line 759 of file ParameterDescription.cc.

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

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

Definition at line 760 of file ParameterDescription.cc.

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

Definition at line 761 of file ParameterDescription.cc.

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

Definition at line 762 of file ParameterDescription.cc.

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

Definition at line 763 of file ParameterDescription.cc.

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

Definition at line 764 of file ParameterDescription.cc.

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

Definition at line 765 of file ParameterDescription.cc.

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

Definition at line 766 of file ParameterDescription.cc.

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

Definition at line 767 of file ParameterDescription.cc.

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

Definition at line 768 of file ParameterDescription.cc.

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

Definition at line 769 of file ParameterDescription.cc.

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

Definition at line 770 of file ParameterDescription.cc.

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

Definition at line 771 of file ParameterDescription.cc.

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

Definition at line 772 of file ParameterDescription.cc.

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

Definition at line 773 of file ParameterDescription.cc.

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

Definition at line 774 of file ParameterDescription.cc.

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

Definition at line 775 of file ParameterDescription.cc.

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

Definition at line 776 of file ParameterDescription.cc.

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

Definition at line 777 of file ParameterDescription.cc.

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

Definition at line 778 of file ParameterDescription.cc.

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

Definition at line 779 of file ParameterDescription.cc.

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

Definition at line 780 of file ParameterDescription.cc.

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

Definition at line 781 of file ParameterDescription.cc.

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

Definition at line 782 of file ParameterDescription.cc.

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

Definition at line 449 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 499 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 492 of file ParameterDescription.cc.

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

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

Definition at line 509 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 528 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 573 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 551 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 522 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 543 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 504 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 663 of file ParameterDescription.cc.

References cmsPerfStripChart::format.

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

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

References cmsPerfStripChart::format.

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

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

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

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

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

References CFI, and relativeConstraints::value.

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

Definition at line 610 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 604 of file ParameterDescription.cc.

References CFI, and relativeConstraints::value.

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

Definition at line 622 of file ParameterDescription.cc.

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

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

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

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