CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DetectorDescription/Core/src/DDStrVector.cc

Go to the documentation of this file.
00001 
00002 #include "DetectorDescription/Core/interface/DDStrVector.h"
00003 
00004 // Evaluator 
00005 
00006 DDStrVector::DDStrVector() : DDBase<DDName,std::vector<std::string>*>() { }
00007 
00008 
00009 DDStrVector::DDStrVector(const DDName & name) : DDBase<DDName,std::vector<std::string>*>() 
00010 {
00011   prep_ = StoreT::instance().create(name);
00012 }
00013 
00014 DDStrVector::DDStrVector(const DDName & name,std::vector<std::string>* vals)
00015 {
00016   prep_ = StoreT::instance().create(name,vals);
00017 }  
00018 
00019 
00020 std::ostream & operator<<(std::ostream & os, const DDStrVector & cons)
00021 {
00022   os << "DDStrVector name=" << cons.name(); 
00023   
00024   if(cons.isDefined().second) {
00025     os << " size=" << cons.size() << " vals=( ";
00026     DDStrVector::value_type::const_iterator it(cons.values().begin()), ed(cons.values().end());
00027     for(; it<ed; ++it) {
00028       os << *it << ' ';
00029     }
00030     os << ')';
00031   }
00032   else {
00033     os << " constant is not yet defined, only declared.";
00034   }  
00035   return os;
00036 }
00037