File indexing completed on 2024-04-06 12:05:26
0001 #include "DetectorDescription/Core/interface/DDStrVector.h"
0002
0003 #include <utility>
0004
0005 DDStrVector::DDStrVector() : DDBase<DDName, std::unique_ptr<std::vector<std::string>>>() {}
0006
0007 DDStrVector::DDStrVector(const DDName& name) : DDBase<DDName, std::unique_ptr<std::vector<std::string>>>() {
0008 create(name);
0009 }
0010
0011 DDStrVector::DDStrVector(const DDName& name, std::unique_ptr<std::vector<std::string>> vals) {
0012 create(name, std::move(vals));
0013 }
0014
0015 std::ostream& operator<<(std::ostream& os, const DDStrVector& cons) {
0016 os << "DDStrVector name=" << cons.name();
0017
0018 if (cons.isDefined().second) {
0019 os << " size=" << cons.size() << " vals=( ";
0020 for (const auto& it : cons.values()) {
0021 os << it << ' ';
0022 }
0023 os << ')';
0024 } else {
0025 os << " constant is not yet defined, only declared.";
0026 }
0027 return os;
0028 }