From f6c291ef75674e09f8dfa92a5672b1b95b31bb81 Mon Sep 17 00:00:00 2001 From: ivana Date: Wed, 17 Oct 2007 13:00:27 +0000 Subject: [PATCH] Removed an unnecessary method (Laurent) --- MUON/AliMUONClusterFinderMLEM.cxx | 58 ++++++------------------------- MUON/AliMUONClusterFinderMLEM.h | 9 ----- 2 files changed, 10 insertions(+), 57 deletions(-) diff --git a/MUON/AliMUONClusterFinderMLEM.cxx b/MUON/AliMUONClusterFinderMLEM.cxx index fe01f379259..b0c714e9258 100644 --- a/MUON/AliMUONClusterFinderMLEM.cxx +++ b/MUON/AliMUONClusterFinderMLEM.cxx @@ -44,10 +44,9 @@ #include #include #include -#include #include #include -//#include "AliCodeTimer.h" +#include "AliCodeTimer.h" /// \cond CLASSIMP ClassImp(AliMUONClusterFinderMLEM) @@ -76,7 +75,6 @@ fCathBeg(0), fPixArray(new TObjArray(20)), fDebug(0), fPlot(plot), -fTimers(new TObjArray(kLast)), fSplitter(0x0), fNClusters(0), fNAddVirtualPads(0) @@ -89,15 +87,6 @@ fNAddVirtualPads(0) if (!fgMinuit) fgMinuit = new TMinuit(8); - fTimers->SetOwner(kTRUE); - - for ( Int_t i = 0; i < kLast; ++i ) - { - TStopwatch* t = new TStopwatch; - fTimers->AddLast(new TStopwatch); - t->Start(kTRUE); - t->Stop(); - } if (fPlot) fDebug = 1; } @@ -108,12 +97,6 @@ AliMUONClusterFinderMLEM::~AliMUONClusterFinderMLEM() delete fgMinuit; fgMinuit = 0; delete fPixArray; fPixArray = 0; // delete fDraw; delete fPreClusterFinder; - for ( Int_t i = 0; i < kLast; ++i ) - { - AliInfo(Form("Timer %d",i)); - Timer(i)->Print(); - } - delete fTimers; delete fSplitter; AliInfo(Form("Total clusters %d AddVirtualPad needed %d", fNClusters,fNAddVirtualPads)); @@ -168,7 +151,7 @@ AliMUONCluster* AliMUONClusterFinderMLEM::NextCluster() { /// Return next cluster -// AliCodeTimerAuto("clustering + pre-clustering") +// AliCodeTimerAuto("") // if the list of clusters is not void, pick one from there TObject* o = fClusterList.At(++fClusterNumber); @@ -216,6 +199,8 @@ AliMUONClusterFinderMLEM::WorkOnPreCluster() /// Starting from a precluster, builds a pixel array, and then /// extract clusters from this array +// AliCodeTimerAuto("") + // Set saturation flag - it is not set if working directly with MC digits (w/out // creating raw data) !!! for (Int_t j = 0; j < fPreCluster->Multiplicity(); ++j) { @@ -276,9 +261,7 @@ AliMUONClusterFinderMLEM::WorkOnPreCluster() { FindCluster(*cluster,localMax, maxPos[i]); } - Timer(kMainLoop)->Start(kFALSE); MainLoop(*cluster,iSimple); - Timer(kMainLoop)->Stop(); if (i < nMax-1) { for (Int_t j=0; jMultiplicity(); ++j) @@ -317,16 +300,15 @@ AliMUONClusterFinderMLEM::CheckPrecluster(const AliMUONCluster& origCluster) { /// Check precluster in order to attempt to simplify it (mostly for /// two-cathode preclusters) - + +// AliCodeTimerAuto("") + if (origCluster.Multiplicity()==1) { // Disregard one-pad clusters (leftovers from splitting) return 0x0; } - Timer(kCheckPreCluster)->Start(kFALSE); - - AliMUONCluster* cluster = static_cast(origCluster.Clone()); AliDebug(2,"Start of CheckPreCluster="); @@ -344,24 +326,11 @@ AliMUONClusterFinderMLEM::CheckPrecluster(const AliMUONCluster& origCluster) } else { - rv = CheckPreclusterOneCathode(cluster); + rv = cluster; } - Timer(kCheckPreCluster)->Stop(); return rv; } -//_____________________________________________________________________________ -AliMUONCluster* -AliMUONClusterFinderMLEM::CheckPreclusterOneCathode(AliMUONCluster* cluster) -{ - /// Check single-cathode precluster - AliWarning("Reimplement me!"); - AliDebug(2,"End of CheckPreClusterOneCathode="); -// StdoutToAliDebug(2,cluster->Print("full")); - - return cluster; -} - //_____________________________________________________________________________ AliMUONCluster* AliMUONClusterFinderMLEM::CheckPreclusterTwoCathodes(AliMUONCluster* cluster) @@ -928,6 +897,8 @@ Bool_t AliMUONClusterFinderMLEM::MainLoop(AliMUONCluster& cluster, Int_t iSimple { /// Repeat MLEM algorithm until pixel size becomes sufficiently small +// AliCodeTimerAuto("") + Int_t nPix = fPixArray->GetLast()+1; AliDebug(2,Form("nPix=%d iSimple=%d, precluster=",nPix,iSimple)); @@ -1425,15 +1396,6 @@ Int_t AliMUONClusterFinderMLEM::FindNearest(AliMUONPad *pixPtr0) return imin; } - -//_____________________________________________________________________________ -TStopwatch* -AliMUONClusterFinderMLEM::Timer(Int_t i) const -{ - /// Return timer at index i - return static_cast(fTimers->At(i)); -} - //_____________________________________________________________________________ void AliMUONClusterFinderMLEM::Paint(Option_t*) diff --git a/MUON/AliMUONClusterFinderMLEM.h b/MUON/AliMUONClusterFinderMLEM.h index d620b7c9092..147d159190b 100644 --- a/MUON/AliMUONClusterFinderMLEM.h +++ b/MUON/AliMUONClusterFinderMLEM.h @@ -15,7 +15,6 @@ class TH2D; class TClonesArray; class TMinuit; -class TStopwatch; #ifndef ROOT_TObjArray # include "TObjArray.h" @@ -56,7 +55,6 @@ private: /// Check precluster to simplify it (if possible), and return the simplified cluster AliMUONCluster* CheckPrecluster(const AliMUONCluster& cluster); AliMUONCluster* CheckPreclusterTwoCathodes(AliMUONCluster* cluster); - AliMUONCluster* CheckPreclusterOneCathode(AliMUONCluster* cluster); /// Checks whether a pad and a pixel have an overlapping area. Bool_t Overlap(const AliMUONPad& pad, const AliMUONPad& pixel); @@ -101,8 +99,6 @@ private: void CheckOverlaps(); - TStopwatch* Timer(Int_t i) const; - private: // Some constants @@ -134,11 +130,6 @@ private: Int_t fDebug; //!< debug level Bool_t fPlot; //!< whether we should plot thing (for debug only, quite slow!) - TObjArray* fTimers; //!< internal timers - - /// \todo add comment - enum ETimer { kMainLoop, kCheckPreCluster, kLast }; - AliMUONClusterSplitterMLEM* fSplitter; //!< helper class to go from pixel arrays to clusters Int_t fNClusters; //!< total number of clusters Int_t fNAddVirtualPads; //!< number of clusters for which we added virtual pads -- 2.43.0