CMS 3D CMS Logo

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

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)
 

Variables

static std::atomic< unsigned int > lastIndex {0}
 

Function Documentation

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

Definition at line 153 of file DDValue.cc.

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

154 {
155  o << v.name() << " = ";
156  unsigned int i = 0;
157  if( v.isEvaluated())
158  {
159  for(; i < v.size(); ++i )
160  {
161  o << '(' << v[i].first << ',' << v[i].second << ") ";
162  }
163  }
164  else
165  {
166  const std::vector<std::string> & s = v.strings();
167  for(; i < v.size(); ++i )
168  {
169  o << s[i] << ' ';
170  }
171  }
172  return o;
173 }
const std::string & name(void) const
the name of the DDValue
Definition: DDValue.h:55
int i
Definition: DBlmapReader.cc:9
bool isEvaluated(void) const
true, if values are numerical evaluated; else false.
Definition: DDValue.cc:203
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:62
unsigned int size() const
the size of the stored value-pairs (std::string,double)
Definition: DDValue.h:69
std::ostream& operator<< ( std::ostream &  o,
const DDValuePair v 
)

Definition at line 176 of file DDValue.cc.

177 {
178  return o << v.second;
179 }

Variable Documentation

std::atomic<unsigned int> lastIndex {0}
static

Definition at line 7 of file DDValue.cc.

Referenced by DDValue::DDValue(), and DDValue::init().