00001 00002 // 00003 // CandCluster3DHandle (based on R. Lee's CandClusterSRHandle) 00004 // 00005 // CandCluster3DHandle is the handle to CandCluster3D 00006 // 00007 // Each concrete CandHandle must define a DupHandle function. 00008 // 00009 // Author: K.Grzelak1@physics.ox.ac.uk 00010 // 00012 00013 #include <cassert> 00014 #include <iostream> 00015 00016 #include "Cluster3D/CandCluster3DHandle.h" 00017 #include "Cluster3D/CandCluster3D.h" 00018 #include "MessageService/MsgService.h" 00019 #include "RecoBase/CandSliceHandle.h" 00020 #include "RecoBase/CandStripHandle.h" 00021 00022 ClassImp(CandCluster3DHandle) 00023 00024 CVSID("$Id: CandCluster3DHandle.cxx,v 1.4 2007/03/01 17:24:59 rhatcher Exp $"); 00025 00026 //______________________________________________________________________ 00027 CandCluster3DHandle::CandCluster3DHandle() 00028 { 00029 } 00030 00031 //______________________________________________________________________ 00032 CandCluster3DHandle::CandCluster3DHandle(const CandCluster3DHandle &cdh) : 00033 CandRecoHandle(cdh) 00034 { 00035 } 00036 00037 //______________________________________________________________________ 00038 CandCluster3DHandle::CandCluster3DHandle(const CandRecoHandle &cdh) : 00039 CandRecoHandle(cdh) 00040 { 00041 } 00042 00043 //______________________________________________________________________ 00044 CandCluster3DHandle::CandCluster3DHandle(CandCluster3D *cd) : 00045 CandRecoHandle(cd) 00046 { 00047 } 00048 00049 //______________________________________________________________________ 00050 CandCluster3DHandle::~CandCluster3DHandle() 00051 { 00052 } 00053 00054 //______________________________________________________________________ 00055 CandCluster3DHandle *CandCluster3DHandle::DupHandle() const 00056 { 00057 return (new CandCluster3DHandle(*this)); 00058 } 00059 00060 00061 //______________________________________________________________________ 00062 void CandCluster3DHandle::Trace(const char *c) const 00063 { 00064 MSG("Cand", Msg::kDebug) 00065 << "**********Begin CandCluster3DHandle::Trace(\"" << c << "\")" << endl 00066 << "Information from CandCluster3DHandle's CandHandle: " << endl; 00067 CandHandle::Trace(c); 00068 MSG("Cand", Msg::kDebug) 00069 << "**********End CandCluster3DHandle::Trace(\"" << c << "\")" << endl; 00070 } 00071 /* 00072 NavKey CandCluster3DHandle::KeyFromObject(const CandCluster3DHandle *cluster) 00073 { 00074 if (cluster->IsShowerLike()) { 00075 return 1; 00076 } 00077 if (cluster->IsTrackLike()) { 00078 return 2; 00079 } 00080 return 0; 00081 } 00082 */ 00083 Bool_t CandCluster3DHandle::IsTrackLike() const 00084 { 00085 return dynamic_cast<const CandCluster3D *>(GetCandBase())->fTrackLike; 00086 00087 } 00088 00089 Bool_t CandCluster3DHandle::IsShowerLike() const 00090 { 00091 return dynamic_cast<const CandCluster3D *>(GetCandBase())->fShowerLike; 00092 00093 } 00094 00095 void CandCluster3DHandle::IsTrackLike(Bool_t bvar) 00096 { 00097 dynamic_cast<CandCluster3D *>(GetOwnedCandBase())->fTrackLike = bvar; 00098 00099 } 00100 00101 void CandCluster3DHandle::IsShowerLike(Bool_t bvar) 00102 { 00103 dynamic_cast<CandCluster3D *>(GetOwnedCandBase())->fShowerLike = bvar; 00104 00105 } 00106 00107 /* 00108 NavKey CandCluster3DHandle::KeyFromView(const CandCluster3DHandle *cluster) 00109 { 00110 if (const CandStripHandle *strip = 00111 dynamic_cast<const CandStripHandle *>(cluster->FindDaughter())) { 00112 return static_cast<Int_t>(const_cast<CandStripHandle *> 00113 (strip)->GetStripEndId().GetPlaneView()); 00114 } 00115 else { 00116 return static_cast<Int_t>(PlaneView::kUnknown); 00117 } 00118 00119 } 00120 00121 NavKey CandCluster3DHandle::KeyFromSlice(const CandCluster3DHandle *cluster) 00122 { 00123 if (cluster->GetCandSlice()) { 00124 return static_cast<Int_t>(cluster->GetCandSlice()->GetUidInt()); 00125 } 00126 else { 00127 return 0; 00128 } 00129 00130 } 00131 */ 00132 XXXITRIMP(CandCluster3DHandle)
1.3.9.1