00001 00002 // $Id: CandShowerEMHandle.cxx,v 1.2 2004/08/25 05:26:21 cbs Exp $ 00003 // 00004 // CandShowerEMHandle 00005 // 00006 // CandShowerEMHandle is the specialized access handle to CandShowerEM. 00007 // 00008 // Each concrete CandHandle must define a DupHandle function. 00009 // 00010 // Author: R. Lee 2001.02.21 00012 00013 #include <cassert> 00014 #include <iostream> 00015 00016 #include "CandShowerEM/CandShowerEMHandle.h" 00017 #include "CandShowerEM/CandShowerEM.h" 00018 #include "MessageService/MsgService.h" 00019 #include "RecoBase/CandClusterHandle.h" 00020 00021 ClassImp(CandShowerEMHandle) 00022 00023 //______________________________________________________________________ 00024 CVSID("$Id: CandShowerEMHandle.cxx,v 1.2 2004/08/25 05:26:21 cbs Exp $"); 00025 00026 //______________________________________________________________________ 00027 CandShowerEMHandle::CandShowerEMHandle() 00028 { 00029 } 00030 00031 //______________________________________________________________________ 00032 CandShowerEMHandle::CandShowerEMHandle(const CandShowerEMHandle &cdh) : 00033 CandShowerHandle(cdh) 00034 { 00035 } 00036 //______________________________________________________________________ 00037 CandShowerEMHandle::CandShowerEMHandle(const CandShowerHandle &cdh) : 00038 CandShowerHandle(cdh) 00039 { 00040 } 00041 00042 //______________________________________________________________________ 00043 CandShowerEMHandle::CandShowerEMHandle(CandShowerEM *cd) : 00044 CandShowerHandle(cd) 00045 { 00046 } 00047 00048 //______________________________________________________________________ 00049 CandShowerEMHandle::~CandShowerEMHandle() 00050 { 00051 } 00052 00053 //______________________________________________________________________ 00054 CandShowerEMHandle *CandShowerEMHandle::DupHandle() const 00055 { 00056 return (new CandShowerEMHandle(*this)); 00057 } 00058 00059 //______________________________________________________________________ 00060 const Double_t *CandShowerEMHandle::GetEigenVectors() const 00061 { 00062 return dynamic_cast<const CandShowerEM *>(GetCandBase())->EigenVector; 00063 } 00064 00065 //______________________________________________________________________ 00066 const Double_t *CandShowerEMHandle::GetEigenValues() const 00067 { 00068 return dynamic_cast<const CandShowerEM *>(GetCandBase())->EigenValue; 00069 } 00070 00071 //______________________________________________________________________ 00072 const Double_t *CandShowerEMHandle::GetAvgDev() const 00073 { 00074 return dynamic_cast<const CandShowerEM *>(GetCandBase())->AvgDev; 00075 } 00076 00077 //______________________________________________________________________ 00078 const Double_t *CandShowerEMHandle::GetOutPH() const 00079 { 00080 return dynamic_cast<const CandShowerEM *>(GetCandBase())->OutPH; 00081 } 00082 00083 //______________________________________________________________________ 00084 Int_t CandShowerEMHandle::GetShwStatus() const 00085 { 00086 return dynamic_cast<const CandShowerEM *>(GetCandBase())->ShwStatus; 00087 } 00088 00089 //______________________________________________________________________ 00090 void CandShowerEMHandle::SetEigenVectors(const Double_t *ev) 00091 { 00092 00093 if(ev) { 00094 for(int i=0;i<8;i++){ 00095 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->EigenVector[i]=ev[i]; 00096 } 00097 } 00098 else { 00099 for(int i=0;i<8;i++){ 00100 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->EigenVector[i]=0.; 00101 } 00102 } 00103 00104 } 00105 00106 //______________________________________________________________________ 00107 void CandShowerEMHandle::SetEigenValues(const Double_t *ev) 00108 { 00109 00110 if(ev) { 00111 for(int i=0;i<4;i++){ 00112 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->EigenValue[i]=ev[i]; 00113 } 00114 } 00115 else { 00116 for(int i=0;i<4;i++){ 00117 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->EigenValue[i]=0.; 00118 } 00119 } 00120 00121 } 00122 00123 //______________________________________________________________________ 00124 void CandShowerEMHandle::SetAvgDev(const Double_t *ad) 00125 { 00126 00127 if(ad) { 00128 for(int i=0;i<4;i++){ 00129 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->AvgDev[i]=ad[i]; 00130 } 00131 } 00132 else { 00133 for(int i=0;i<4;i++){ 00134 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->AvgDev[i]=0.; 00135 } 00136 } 00137 00138 } 00139 00140 //______________________________________________________________________ 00141 void CandShowerEMHandle::SetOutPH(const Double_t *op) 00142 { 00143 00144 if(op) { 00145 for(int i=0;i<5;i++){ 00146 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->OutPH[i]=op[i]; 00147 } 00148 } 00149 else { 00150 for(int i=0;i<5;i++){ 00151 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->OutPH[i]=0.; 00152 } 00153 } 00154 00155 } 00156 00157 //______________________________________________________________________ 00158 void CandShowerEMHandle::SetShwStatus(Int_t ss) 00159 { 00160 dynamic_cast<CandShowerEM *>(GetOwnedCandBase())->ShwStatus = ss; 00161 } 00162 00163 //______________________________________________________________________ 00164 void CandShowerEMHandle::Trace(const char *c) const 00165 { 00166 MSG("Cand", Msg::kDebug) 00167 << "*******Begin CandShowerEMHandle::Trace(\"" << c << "\")" << endl 00168 << "Information from CandShowerEMHandle's CandHandle: " << endl; 00169 CandHandle::Trace(c); 00170 MSG("Cand", Msg::kDebug) 00171 << "*******End CandShowerEMHandle::Trace(\"" << c << "\")" << endl; 00172 } 00173 00174 XXXITRIMP(CandShowerEMHandle)
1.3.9.1