test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
DDValue.h File Reference
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <memory>
#include "DetectorDescription/Core/interface/DDValuePair.h"
#include "boost/shared_ptr.hpp"

Go to the source code of this file.

Classes

class  DDValue
 

Functions

std::ostream & operator<< (std::ostream &o, const DDValue &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