]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONClusterFinderPeakCOG.cxx
TPC PID update:
[u/mrichter/AliRoot.git] / MUON / AliMUONClusterFinderPeakCOG.cxx
index 9202e16cb7c37c0aa6e2fc3b6bbf38422f1bef63..83cbe8fc6146dadb550436a097c197351c574544 100644 (file)
@@ -45,6 +45,8 @@
 //#include <TCanvas.h>
 #include <TMath.h>
 
+using std::endl;
+using std::cout;
 /// \cond CLASSIMP
 ClassImp(AliMUONClusterFinderPeakCOG)
 /// \endcond
@@ -98,7 +100,7 @@ AliMUONClusterFinderPeakCOG::~AliMUONClusterFinderPeakCOG()
 
 //_____________________________________________________________________________
 Bool_t 
-AliMUONClusterFinderPeakCOG::Prepare(Int_t detElemId, TClonesArray* pads[2],
+AliMUONClusterFinderPeakCOG::Prepare(Int_t detElemId, TObjArray* pads[2],
                                      const AliMpArea& area, 
                                      const AliMpVSegmentation* seg[2])
 {
@@ -693,6 +695,9 @@ Int_t AliMUONClusterFinderPeakCOG::FindLocalMaxima(TObjArray *pixArray, Int_t *l
   Double_t xylim[4] = {999, 999, 999, 999};
 
   Int_t nPix = pixArray->GetEntriesFast();
+  
+  if ( nPix <= 0 ) return 0;
+  
   AliMUONPad *pixPtr = 0;
   for (Int_t ipix = 0; ipix < nPix; ++ipix) {
     pixPtr = (AliMUONPad*) pixArray->UncheckedAt(ipix);