test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DDConstant.cc File Reference
#include "DetectorDescription/Core/interface/DDConstant.h"
#include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const DDConstant &cons)
 output operator for printing ... More...
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DDConstant cons 
)

output operator for printing ...

Definition at line 20 of file DDConstant.cc.

References DDBase< N, C >::isDefined(), DDBase< N, C >::name(), and DDConstant::value().

21 {
22  os << "DDConstant name=" << cons.name();
23 
24  if(cons.isDefined().second) {
25  os << " val=" << cons.value();
26  }
27  else {
28  os << " constant is not yet defined, only declared.";
29  }
30  return os;
31 }
def_type isDefined() const
Definition: DDBase.h:115
const N & name() const
Definition: DDBase.h:82
double value() const
return the first stored value; does not check boundaries!
Definition: DDConstant.h:31