DD4hep - The AIDA detector description toolkit for high energy physics experiments
DD4hep  Rev:Unversioneddirectory
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NamedObject.cpp
Go to the documentation of this file.
1 // $Id: $
2 //==========================================================================
3 // AIDA Detector description implementation for LCD
4 //--------------------------------------------------------------------------
5 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
6 // All rights reserved.
7 //
8 // For the licensing terms see $DD4hepINSTALL/LICENSE.
9 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
10 //
11 // Author : M.Frank
12 //
13 //==========================================================================
14 
15 // Framework includes
16 #include "DD4hep/NamedObject.h"
17 #include "DD4hep/Handle.inl"
18 #include "TObject.h"
19 
20 using namespace std;
21 using namespace DD4hep;
22 using namespace DD4hep::Geometry;
23 
25 
27 NamedObject::NamedObject() {
28 }
29 
31 NamedObject::NamedObject(const char* nam, const char* typ)
32  : name(nam ? nam : ""), type(typ ? typ : "")
33 {
34 }
35 
37 NamedObject::NamedObject(const std::string& nam)
38  : name(nam), type()
39 {
40 }
41 
43 NamedObject::NamedObject(const std::string& nam, const std::string& typ)
44  : name(nam), type(typ)
45 {
46 }
47 
49 NamedObject::NamedObject(const NamedObject& c) : name(c.name), type(c.type) {
50 }
51 
54 }
55 
58  if ( this != &c ) {
59  name = c.name;
60  type = c.type;
61  }
62  return *this;
63 }
64 
NamedObject()
Standard constructor.
Definition: NamedObject.cpp:27
Implementation of a named object.
Definition: NamedObject.h:31
std::string name
The object name.
Definition: NamedObject.h:34
DD4HEP_INSTANTIATE_HANDLE_NAMED(NamedObject)
NamedObject & operator=(const NamedObject &c)
Assignment operator.
Definition: NamedObject.cpp:57
std::string type
The object type.
Definition: NamedObject.h:36
virtual ~NamedObject()
Default destructor.
Definition: NamedObject.cpp:53