DetectorDescription
Core
interface
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
#include <memory>
7
8
#include "
DetectorDescription/Core/interface/DDBase.h
"
9
#include "
DetectorDescription/Core/interface/DDName.h
"
10
11
class
DDConstant
;
12
class
ClhepEvaluator
;
13
15
std::ostream&
operator<<
(std::ostream&
o
,
const
DDConstant
& cons);
16
18
class
DDConstant
:
public
DDBase
<DDName, std::unique_ptr<double> > {
19
public
:
21
DDConstant
();
22
24
DDConstant
(
const
DDName
&
name
);
25
27
DDConstant
(
const
DDName
&
name
, std::unique_ptr<double>
value
);
28
30
static
void
createConstantsFromEvaluator
(
ClhepEvaluator
&);
31
33
double
value
()
const
{
return
rep
(); }
34
36
operator
double()
const
{
return
rep
(); }
37
};
38
40
using
DDNumeric
=
DDConstant
;
41
42
#endif
DDBase.h
DDName
DDName is used to identify DDD entities uniquely.
Definition:
DDName.h:15
ClhepEvaluator
Definition:
ClhepEvaluator.h:8
DDConstant::DDConstant
DDConstant()
an uninitialized constant; one can assign an initialized constant to make it valid
Definition:
DDConstant.cc:10
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:36
DDBase< DDName, std::unique_ptr< double > >::name
const DDName & name() const
Definition:
DDBase.h:59
DDBase< DDName, std::unique_ptr< double > >::rep
const DDI::rep_traits< DDName, std::unique_ptr< double > >::reference rep() const
Definition:
DDBase.h:65
value
Definition:
value.py:1
DDConstant::value
double value() const
return the first stored value; does not check boundaries!
Definition:
DDConstant.h:33
DDConstant
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector>
Definition:
DDConstant.h:18
DDName.h
DDBase
Definition:
DDBase.h:10
operator<<
std::ostream & operator<<(std::ostream &o, const DDConstant &cons)
output operator for printing ...
Definition:
DDConstant.cc:16
DDConstant::createConstantsFromEvaluator
static void createConstantsFromEvaluator(ClhepEvaluator &)
creates all DDConstants from the variables of the ClhepEvaluator
Definition:
DDConstant.cc:27
Generated for CMSSW Reference Manual by
1.8.16