CMS 3D CMS Logo

DDConstant.h
Go to the documentation of this file.
1 #ifndef DDConstant_h
2 #define DDConstant_h
3 
4 #include <iostream>
5 #include <vector>
6 
9 
10 class DDConstant;
11 class ClhepEvaluator;
12 
14 std::ostream & operator<<(std::ostream & o, const DDConstant & cons);
15 
17 class DDConstant : public DDBase<DDName, double * >
18 {
19 public:
21  DDConstant();
22 
24  DDConstant(const DDName & name);
25 
27  DDConstant(const DDName & name, double* value);
28 
31 
33  double value() const { return rep(); }
34 
36  operator double() const { return rep(); }
37 };
38 
41 
42 #endif
Definition: DDBase.h:10
const DDI::rep_traits< DDName, double * >::reference rep() const
Definition: DDBase.h:84
const DDName & name() const
Definition: DDBase.h:78
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
DDConstant DDNumeric
std::maps the XML naming convention, i.e. <Numeric name="foo" value="4711"> -> DDNumeric ...
Definition: DDConstant.h:40
Definition: value.py:1
double value() const
return the first stored value; does not check boundaries!
Definition: DDConstant.h:33
DDConstant()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDConstant.cc:11
static void createConstantsFromEvaluator(ClhepEvaluator &)
creates all DDConstants from the variables of the ClhepEvaluator
Definition: DDConstant.cc:40
std::ostream & operator<<(std::ostream &o, const DDConstant &cons)
output operator for printing ...
Definition: DDConstant.cc:26
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> ...
Definition: DDConstant.h:17