CMS 3D CMS Logo

DDString.cc
Go to the documentation of this file.
2 
3 #include <utility>
4 
6 
8 
9 
11 {
12  prep_ = StoreT::instance().create(name);
13 }
14 
16 {
17  prep_ = StoreT::instance().create(name,vals);
18 }
19 
20 
21 std::ostream & operator<<(std::ostream & os, const DDString & cons)
22 {
23  os << "DDString name=" << cons.name();
24 
25  if(cons.isDefined().second) {
26  os << " val=" << cons.value();
27  }
28  else {
29  os << " constant is not yet defined, only declared.";
30  }
31  return os;
32 }
33 
34 
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:15
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:7
static value_type & instance()
std::ostream & operator<<(std::ostream &os, const DDString &cons)
output operator for printing ...
Definition: DDString.cc:21