CMS 3D CMS Logo

Classes | Typedefs | Functions
DDConstant.h File Reference
#include <iostream>
#include <vector>
#include <memory>
#include "DetectorDescription/Core/interface/DDBase.h"
#include "DetectorDescription/Core/interface/DDName.h"

Go to the source code of this file.

Classes

class  DDConstant
 a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> More...
 

Typedefs

using DDNumeric = DDConstant
 std::maps the XML naming convention, i.e. <Numeric name="foo" value="4711"> -> DDNumeric More...
 

Functions

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

Typedef Documentation

◆ DDNumeric

std::maps the XML naming convention, i.e. <Numeric name="foo" value="4711"> -> DDNumeric

Definition at line 40 of file DDConstant.h.

Function Documentation

◆ operator<<()

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

output operator for printing ...

Definition at line 16 of file DDConstant.cc.

16  {
17  os << "DDConstant name=" << cons.name();
18 
19  if (cons.isDefined().second) {
20  os << " val=" << cons.value();
21  } else {
22  os << " constant is not yet defined, only declared.";
23  }
24  return os;
25 }

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

DDBase::isDefined
def_type isDefined() const
Definition: DDBase.h:90
DDBase::name
const N & name() const
Definition: DDBase.h:59
DDConstant::value
double value() const
return the first stored value; does not check boundaries!
Definition: DDConstant.h:33