]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSClusterizerv2.cxx
Replacing iostream.h by Riostream.h
[u/mrichter/AliRoot.git] / PHOS / AliPHOSClusterizerv2.cxx
index 76d32dfb308a214c930d14b33b872f41c7cfc58a..7fa234aebdc580fda8a685c14e0cd7ff070e5a81 100644 (file)
@@ -3,8 +3,6 @@
 #include "TROOT.h"
 
 // --- Standard library ---
-#include <iostream.h>
-#include <iomanip.h>
 
 // --- AliRoot header files ---
 #include "AliPHOSClusterizerv2.h"
@@ -19,8 +17,8 @@ ClassImp(AliPHOSClusterizerv2)
 AliPHOSClusterizerv2::AliPHOSClusterizerv2() : AliPHOSClusterizerv1() 
 {}
 
-AliPHOSClusterizerv2::AliPHOSClusterizerv2(const char* File, const char* name):
-  AliPHOSClusterizerv1(File,name)
+AliPHOSClusterizerv2::AliPHOSClusterizerv2(const char * headerFile, const char * name, const Bool_t toSplit):
+AliPHOSClusterizerv1(headerFile,name,toSplit)
 {}
 
 void AliPHOSClusterizerv2::GetNumberOfClustersFound(int* numb) const
@@ -42,10 +40,9 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
 
   AliPHOSGetter * gime = AliPHOSGetter::GetInstance() ; 
 
-  TFolder* aliceF  = (TFolder*)gROOT->FindObjectAny("YSAlice");
-  TFolder* storage = (TFolder*)aliceF->FindObject("WhiteBoard/RecPoints/PHOS"); 
-  TFolder* wPoolF = storage->AddFolder("SmP","SmartRecPoints for PHOS");
-    
+  TFolder* storage = dynamic_cast<TFolder*>(gROOT->FindObjectAny("Folders/Run/Event/RecData/RecPoints/PHOS")); 
+  TFolder* wPoolF =  storage->AddFolder("SmP","SmartRecPoints for PHOS");
+  
   TObjArray* wPool = new TObjArray(400);
   wPool->SetName("SmartPoints");
   wPoolF->Add(wPool);
@@ -63,9 +60,9 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
 //      if(!ReadDigits(ievent))  //reads digits for event fEvent
 //        continue;
     
-    cout<<" MakeClusters invoked..";
+    Info("Exec", "MakeClusters invoked..") ;
     MakeClusters() ;
-    cout<<" done."<<endl;
+    Info("Exec", "MakeClusters done.") ;
 
 
     //SmartRecPoints will communicate with wPool.
@@ -77,7 +74,9 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     AliPHOSRecCpvManager* recCpv = new AliPHOSRecCpvManager();
     wPoolF->Add(recCpv);
 
