From: ivana Date: Mon, 2 Jul 2007 16:35:48 +0000 (+0000) Subject: Getting rid of setprecision in Print and changing Compare method (Laurent) X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=deca4734591b90126a972bd159b700ed6596450d;p=u%2Fmrichter%2FAliRoot.git Getting rid of setprecision in Print and changing Compare method (Laurent) --- diff --git a/MUON/AliMUONRawCluster.cxx b/MUON/AliMUONRawCluster.cxx index ed0616513a0..0281476196e 100644 --- a/MUON/AliMUONRawCluster.cxx +++ b/MUON/AliMUONRawCluster.cxx @@ -82,14 +82,27 @@ Int_t AliMUONRawCluster::Compare(const TObject *obj) const else if (rfY[0]; if (y>yo) return 1; else if (y(obj); + if ( GetCharge(0) > raw->GetCharge(0) ) + { + return 1; + } + else if ( GetCharge(0) < raw->GetCharge(0) ) + { + return -1; + } + return 0; } + //____________________________________________________ Int_t AliMUONRawCluster::BinarySearch(Float_t y, TArrayF coord, Int_t from, Int_t upto) { @@ -194,11 +207,11 @@ void AliMUONRawCluster::Print(Option_t* opt) const TString sopt(opt); sopt.ToUpper(); - cout << ": DetEle=" << setw(4) << GetDetElemId() << - ", (x,y,z)=(" << setw(8) << setprecision(5) << GetX() << "," << setw(8) - << setprecision(5) << GetY() << "," << setw(8) << setprecision(5) << GetZ() << - ") cm, Chi2=" << setw(8) << setprecision(3) << GetChi2() << - ", Q=" << setw(4) << GetCharge(); + cout << Form(": DetEle=%4d (x,y,z)=(%7.4f,%7.4f,%7.4f) cm" + " Chi2=%7.2f Q=%7.2f", + GetDetElemId(),GetX(),GetY(),GetZ(),GetChi2(), + GetCharge()); + if ( sopt.Contains("FULL") ) { cout << ", Hit=" << setw(4) << GetTrack(0) <<