/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
DetectorDescription/Core/interface/DDConstant.h
42 строки
1 KB
Cms Build
Clang-Format
29 май 2019, 08:28
29 май 2019, 08:28
96591f2
Код
Авторство
О чём код?
#ifndef DDConstant_h #define DDConstant_h #include <iostream> #include <vector> #include <memory> #include "DetectorDescription/Core/interface/DDBase.h" #include "DetectorDescription/Core/interface/DDName.h" class DDConstant; class ClhepEvaluator; //! output operator for printing ... std::ostream& operator<<(std::ostream& o, const DDConstant& cons); //! a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> class DDConstant : public DDBase<DDName, std::unique_ptr<double> > { public: //! an uninitialized constant; one can assign an initialized constant to make it valid DDConstant(); //! a refenrence to a constant DDConstant(const DDName& name); //! creation of a new named constant; if it already existed with the given name, it's overwritten with new values DDConstant(const DDName& name, std::unique_ptr<double> value); //! creates all DDConstants from the variables of the ClhepEvaluator static void createConstantsFromEvaluator(ClhepEvaluator&); //! return the first stored value; does not check boundaries! double value() const { return rep(); } //! convert to a double operator double() const { return rep(); } }; //! std::maps the XML naming convention, i.e. <Numeric name='foo' value='4711'/> -> DDNumeric using DDNumeric = DDConstant; #endif