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 format)
 
template<>
void writeSingleValue< bool > (std::ostream &os, bool const &value, ValueFormat format)
 
template<>
void writeSingleValue< double > (std::ostream &os, double const &value, ValueFormat format)
 
template<>
void writeSingleValue< EventID > (std::ostream &os, EventID const &value, ValueFormat format)
 
template<>
void writeSingleValue< EventRange > (std::ostream &os, EventRange const &value, ValueFormat format)
 
template<>
void writeSingleValue< FileInPath > (std::ostream &os, FileInPath const &value, ValueFormat format)
 
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 format)
 
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 format)
 
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 481 of file ParameterDescription.cc.

References asciidump::s, and relativeConstraints::value.

Referenced by writeSingleValue< double >().

481  {
482  std::stringstream s;
483  s << std::setprecision(17) << value;
484  result = s.str();
485 
486  if (result.size() > 15 && std::string::npos != result.find(".")) {
487  std::stringstream s;
488  s << std::setprecision(15) << value;
489  std::string resultLessPrecision = s.str();
490 
491  if (resultLessPrecision.size() < result.size() - 2) {
492  double test = std::strtod(resultLessPrecision.c_str(), 0);
493  if (test == value) {
494  result = resultLessPrecision;
495  }
496  }
497  }
498  }
tuple result
Definition: query.py:137
string s
Definition: asciidump.py:422
bool edm::writeParameterValue::hasNestedContent ( int const &  value)

Definition at line 771 of file ParameterDescription.cc.

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

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

Definition at line 772 of file ParameterDescription.cc.

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

Definition at line 773 of file ParameterDescription.cc.

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

Definition at line 774 of file ParameterDescription.cc.

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

Definition at line 775 of file ParameterDescription.cc.

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

Definition at line 776 of file ParameterDescription.cc.

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

Definition at line 777 of file ParameterDescription.cc.

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

Definition at line 778 of file ParameterDescription.cc.

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

Definition at line 779 of file ParameterDescription.cc.

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

Definition at line 780 of file ParameterDescription.cc.

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

Definition at line 781 of file ParameterDescription.cc.

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

Definition at line 782 of file ParameterDescription.cc.

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

Definition at line 783 of file ParameterDescription.cc.

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

Definition at line 784 of file ParameterDescription.cc.

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

Definition at line 785 of file ParameterDescription.cc.

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

Definition at line 786 of file ParameterDescription.cc.

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

Definition at line 787 of file ParameterDescription.cc.

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

Definition at line 788 of file ParameterDescription.cc.

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

Definition at line 789 of file ParameterDescription.cc.

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

Definition at line 790 of file ParameterDescription.cc.

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

Definition at line 791 of file ParameterDescription.cc.

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

Definition at line 792 of file ParameterDescription.cc.

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

Definition at line 793 of file ParameterDescription.cc.

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

Definition at line 794 of file ParameterDescription.cc.

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

Definition at line 458 of file ParameterDescription.cc.

References relativeConstraints::value.

458  {
459  os << value;
460  }
template<>
void edm::writeParameterValue::writeSingleValue< bool > ( std::ostream &  os,
bool const &  value,
ValueFormat  format 
)

Definition at line 508 of file ParameterDescription.cc.

References relativeConstraints::value.

508  {
509  value ? os << "True" : os << "False";
510  }
template<>
void edm::writeParameterValue::writeSingleValue< double > ( std::ostream &  os,
double const &  value,
ValueFormat  format 
)

Definition at line 501 of file ParameterDescription.cc.

References formatDouble(), and relativeConstraints::value.

501  {
502  std::string sValue;
503  formatDouble(value, sValue);
504  os << sValue;
505  }
void formatDouble(double value, std::string &result)
template<>
void edm::writeParameterValue::writeSingleValue< EventID > ( std::ostream &  os,
EventID const &  value,
ValueFormat  format 
)

Definition at line 518 of file ParameterDescription.cc.

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

518  {
519  if (format == CFI) {
520  os << value.run() << ", " << value.luminosityBlock() << ", " << value.event();
521  } else {
522  if (value.luminosityBlock() == 0U) {
523  os << value.run() << ":" << value.event();
524  } else {
525  os << value.run() << ":" << value.luminosityBlock() << ":" << value.event();
526  }
527  }
528  }
template<>
void edm::writeParameterValue::writeSingleValue< EventRange > ( std::ostream &  os,
EventRange const &  value,
ValueFormat  format 
)

Definition at line 537 of file ParameterDescription.cc.

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

537  {
538  if (value.startLumi() == 0U) {
539  if (format == CFI) os << "'" << value.startRun() << ":" << value.startEvent() << "-"
540  << value.endRun() << ":" << value.endEvent() << "'";
541  else os << value.startRun() << ":" << value.startEvent() << "-"
542  << value.endRun() << ":" << value.endEvent();
543  } else {
544  if (format == CFI) os << "'" << value.startRun() << ":" << value.startLumi() << ":" << value.startEvent() << "-"
545  << value.endRun() << ":" << value.endLumi() << ":" << value.endEvent() << "'";
546  else os << value.startRun() << ":" << value.startLumi() << ":" << value.startEvent() << "-"
547  << value.endRun() << ":" << value.endLumi() << ":" << value.endEvent();
548  }
549  }
template<>
void edm::writeParameterValue::writeSingleValue< FileInPath > ( std::ostream &  os,
FileInPath const &  value,
ValueFormat  format 
)

Definition at line 583 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 560 of file ParameterDescription.cc.

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

