test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDConstant.h
Go to the documentation of this file.
1 #ifndef DDConstant_h
2 #define DDConstant_h
3 
6 #include <vector>
7 #include <iostream>
8 
9 class DDConstant;
10 
12 std::ostream & operator<<(std::ostream & o, const DDConstant & cons);
13 
15 class DDConstant : public DDBase<DDName, double * >
16 {
17 public:
19  DDConstant();
20 
22  DDConstant(const DDName & name);
23 
25  DDConstant(const DDName & name, double* value);
26 
28  static void createConstantsFromEvaluator();
29 
31  double value() const { return rep(); }
32 
34  operator double() const { return rep(); }
35 };
36 
39 
40 #endif
Definition: DDBase.h:14
const DDI::rep_traits< DDName, double * >::reference rep() const
Definition: DDBase.h:89
const DDName & name() const
Definition: DDBase.h:82
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
DDConstant DDNumeric
std::maps the XML naming convention, i.e. &lt;Numeric name=&quot;foo&quot; value=&quot;4711&quot;&gt; -&gt; DDNumeric ...
Definition: DDConstant.h:38
double value() const
return the first stored value; does not check boundaries!
Definition: DDConstant.h:31
DDConstant()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDConstant.cc:6
static void createConstantsFromEvaluator()
creates all DDConstants from the variables of the ClhepEvaluator
Definition: DDConstant.cc:34
a named constant corresponding to the DDL-XML tag &lt;Constant&gt; and &lt;ConstantsVector&gt; ...
Definition: DDConstant.h:15