-    for(Int_t iPoint=0; iPoint<gime->CpvRecPoints()->GetEntriesFast(); iPoint++) {
+    Int_t iPoint; //loop variable
+
+    for(iPoint=0; iPoint<gime->CpvRecPoints()->GetEntriesFast(); iPoint++) {
       rp = new AliPHOSEvalRecPoint(iPoint,AliPHOSEvalRecPoint::cpv);
       rp->MakeJob();
     }
@@ -90,7 +89,9 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     cpvRecPoints->Delete();
     cpvRecPoints->Compress();
 
-    for(Int_t i=0; i<wPool->GetEntries(); i++)
+    Int_t i; //loop variable
+
+    for(i=0; i<wPool->GetEntries(); i++)
       cpvRecPoints->Add(wPool->At(i));
 
     wPool->Clear();
@@ -99,8 +100,8 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     wPoolF->Remove(recCpv);
     delete recCpv;
 
-    cout<<"       "<<gime->CpvRecPoints()->GetEntries()<<endl;
-    cout<<"       "<<cpvRecPoints->GetEntries()<<" cpvRecPoints."<<endl<<endl;
+    Info("Exec", "       %d", gime->CpvRecPoints()->GetEntries() ) ;
+    Info("Exec", "       %d cpvRecPoints", cpvRecPoints->GetEntries() ) ;
 
 
     // Now Emc reconstruction
@@ -108,8 +109,8 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     AliPHOSRecEmcManager* recEmc = new AliPHOSRecEmcManager();
     wPoolF->Add(recEmc);
 
-    for(Int_t iPoint=0; iPoint<gime->EmcRecPoints()->GetEntriesFast(); iPoint++) {
-      rp = new AliPHOSEvalRecPoint(iPoint,AliPHOSEvalRecPoint::emc);
+    for(iPoint=0; iPoint<gime->EmcRecPoints()->GetEntriesFast(); iPoint++) {
+      rp = new AliPHOSEvalRecPoint(iPoint,(Bool_t)AliPHOSEvalRecPoint::emc);
       rp->MakeJob();
     }
 
@@ -120,7 +121,7 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     emcRecPoints->Delete();
     emcRecPoints->Compress();
 
-    for(Int_t i=0; i<wPool->GetEntries(); i++)
+    for(i=0; i<wPool->GetEntries(); i++)
       emcRecPoints->Add(wPool->At(i));
 
     wPool->Clear();
@@ -129,13 +130,20 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
     wPoolF->Remove(recEmc);
     delete recEmc;
 
-    cout<<"       "<<nOldCpv<<" OLD cpvRecPoints."<<endl;
-    cout<<"       "<<gime->CpvRecPoints()->GetEntries()<<endl;
-    cout<<"       "<<cpvRecPoints->GetEntries()<<" cpvRecPoints."<<endl<<endl;
+    TString message ; 
+    message  = "       %d  OLD cpvRecPoints\n" ; 
+    message += "       %d\n" ; 
+    message += "       %d cpvRecPoints\n" ; 
+
+    message += "       %d OLD emcRecPoints " ; 
+    message += "       %d\n" ;
+    message += "       %d emcRecPoints\n" ;
 
-    cout<<"       "<<nOldEmc<<" OLD emcRecPoints."<<endl;
-    cout<<"       "<<gime->EmcRecPoints()->GetEntries()<<endl;
-    cout<<"       "<<emcRecPoints->GetEntries()<<" emcRecPoints."<<endl<<endl;
+    Info("Exec", message.Data(), 
+        nOldCpv, 
+        gime->CpvRecPoints()->GetEntries(),cpvRecPoints->GetEntries(), 
+        nOldEmc, 
+        gime->EmcRecPoints()->GetEntries(), emcRecPoints->GetEntries() ) ; 
 
     WriteRecPoints(ievent);
 
@@ -144,14 +152,10 @@ void AliPHOSClusterizerv2::Exec(Option_t* option)
 
   if(strstr(option,"tim")) {
     gBenchmark->Stop("PHOSClusterizer");
-    cout << "AliPHOSClusterizer:" << endl ;
-    cout << "  took " << gBenchmark->GetCpuTime("PHOSClusterizer") << " seconds for Clusterizing " << endl;
-    cout << endl ;
-
+    Info("Exec","took %f seconds for Clusterizing", gBenchmark->GetCpuTime("PHOSClusterizer") ) ;
   }
-
 }
-
+//---------------------------------------------------------------------------------
 Int_t AliPHOSClusterizerv2::AreNeighbours(AliPHOSDigit* d1, AliPHOSDigit* d2) const
 {
   // Points are neighbours if they have common edge.
@@ -195,11 +199,6 @@ Int_t AliPHOSClusterizerv2::AreNeighbours(AliPHOSDigit* d1, AliPHOSDigit* d2) co
 
   }
 
-//    //Do NOT clusterize upper PPSD  // YVK 30.09.2001
-//    if( IsInPpsd(d1) && IsInPpsd(d2) &&
-//       relid1[1] > 0                 &&
-//       relid1[1] < geom->GetNumberOfPadsPhi()*geom->GetNumberOfPadsPhi() ) rv = 2 ;
-
   return rv ; 
 
 }