560  {
561  if (format == CFI) {
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  }
570  else {
571  os << "'" << value.label();
572  if (!value.instance().empty() || !value.process().empty()) {
573  os << ":" << value.instance();
574  }
575  if (!value.process().empty()) {
576  os << ":" << value.process();
577  }
578  os << "'";
579  }
580  }
template<>
void edm::writeParameterValue::writeSingleValue< LuminosityBlockID > ( std::ostream &  os,
LuminosityBlockID const &  value,
ValueFormat  format 
)

Definition at line 531 of file ParameterDescription.cc.

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

531  {
532  if (format == CFI) os << value.run() << ", " << value.luminosityBlock();
533  else os << value.run() << ":" << value.luminosityBlock();
534  }
template<>
void edm::writeParameterValue::writeSingleValue< LuminosityBlockRange > ( std::ostream &  os,
LuminosityBlockRange const &  value,
ValueFormat  format 
)

Definition at line 552 of file ParameterDescription.cc.

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

552  {
553  if (format == CFI) os << "'" << value.startRun() << ":" << value.startLumi() << "-"
554  << value.endRun() << ":" << value.endLumi() << "'";
555  else os << value.startRun() << ":" << value.startLumi() << "-"
556  << value.endRun() << ":" << value.endLumi();
557  }
template<>
void edm::writeParameterValue::writeSingleValue< std::string > ( std::ostream &  os,
std::string const &  value,
ValueFormat  format 
)

Definition at line 513 of file ParameterDescription.cc.

References relativeConstraints::value.

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

Definition at line 679 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 683 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 687 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 691 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 695 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 699 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 703 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 707 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 711 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 715 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 719 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 723 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 727 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 731 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 735 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 739 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 743 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 747 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 751 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 755 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 759 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 763 of file ParameterDescription.cc.

References diffTreeTool::format().

763  {
764  writeVector<InputTag>(os, indentation, value_, format);
765  }
void edm::writeParameterValue::writeValue ( std::ostream &  os,
int  indentation,
FileInPath const &  value_,
ValueFormat  format 
)

Definition at line 767 of file ParameterDescription.cc.

References diffTreeTool::format().

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

Definition at line 588 of file ParameterDescription.cc.

References createTree::ff, and diffTreeTool::format().

588  {
589  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
590  os.width(0);
591  writeSingleValue<T>(os, value_, format);
592  os.flags(ff);
593  }
tuple ff
Definition: createTree.py:204
template<typename T >
void edm::writeParameterValue::writeValueInVector ( std::ostream &  os,
T const &  value,
ValueFormat  format 
)

Definition at line 596 of file ParameterDescription.cc.

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

596  {
597  writeSingleValue<T>(os, value, format);
598  }
template<>
void edm::writeParameterValue::writeValueInVector< EventID > ( std::ostream &  os,
EventID const &  value,
ValueFormat  format 
)

Definition at line 603 of file ParameterDescription.cc.

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

603  {
604  if (value.luminosityBlock() == 0U) {
605  if (format == CFI) os << "'" << value.run() << ":" << value.event() << "'";
606  else os << value.run() << ":" << value.event();
607  } else {
608  if (format == CFI) os << "'" << value.run() << ":" << value.luminosityBlock() << ":" << value.event() << "'";
609  else os << value.run() << ":" << value.luminosityBlock() << ":" << value.event();
610  }
611  }
template<>
void edm::writeParameterValue::writeValueInVector< InputTag > ( std::ostream &  os,
InputTag const &  value,
ValueFormat  format 
)

Definition at line 620 of file ParameterDescription.cc.

References relativeConstraints::value.

620  {
621  os << "'" << value.label();
622  if (!value.instance().empty() || !value.process().empty()) {
623  os << ":" << value.instance();
624  }
625  if (!value.process().empty()) {
626  os << ":" << value.process();
627  }
628  os << "'";
629  }
template<>
void edm::writeParameterValue::writeValueInVector< LuminosityBlockID > ( std::ostream &  os,
LuminosityBlockID const &  value,
ValueFormat  format 
)

Definition at line 614 of file ParameterDescription.cc.

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

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

Definition at line 632 of file ParameterDescription.cc.

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

637  {
638  if (startWithComma && format == CFI) os << ",";
639  startWithComma = true;
640  os << "\n" << std::setw(indentation) << "";
641  if (format == DOC) os << "[" << i << "]: ";
642  writeValueInVector<T>(os, value, format);
643  ++i;
644  }
int i
Definition: DBlmapReader.cc:9
template<typename T >
void edm::writeParameterValue::writeVector ( std::ostream &  os,
int  indentation,
std::vector< T > const &  value_,
ValueFormat  format 
)

Definition at line 647 of file ParameterDescription.cc.

References CFI, DOC, createTree::ff, edm::for_all(), diffTreeTool::format(), and i.

647  {
648  std::ios_base::fmtflags ff = os.flags(std::ios_base::dec);
649  char oldFill = os.fill();
650  os.width(0);
651  if (value_.size() == 0U && format == DOC) {
652  os << "empty";
653  }
654  else if (value_.size() == 1U && format == CFI) {
655  writeValueInVector<T>(os, value_[0], format);
656  }
657  else if (value_.size() >= 1U) {
658  if (format == DOC) os << "(vector size = " << value_.size() << ")";
659  os.fill(' ');
660  bool startWithComma = false;
661  int i = 0;
662  for_all(value_, boost::bind(&writeValueInVectorWithSpace<T>,
663  _1,
664  boost::ref(os),
665  indentation + 2,
666  boost::ref(startWithComma),
667  format,
668  boost::ref(i)));
669  if (format == CFI) os << "\n" << std::setw(indentation) << "";
670  }
671  os.flags(ff);
672  os.fill(oldFill);
673  }
int i
Definition: DBlmapReader.cc:9
Func for_all(ForwardSequence &s, Func f)
wrapper for std::for_each
Definition: Algorithms.h:16
tuple ff
Definition: createTree.py:204