CMS 3D CMS Logo

DDString.cc
Go to the documentation of this file.
2 
3 #include <utility>
4 
6 //#include "DetectorDescription/Base/interface/DDException.h"
7 
8 // Evaluator
9 //#include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
10 
11 
12 
14 
15 
17 {
18  prep_ = StoreT::instance().create(name);
19 }
20 
22 {
23  prep_ = StoreT::instance().create(name,vals);
24 }
25 
26 
27 std::ostream & operator<<(std::ostream & os, const DDString & cons)
28 {
29  os << "DDString name=" << cons.name();
30 
31  if(cons.isDefined().second) {
32  os << " val=" << cons.value();
33  }
34  else {
35  os << " constant is not yet defined, only declared.";
36  }
37  return os;
38 }
39 
40 
Definition: DDBase.h:10
def_type isDefined() const
Definition: DDBase.h:110
const DDName & name() const
Definition: DDBase.h:78
const std::string & value() const
return the first stored value; does not check boundaries!
Definition: DDString.h:29
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:16
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> ...
Definition: DDString.h:16
DDString()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDString.cc:13
static value_type & instance()
std::ostream & operator<<(std::ostream &os, const DDString &cons)
output operator for printing ...
Definition: DDString.cc:27