Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-03-13 08:19:40

0001 //==========================================================================
0002 //  AIDA Detector description implementation 
0003 //--------------------------------------------------------------------------
0004 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 // All rights reserved.
0006 //
0007 // For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 //
0010 // Author     : M.Frank
0011 //
0012 //==========================================================================
0013 
0014 // Framework includes
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 /// Initializing constructor
0034 NamedObject::NamedObject(const char* nam, const char* typ)
0035   : name(nam ? nam : ""), type(typ ? typ : "")
0036 {
0037 }
0038 
0039 /// Initializing constructor
0040 NamedObject::NamedObject(const std::string& nam)
0041   : name(nam), type()
0042 {
0043 }
0044 
0045 /// Initializing constructor
0046 NamedObject::NamedObject(const std::string& nam, const std::string& typ)
0047   : name(nam), type(typ)
0048 {
0049 }
0050