File indexing completed on 2024-04-06 12:05:23
0001 #ifndef DDConstant_h
0002 #define DDConstant_h
0003
0004 #include <iostream>
0005 #include <vector>
0006 #include <memory>
0007
0008 #include "DetectorDescription/Core/interface/DDBase.h"
0009 #include "DetectorDescription/Core/interface/DDName.h"
0010
0011 class DDConstant;
0012 class ClhepEvaluator;
0013
0014
0015 std::ostream& operator<<(std::ostream& o, const DDConstant& cons);
0016
0017
0018 class DDConstant : public DDBase<DDName, std::unique_ptr<double> > {
0019 public:
0020
0021 DDConstant();
0022
0023
0024 DDConstant(const DDName& name);
0025
0026
0027 DDConstant(const DDName& name, std::unique_ptr<double> value);
0028
0029
0030 static void createConstantsFromEvaluator(ClhepEvaluator&);
0031
0032
0033 double value() const { return rep(); }
0034
0035
0036 operator double() const { return rep(); }
0037 };
0038
0039
0040 using DDNumeric = DDConstant;
0041
0042 #endif