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 #include <DD4hep/Objects.h>
0015 #include <DD4hep/InstanceCount.h>
0016 #include <DD4hep/detail/Handle.inl>
0017 #include <DD4hep/detail/ObjectsInterna.h>
0018 #include <DD4hep/detail/SegmentationsInterna.h>
0019 
0020 #include <TROOT.h>
0021 
0022 using namespace dd4hep;
0023 
0024 DD4HEP_INSTANTIATE_HANDLE_NAMED(VisAttrObject);
0025 
0026 /// Standard constructor
0027 VisAttrObject::VisAttrObject() : magic(magic_word())   {
0028   InstanceCount::increment(this);
0029 }
0030 
0031 /// Default destructor
0032 VisAttrObject::~VisAttrObject() {
0033   InstanceCount::decrement(this);
0034 }
0035 
0036 DD4HEP_INSTANTIATE_HANDLE_NAMED(HeaderObject);
0037 
0038 /// Standard constructor
0039 HeaderObject::HeaderObject()
0040   : NamedObject() {
0041   InstanceCount::increment(this);
0042 }
0043 
0044 /// Default destructor
0045 HeaderObject::~HeaderObject() {
0046   InstanceCount::decrement(this);
0047 }
0048 
0049 DD4HEP_INSTANTIATE_HANDLE_NAMED(ConstantObject);
0050 
0051 /// Default constructor
0052 ConstantObject::ConstantObject()  {
0053   InstanceCount::increment(this);
0054 }
0055 
0056 /// Standard constructor
0057 ConstantObject::ConstantObject(const std::string& nam, const std::string& val, const std::string& typ)
0058   : NamedObject(nam.c_str(), val.c_str()) {
0059   dataType = typ;
0060   InstanceCount::increment(this);
0061 }
0062 
0063 /// Default destructor
0064 ConstantObject::~ConstantObject() {
0065   InstanceCount::decrement(this);
0066 }
0067 
0068 DD4HEP_INSTANTIATE_HANDLE_NAMED(RegionObject);
0069 
0070 /// Standard constructor
0071 RegionObject::RegionObject() : magic(magic_word())   {
0072   InstanceCount::increment(this);
0073 }
0074 
0075 /// Default destructor
0076 RegionObject::~RegionObject() {
0077   InstanceCount::decrement(this);
0078 }
0079 
0080 DD4HEP_INSTANTIATE_HANDLE_NAMED(LimitSetObject);
0081 
0082 /// Standard constructor
0083 LimitSetObject::LimitSetObject() {
0084   InstanceCount::increment(this);
0085 }
0086 
0087 /// Default destructor
0088 LimitSetObject::~LimitSetObject() {
0089   InstanceCount::decrement(this);
0090 }
0091 
0092 DD4HEP_INSTANTIATE_HANDLE_NAMED(ReadoutObject);
0093 
0094 /// Standard constructor
0095 ReadoutObject::ReadoutObject() {
0096   InstanceCount::increment(this);
0097 }
0098 
0099 /// Default destructor
0100 ReadoutObject::~ReadoutObject() {
0101   //destroyHandle(segmentation);
0102   InstanceCount::decrement(this);
0103   if ( segmentation.isValid() )  {
0104     delete segmentation.ptr();
0105     segmentation = Segmentation();
0106   }
0107 }
0108 
0109 DD4HEP_INSTANTIATE_HANDLE_NAMED(IDDescriptorObject);
0110 
0111 /// Standard constructor
0112 IDDescriptorObject::IDDescriptorObject()
0113   : NamedObject(), decoder()   {
0114   InstanceCount::increment(this);
0115 }
0116 
0117 /// Standard constructor
0118 IDDescriptorObject::IDDescriptorObject(const std::string& desc)
0119   : NamedObject(), decoder(desc)   {
0120   InstanceCount::increment(this);
0121 }
0122 
0123 /// Default destructor
0124 IDDescriptorObject::~IDDescriptorObject() {
0125   InstanceCount::decrement(this);
0126 }
0127