]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MONITOR/AliMonitorProcess.cxx
Fixed compiler warnings
[u/mrichter/AliRoot.git] / MONITOR / AliMonitorProcess.cxx
index a0dbcaa71d6a22d889714b1507d8fbcfed90a67d..9cfe950da8ce7e0b3d52d58c26d07be5bc58b4a5 100644 (file)
 #include <TSocket.h>
 
 #include "AliLog.h"
-#include "AliESD.h"
-#include "AliITS.h"
+#include "AliESDEvent.h"
 #include "AliITSclustererV2.h"
+#include "AliITSgeom.h"
 #include "AliITStrackerV2.h"
 #include "AliLoader.h"
+// Matthias 2007-10-03 HLT legacy code disabled
+// everything encapsulated by ENABLE_ALIMONITORPROCESS_HLT
+// set the define in the header file to include the code
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
 #include "AliMonitorHLT.h"
 #include "AliMonitorHLTHough.h"
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 #include "AliMonitorITS.h"
 #include "AliMonitorProcess.h"
 #include "AliMonitorTPC.h"
 #include "AliTPCtrackerMI.h"
 #include "AliV0vertexer.h"
 
-#include <AliL3StandardIncludes.h>
-#include <AliL3MemHandler.h>
-#include <AliL3ClusterFitter.h>
-#include <AliL3Fitter.h>
-#include <AliL3Hough.h>
-#include <AliL3HoughBaseTransformer.h>
-#include <AliL3StandardIncludes.h>
-#include <AliL3Track.h>
-#include <AliL3TrackArray.h>
-#include <AliL3Transform.h>
-#include <AliL3Vertex.h>
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
+#include <AliHLTStandardIncludes.h>
+#include <AliHLTMemHandler.h>
+#include <AliHLTClusterFitter.h>
+#include <AliHLTFitter.h>
+#include <AliHLTHough.h>
+#include <AliHLTHoughBaseTransformer.h>
+#include <AliHLTStandardIncludes.h>
+#include <AliHLTTrack.h>
+#include <AliHLTTrackArray.h>
+#include <AliHLTTransform.h>
+#include <AliHLTVertex.h>
 #include <AliLevel3.h>
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
 ClassImp(AliMonitorProcess)
 
