CMS 3D CMS Logo

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