test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DDValue.cc File Reference
#include "DetectorDescription/Core/interface/DDValue.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <cassert>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &o, const DDValue &v)
 
std::ostream & operator<< (std::ostream &o, const DDValuePair &v)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const DDValue v 
)

Definition at line 148 of file DDValue.cc.

References i, DDValue::isEvaluated(), DDValue::name(), python.connectstrParser::o, alignCSCRings::s, DDValue::size(), and DDValue::strings().

149 {
150  o << v.name() << " = ";
151  unsigned int i = 0;
152  if( v.isEvaluated())
153  {
154  for(; i < v.size(); ++i )
155  {
156  o << '(' << v[i].first << ',' << v[i].second << ") ";
157  }
158  }
159  else
160  {
161  const std::vector<std::string> & s = v.strings();
162  for(; i < v.size(); ++i )
163  {
164  o << s[i] << ' ';
165  }
166  }
167  return o;
168 }
const std::string & name(void) const
the name of the DDValue
Definition: DDValue.h:64
int i
Definition: DBlmapReader.cc:9
bool isEvaluated(void) const
true, if values are numerical evaluated; else false.
Definition: DDValue.cc:198
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
Definition: DDValue.h:71
unsigned int size() const
the size of the stored value-pairs (std::string,double)
Definition: DDValue.h:78
std::ostream& operator<< ( std::ostream &  o,
const DDValuePair v 
)

Definition at line 171 of file DDValue.cc.

172 {
173  return o << v.second;
174 }