Changeset 9571
- Timestamp:
- 04/19/10 13:11:19 (15 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9570 r9571 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2010/04/19 Thomas Bretz 22 23 * mase/MStatusArray.cc: 24 - added a workaround to prevent crashes in case of double 25 deleteion of the fHistogram in TGraphs 26 27 * mcorsika/MCorsikaEvtHeader.cc: 28 - replaced special characters by UTF8 characters 29 30 * mgeom/MGeom.[h,cc]: 31 - implemented function to return the distance squared 32 33 20 34 21 35 2010/04/13 Daniela Dorner -
trunk/MagicSoft/Mars/mbase/MStatusArray.cc
r9569 r9571 49 49 #include <TCanvas.h> 50 50 51 #include <TGraph.h> // For the TGraph workaround 52 #include <TPaveText.h> // For the TPaveText workaround 53 51 54 #include "MLog.h" 52 55 #include "MLogManip.h" … … 56 59 57 60 ClassImp(MStatusArray); 58 59 #include <TGraph.h>60 61 61 62 using namespace std; … … 77 78 // name) recuresively 78 79 // 79 #include<TPaveText.h>80 80 void MStatusArray::RecursiveDelete(TVirtualPad *p, const char id) const 81 81 { … … 98 98 continue; 99 99 100 /* 101 // This is necessary because the histogram can get deleted 102 // but is not treated in TGraph recursive remove. Unfortunately, 103 // we have no possibility to find out whether it was already 104 // deleted. Fortunately these histograms don't contain data 105 // and threfore don't consume memory. 106 TGraph *g = dynamic_cast<TGraph*>(o); 107 if (g) 108 g->SetHistogram(0); 109 */ 110 100 111 delete o; 101 112 … … 153 164 if (dynamic_cast<TGraph*>(o)) 154 165 { 166 // FIXME: This should not be called for the TGraph 167 // which is currently getting deleted. 155 168 TGraph *g = static_cast<TGraph*>(o); 156 169 if (g->GetHistogram()==obj) 157 170 g->SetHistogram(0); 171 else 172 g->GetHistogram()->SetBit(kMustCleanup); 158 173 159 174 continue; … … 175 190 TObjArray::RecursiveRemove(obj); 176 191 192 // FIXME: Maybe we still have to call SetBit(kMustCleanup) ??? 193 #if ROOT_VERSION_CODE <= ROOT_VERSION(5,26,00) 177 194 TObject *o = 0; 178 195 … … 180 197 while ((o=Next())) 181 198 RecursiveRemove(dynamic_cast<TVirtualPad*>(o), obj); 199 #endif 182 200 } 183 201 -
trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc
r9524 r9571 18 18 ! Author(s): Thomas Bretz 11/2008 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: Software Development, 2000-20 0920 ! Copyright: Software Development, 2000-2010 21 21 ! 22 22 ! … … 106 106 // *fLog << "Particle ID: " << MMcEvt::GetParticleName(fParticleID) << endl; 107 107 *fLog << "Energy: " << fTotalEnergy << "GeV" << endl; 108 *fLog << "Starting Altitude: " << fStartAltitude << "g/cm ²"<< endl;108 *fLog << "Starting Altitude: " << fStartAltitude << "g/cm" << UTF8::kSquare << endl; 109 109 *fLog << "Number of 1st Target: " << fFirstTargetNum << endl, 110 110 *fLog << "Height of 1st Interaction: " << fFirstInteractionHeight/100. << "m" << endl; 111 111 *fLog << "Momentum X/Y/Z (GeV/c): " << fMomentumX << "/" << fMomentumY << "/" << fMomentumZ << endl; 112 *fLog << "Zenith/Azimuth Angle: " << fZd*TMath::RadToDeg() << "°/" << fAz*TMath::RadToDeg() << "°"<< endl;112 *fLog << "Zenith/Azimuth Angle: " << fZd*TMath::RadToDeg() << UTF8::kDeg << "/" << fAz*TMath::RadToDeg() << UTF8::kDeg << endl; 113 113 *fLog << "Impact X/Y: " << fX/100. << "m/" << fY/100. << "m (r=" << TMath::Hypot(fX, fY)/100. << "m)" << endl; 114 114 *fLog << "Weighted Num Photons: " << fWeightedNumPhotons << endl; -
trunk/MagicSoft/Mars/mgeom/MGeom.cc
r9385 r9571 158 158 // ------------------------------------------------------------------------ 159 159 // 160 // Return distance squared of center to center of pix: 161 // (fX-pix.fX)^2+(fY-pix.fY)^2 162 // 163 Float_t MGeom::GetDist2(const MGeom &pix) const 164 { 165 const Double_t dx = fX-pix.fX; 166 const Double_t dy = fY-pix.fY; 167 return dx*dx + dy*dy; 168 } 169 170 // ------------------------------------------------------------------------ 171 // 160 172 // Return angle defined by the center and the center of pix: 161 173 // atan2(fX-pix.fX,fY-pix.fY) -
trunk/MagicSoft/Mars/mgeom/MGeom.h
r9385 r9571 87 87 Float_t GetDist() const; 88 88 Float_t GetDist(const MGeom &pix) const; 89 Float_t GetDist2(const MGeom &pix) const; 89 90 Float_t GetAngle(const MGeom &pix) const; 90 91
Note:
See TracChangeset
for help on using the changeset viewer.