File indexing completed on 2025-03-13 08:19:40
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <DD4hep/NamedObject.h>
0016 #include <DD4hep/detail/Handle.inl>
0017 #include <TNamed.h>
0018
0019 namespace dd4hep {
0020 template <> const char* Handle<NamedObject>::name() const {
0021 return this->m_element ? this->m_element->name.c_str() : "";
0022 }
0023 template <> void
0024 Handle<NamedObject>::assign(NamedObject* p, const std::string& n, const std::string& t){
0025 m_element = p;
0026 p->name = n;
0027 p->type = t;
0028 }
0029 }
0030 template class dd4hep::Handle<dd4hep::NamedObject>;
0031 using namespace dd4hep;
0032
0033
0034 NamedObject::NamedObject(const char* nam, const char* typ)
0035 : name(nam ? nam : ""), type(typ ? typ : "")
0036 {
0037 }
0038
0039
0040 NamedObject::NamedObject(const std::string& nam)
0041 : name(nam), type()
0042 {
0043 }
0044
0045
0046 NamedObject::NamedObject(const std::string& nam, const std::string& typ)
0047 : name(nam), type(typ)
0048 {
0049 }
0050