X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONCluster.cxx;h=df5f10b58e4e9c7ef878cde48d7802507d91d1bb;hb=34ef8842db593b9c9802674dbd85ebea005889ae;hp=2ab947e661bf03f99a54c23ba191df8ce51d5af5;hpb=6e97fbb8cd3f6c541db069b487f1fcac52398d32;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONCluster.cxx b/MUON/AliMUONCluster.cxx index 2ab947e661b..df5f10b58e4 100644 --- a/MUON/AliMUONCluster.cxx +++ b/MUON/AliMUONCluster.cxx @@ -40,6 +40,8 @@ /// //----------------------------------------------------------------------------- +using std::cout; +using std::endl; /// \cond CLASSIMP ClassImp(AliMUONCluster) /// \endcond @@ -144,6 +146,7 @@ AliMUONCluster::operator=(const AliMUONCluster& src) AliMUONCluster::~AliMUONCluster() { /// dtor : note that we're owner of our pads +// fPads.Delete(); } //_____________________________________________________________________________ @@ -152,6 +155,7 @@ AliMUONCluster::Clear(Option_t*) { /// Clear our pad array fPads.Clear(); +// fPads.Delete(); } //_____________________________________________________________________________ @@ -310,6 +314,14 @@ AliMUONCluster::Area(Int_t cathode) const (upperRight-lowerLeft).X()/2, (upperRight-lowerLeft).Y()/2); } +//_____________________________________________________________________________ +Bool_t +AliMUONCluster::IsMonoCathode() const +{ + /// Whether we have signals only in one of the two cathodes + return (Cathode()<2); +} + //_____________________________________________________________________________ Int_t AliMUONCluster::Cathode() const @@ -345,8 +357,15 @@ AliMUONCluster::Copy(TObject& obj) const /// TObject::Copy(obj); AliMUONCluster& dest = static_cast(obj); - dest.fPads.Delete(); - dest.fPads = fPads; + +// dest.fPads.Delete(); + dest.fPads.Clear(); + + for ( Int_t i = 0; i <= fPads.GetLast(); ++i ) + { + AliMUONPad* p = static_cast(fPads.UncheckedAt(i)); + dest.fPads.AddLast(new AliMUONPad(*p)); + } dest.fHasPosition = fHasPosition; dest.fPosition = fPosition; dest.fPositionError = fPositionError; @@ -648,7 +667,7 @@ AliMUONCluster::DumpMe() const // cout << " " << Area() << endl; for (Int_t i = 0; i < fPads.GetSize(); ++i) { - cout << Form("fPads[%d]=%x",i,fPads.At(i)) << endl; + cout << Form("fPads[%d]=%p",i,fPads.At(i)) << endl; if ( fPads.At(i) ) fPads.At(i)->Print(); } } @@ -744,6 +763,7 @@ AliMUONCluster::RemovePad(AliMUONPad* pad) fPads.Remove(pad); fPads.Compress(); + delete pad; // update cluster's data fIsSaturated[0]=fIsSaturated[1]=kFALSE; fMultiplicity[0]=fMultiplicity[1]=0;