@@ -140,16 +147,16 @@ AliMonitorProcess::AliMonitorProcess(
   fRunLoader->LoadgAlice();
   gAlice = fRunLoader->GetAliRun();
   if (!gAlice) AliFatal("no gAlice object found");
-  AliITS* its = (AliITS*) gAlice->GetModule("ITS");
-  if (!its) AliFatal("no ITS detector found");
-  fITSgeom = its->GetITSgeom();
+  fITSgeom = (AliITSgeom*)gDirectory->Get("AliITSgeom");
   if (!fITSgeom) AliFatal("could not load ITS geometry");
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
   // Init TPC parameters for HLT
-  Bool_t isinit=AliL3Transform::Init(const_cast<char*>(fileNameGalice),kTRUE);
+  Bool_t isinit=AliHLTTransform::Init(const_cast<char*>(fileNameGalice),kTRUE);
   if(!isinit){
     AliFatal("Could not create transform settings, please check log for error messages!");
   }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
   fTopFolder = new TFolder("Monitor", "monitor histograms");
   fTopFolder->SetOwner(kTRUE);
@@ -157,8 +164,10 @@ AliMonitorProcess::AliMonitorProcess(
   if (IsSelected("TPC")) fMonitors.Add(new AliMonitorTPC(fTPCParam));
   if (IsSelected("ITS")) fMonitors.Add(new AliMonitorITS(fITSgeom));
   if (IsSelected("V0s")) fMonitors.Add(new AliMonitorV0s);
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
   if (IsSelected("HLTConfMap")) fMonitors.Add(new AliMonitorHLT(fTPCParam));
   if (IsSelected("HLTHough")) fMonitors.Add(new AliMonitorHLTHough(fTPCParam));
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
   for (Int_t iMonitor = 0; iMonitor < fMonitors.GetEntriesFast(); iMonitor++) {
     ((AliMonitor*) fMonitors[iMonitor])->CreateHistos(fTopFolder);
@@ -255,8 +264,10 @@ AliMonitorProcess::~AliMonitorProcess()
   delete fFile;
   gSystem->Unlink("monitor_tree.root");
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
   delete fHLT;
   delete fHLTHough;
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
   gSystem->RemoveSignalHandler(fInterruptHandler);
   delete fInterruptHandler;
@@ -434,8 +445,10 @@ Bool_t AliMonitorProcess::ProcessFile()
   if (nEvents <= 0) return kFALSE;
   AliDebug(1, Form("found %d event(s) in file %s",
                   nEvents, fFileName.Data()));
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
   if (IsSelected("HLTConfMap")) CreateHLT(fFileName);
   if (IsSelected("HLTHough")) CreateHLTHough(fFileName);
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
   // loop over the events
   for (Int_t iEvent = 0; iEvent < nEvents; iEvent++) {
@@ -460,7 +473,7 @@ Bool_t AliMonitorProcess::ProcessFile()
     AliInfo(Form("run: %d  event: %d %d\n", rawReader.GetRunNumber(),
                 rawReader.GetEventId()[0], rawReader.GetEventId()[1]));
 
-    AliESD esd;
+    AliESDEvent esd;
     if (IsSelected("TPC")) {
       CheckForConnections();
       if (!ReconstructTPC(&rawReader, &esd)) return kFALSE;
@@ -476,6 +489,7 @@ Bool_t AliMonitorProcess::ProcessFile()
       if (!ReconstructV0s(&esd)) return kFALSE;
       if (fStopping) break;
     }
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
     if (IsSelected("HLTConfMap")) {
       CheckForConnections();
       if (!ReconstructHLT(iEvent)) return kFALSE;
@@ -486,6 +500,7 @@ Bool_t AliMonitorProcess::ProcessFile()
       if (!ReconstructHLTHough(iEvent)) return kFALSE;
       if (fStopping) break;
     }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
     if (fDisplaySocket) fDisplaySocket->Send("new event");
 
@@ -524,6 +539,7 @@ Bool_t AliMonitorProcess::ProcessFile()
     if (fStopping) break;
   }
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
   if (fHLT) {
     delete fHLT;
     fHLT = NULL;
@@ -532,6 +548,7 @@ Bool_t AliMonitorProcess::ProcessFile()
     delete fHLTHough;
     fHLTHough = NULL;
   }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
   return kTRUE;
 }
@@ -599,7 +616,7 @@ Int_t AliMonitorProcess::GetNumberOfEvents(const char* fileName) const
 }
 
 //_____________________________________________________________________________
-Bool_t AliMonitorProcess::ReconstructTPC(AliRawReader* rawReader, AliESD* esd)
+Bool_t AliMonitorProcess::ReconstructTPC(AliRawReader* rawReader, AliESDEvent* esd)
 {
 // find TPC clusters and tracks
 
@@ -633,7 +650,7 @@ Bool_t AliMonitorProcess::ReconstructTPC(AliRawReader* rawReader, AliESD* esd)
 }
 
 //_____________________________________________________________________________
-Bool_t AliMonitorProcess::ReconstructITS(AliRawReader* rawReader, AliESD* esd)
+Bool_t AliMonitorProcess::ReconstructITS(AliRawReader* rawReader, AliESDEvent* esd)
 {
 // find ITS clusters and tracks
 
@@ -649,13 +666,13 @@ Bool_t AliMonitorProcess::ReconstructITS(AliRawReader* rawReader, AliESD* esd)
   // cluster finder
   AliDebug(1, "reconstructing clusters...");
   itsLoader->LoadRecPoints("recreate");
-  AliITSclustererV2 clusterer(fITSgeom);
+  AliITSclustererV2 clusterer(0);
   itsLoader->MakeRecPointsContainer();
   clusterer.Digits2Clusters(rawReader);
 
   // track finder
   AliDebug(1, "reconstructing tracks...");
-  AliITStrackerV2 tracker(fITSgeom);
+  AliITStrackerV2 tracker(0);
   tracker.LoadClusters(itsLoader->TreeR());
   tracker.Clusters2Tracks(esd);
   tracker.UnloadClusters();
@@ -665,7 +682,7 @@ Bool_t AliMonitorProcess::ReconstructITS(AliRawReader* rawReader, AliESD* esd)
 }
 
 //_____________________________________________________________________________
-Bool_t AliMonitorProcess::ReconstructV0s(AliESD* esd)
+Bool_t AliMonitorProcess::ReconstructV0s(AliESDEvent* esd)
 {
 // find V0s
 
@@ -674,14 +691,12 @@ Bool_t AliMonitorProcess::ReconstructV0s(AliESD* esd)
   // V0 finder
   AliDebug(1, "reconstructing V0s...");
   AliV0vertexer vertexer;
-  Double_t vtx[3];
-  esd->GetVertex()->GetXYZ(vtx);
-  vertexer.SetVertex(vtx);
   vertexer.Tracks2V0vertices(esd);
 
   return kTRUE;
 }
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
 //_____________________________________________________________________________
 void AliMonitorProcess::CreateHLT(const char* fileName)
 {
@@ -719,7 +734,9 @@ void AliMonitorProcess::CreateHLT(const char* fileName)
 
   fHLT->WriteFiles("./hlt/");
 }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
 //_____________________________________________________________________________
 void AliMonitorProcess::CreateHLTHough(const char* fileName)
 {
@@ -731,7 +748,7 @@ void AliMonitorProcess::CreateHLTHough(const char* fileName)
   char name[256];
   strcpy(name, fileName);
 
-  fHLTHough = new AliL3Hough();
+  fHLTHough = new AliHLTHough();
   fHLTHough->SetThreshold(4);
   fHLTHough->SetTransformerParams(140,150,0.5,-1);
   fHLTHough->SetPeakThreshold(9000,-1);// or 6000
@@ -740,7 +757,9 @@ void AliMonitorProcess::CreateHLTHough(const char* fileName)
   //  fHLTHough->GetMaxFinder()->SetThreshold(14000);
 
 }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
 //_____________________________________________________________________________
 Bool_t AliMonitorProcess::ReconstructHLT(Int_t iEvent)
 {
@@ -766,7 +785,9 @@ Bool_t AliMonitorProcess::ReconstructHLT(Int_t iEvent)
   gSystem->Exec(command);
   return kTRUE;
 }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
+#ifdef ENABLE_ALIMONITORPROCESS_HLT
 //_____________________________________________________________________________
 Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
 {
@@ -794,7 +815,7 @@ Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
   fHLTHough->WriteTracks("./hlt/hough");
 
   // Run cluster fitter
-  AliL3ClusterFitter *fitter = new AliL3ClusterFitter("./hlt");
+  AliHLTClusterFitter *fitter = new AliHLTClusterFitter("./hlt");
 
   // Set debug flag for the cluster fitter
   //  fitter->Debug();
@@ -807,7 +828,7 @@ Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
   //fitter->SetChiSqMax(5,kFALSE); //isolated clusters
   fitter->SetChiSqMax(5,kTRUE);  //overlapping clusters
 
-  Int_t rowrange[2] = {0,AliL3Transform::GetNRows()-1};
+  Int_t rowrange[2] = {0,AliHLTTransform::GetNRows()-1};
 
   // Takes input from global hough tracks produced by HT
   fitter->LoadSeeds(rowrange,kFALSE,iEvent);
@@ -816,12 +837,12 @@ Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
 
   for(Int_t islice = 0; islice <= 35; islice++)
     {
-      for(Int_t ipatch = 0; ipatch < AliL3Transform::GetNPatches(); ipatch++)
+      for(Int_t ipatch = 0; ipatch < AliHLTTransform::GetNPatches(); ipatch++)
        {
          // Read digits
          fHLTHough->GetMemHandler(ipatch)->Free();
          fHLTHough->GetMemHandler(ipatch)->Init(islice,ipatch);
-         AliL3DigitRowData *digits = (AliL3DigitRowData *)fHLTHough->GetMemHandler(ipatch)->AliAltroDigits2Memory(ndigits,iEvent);
+         AliHLTDigitRowData *digits = (AliHLTDigitRowData *)fHLTHough->GetMemHandler(ipatch)->AliAltroDigits2Memory(ndigits,iEvent);
 
          fitter->Init(islice,ipatch);
          fitter->SetInputData(digits);
@@ -831,15 +852,15 @@ Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
     }
 
   // Refit of the clusters
-  AliL3Vertex vertex;
+  AliHLTVertex vertex;
   //The seeds are the input tracks from circle HT
-  AliL3TrackArray *tracks = fitter->GetSeeds();
-  AliL3Fitter *ft = new AliL3Fitter(&vertex,1);
+  AliHLTTrackArray *tracks = fitter->GetSeeds();
+  AliHLTFitter *ft = new AliHLTFitter(&vertex,1);
 
   ft->LoadClusters("./hlt/fitter/",iEvent,kFALSE);
   for(Int_t i=0; i<tracks->GetNTracks(); i++)
     {
-      AliL3Track *track = tracks->GetCheckedTrack(i);
+      AliHLTTrack *track = tracks->GetCheckedTrack(i);
       if(!track) continue;
       if(track->GetNHits() < 20) continue;
       ft->SortTrackClusters(track);
@@ -863,6 +884,7 @@ Bool_t AliMonitorProcess::ReconstructHLTHough(Int_t iEvent)
   gSystem->Exec(command);
   return kTRUE;
 }
+#endif // ENABLE_ALIMONITORPROCESS_HLT
 
 //_____________________________________________________________________________
 Bool_t AliMonitorProcess::WriteHistos()
@@ -1096,27 +1118,6 @@ AliMonitorProcess::AliMonitorInterruptHandler::AliMonitorInterruptHandler
 // constructor: set process
 }
 
-//_____________________________________________________________________________
-AliMonitorProcess::AliMonitorInterruptHandler::AliMonitorInterruptHandler
-  (const AliMonitorInterruptHandler& handler):
-  TSignalHandler(handler)
-{
-// copy constructor
-
-  AliFatal("copy constructor not implemented");
-}
-
-//_____________________________________________________________________________
-AliMonitorProcess::AliMonitorInterruptHandler&
-  AliMonitorProcess::AliMonitorInterruptHandler::operator =
-  (const AliMonitorInterruptHandler& /*handler*/)
-{
-// assignment operator
-
-  AliFatal("assignment operator not implemented");
-  return *this;
-}
-
 //_____________________________________________________________________________
 Bool_t AliMonitorProcess::AliMonitorInterruptHandler::Notify()
 {