#include "Ring.h" #include #include #include "Led.h" #include "Leds.h" #include "Rings.h" #include "MString.h" ClassImp(Ring); using namespace std; Ring::Ring(Double_t x, Double_t y) : fX(x), fY(y), fR(0), fPhi(0), fDx(-1), fDy(-1), fDr(-1), fDphi(-1) { } bool Ring::CalcCenter(const Leds &leds, Int_t i, Int_t j, Int_t k) { if (leds.At(i)==NULL) { cout << "Ring::CalcCenter: Led i=" << i << " is NULL." << endl; return kFALSE; } if (leds.At(j)==NULL) { cout << "Ring::CalcCenter: Led j=" << j << " is NULL." << endl; return kFALSE; } if (leds.At(k)==NULL) { cout << "Ring::CalcCenter: Led k=" << k << " is NULL." << endl; return kFALSE; } Double_t h1 = leds(i).GetY()- leds(j).GetY(); if (h1==0) { Swap(j, k); h1 = leds(i).GetY()- leds(j).GetY(); if (h1==0) { cout << "Ring::CalcCenter: h1==0" <