* Bugfixes for 64Bit - 32Bit machines in the Source/Block Desc
authorjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Aug 2009 08:10:48 +0000 (08:10 +0000)
committerjthaeder <jthaeder@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Aug 2009 08:10:48 +0000 (08:10 +0000)
* Added loop for service detection in EveManager
* updated Macros for onlineDisplay
* cleaned up macro folder for onlineDisplay

17 files changed:
EVE/EveHLT/AliEveHOMERManager.cxx
EVE/EveHLT/AliEveHOMERManager.h
EVE/hlt-macros/HLT-logo.png [new file with mode: 0644]
EVE/hlt-macros/geom_gentle_hlt.C [new file with mode: 0644]
EVE/hlt-macros/geom_hlt.C [deleted file]
EVE/hlt-macros/hlt_alieve_init.C [new file with mode: 0644]
EVE/hlt-macros/homer_display.C [deleted file]
EVE/hlt-macros/onlineDisplay.C [new file with mode: 0644]
EVE/hlt-macros/rootlogon.C
EVE/hlt-macros/sampleConfig.xml [deleted file]
EVE/hlt-macros/sampleConfig_2.xml [deleted file]
EVE/hlt-macros/test_sources.C [deleted file]
HLT/BASE/AliHLTHOMERBlockDesc.cxx
HLT/BASE/AliHLTHOMERManager.cxx
HLT/BASE/AliHLTHOMERProxyHandler.cxx
HLT/BASE/AliHLTHOMERSourceDesc.cxx
HLT/exa/HOMERManager.C

index faab683..5a714ac 100644 (file)
@@ -17,6 +17,8 @@
    using namespace std;
 #endif
 
+#include "unistd.h"
+
 #include "AliEveHOMERManager.h"
 
 
@@ -32,7 +34,9 @@ ClassImp(AliEveHOMERManager)
 AliEveHOMERManager::AliEveHOMERManager() :
   AliHLTHOMERManager(), 
   TEveElementList("Homer Manager"),
-  fSrcList(NULL) {
+  fSrcList(NULL),
+  fRetryCount(1),
+  fRetrySleeptime(10) {
   // see header file for class documentation
   // or
   // refer to README to build package
@@ -80,23 +84,47 @@ Int_t AliEveHOMERManager::CreateEveSourcesList() {
   fSrcList->CreateByType();
     
   return iResult;
 }
 
-
 //##################################################################################
-Int_t AliEveHOMERManager::ConnectEVEtoHOMER() {
+Int_t AliEveHOMERManager::CreateEveSourcesListLoop() {
   // see header file for class documentation
 
   Int_t iResult = 0;
+
+  for ( Int_t retry = 0; retry < fRetryCount ; retry++ ) {
   
-  fStateHasChanged = fSrcList->GetSelectedSources();
+    iResult = CreateEveSourcesList();
+    if (!iResult) 
+      break;
+    
+    else if (iResult == 1) {
+      HLTWarning( Form("Couldn't find active services, sleeping %d s\n", fRetryCount) ) ;
+    }   
+    else if (iResult == 2) {
+      HLTWarning( Form("Services List empty, sleeping %d s\n", fRetryCount) ) ;
+    }
+    else {
+      HLTError( Form("Other problem ... \n") ); 
+      return iResult;
+    } 
+    
+    sleep(fRetrySleeptime);
+  }
+
+  if ( iResult ) {
+    HLTError( Form("Couldn't find active services.\n") );
+    return iResult;
+  } 
   
-  cout<<"In ConnectEVEtoHOMER"<<endl;
+  return iResult;
+}
 
-  iResult = ConnectHOMER();
+//##################################################################################
+Int_t AliEveHOMERManager::ConnectEVEtoHOMER() {
+  // see header file for class documentation
 
+  fStateHasChanged = fSrcList->GetSelectedSources();
   
-  return iResult;
+  return ConnectHOMER();
 }
index 2266fea..330464e 100644 (file)
@@ -43,8 +43,6 @@ public:
   virtual ~AliEveHOMERManager();
 
 
-
-
   /*
    * ---------------------------------------------------------------------------------
    *                            Source Handling - public
@@ -55,9 +53,13 @@ public:
    *  @return 0 on success, <0 for failure, 1 for no active service
    */
   Int_t CreateEveSourcesList();
+
+  Int_t CreateEveSourcesListLoop();
   
   Int_t ConnectEVEtoHOMER();
 
+  void SetRetryCount(Int_t count, Int_t sleeptime) { fRetryCount = count; fRetrySleeptime = sleeptime; }
+
   ///////////////////////////////////////////////////////////////////////////////////
 
 private:
@@ -77,6 +79,10 @@ private:
   // == sources ==
   AliEveHOMERSourceList* fSrcList;                // List of Connected HOMER Sources
 
+  Int_t fRetryCount;
+
+  Int_t fRetrySleeptime;
+
   ClassDef(AliEveHOMERManager, 0); // Manage connections to HLT data-sources.
 
 };
diff --git a/EVE/hlt-macros/HLT-logo.png b/EVE/hlt-macros/HLT-logo.png
new file mode 100644 (file)
index 0000000..bac96a3
Binary files /dev/null and b/EVE/hlt-macros/HLT-logo.png differ
diff --git a/EVE/hlt-macros/geom_gentle_hlt.C b/EVE/hlt-macros/geom_gentle_hlt.C
new file mode 100644 (file)
index 0000000..2a0b8d7
--- /dev/null
@@ -0,0 +1,88 @@
+// $Id: geom_gentle.C 30976 2009-02-11 15:55:45Z mtadel $
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+// -----------------------------------------------------------------
+TEveGeoShape* geom_gentle_hlt(Bool_t register_as_global=kTRUE) {
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  TEveElement* elTRD = gsre->FindChild("TRD+TOF");
+  elTRD->SetRnrState(kFALSE);
+
+  TEveElement* elHMPID = gsre->FindChild("HMPID");
+  elHMPID->SetRnrState(kFALSE);
+
+  if (register_as_global) {
+    gEve->AddGlobalElement(gsre);
+  }
+
+  return gsre;
+}
+
+// -----------------------------------------------------------------
+TEveGeoShape* geom_gentle_rphi() {
+  // The resulting geometry is NOT added into the global scene!
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rphi_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  return gsre;
+}
+
+// -----------------------------------------------------------------
+TEveGeoShape* geom_gentle_rhoz() {
+  // The resulting geometry is NOT added into the global scene!
+
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_rhoz_geo.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
+  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+  f.Close();
+
+  return gsre;
+}
+
+// -----------------------------------------------------------------
+TEveGeoShape* geom_gentle_trd() {
+  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo_trd.root");
+  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle TRD");
+  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse);
+  gEve->AddGlobalElement(gsre);
+  f.Close();
+
+  Int_t sm = 0;
+
+  // Fix visibility, color and transparency
+  gsre->SetRnrSelf(kFALSE);
+  for (TEveElement::List_i i = gsre->BeginChildren(); i != gsre->EndChildren(); ++i) {
+
+    TEveGeoShape* lvl1 = (TEveGeoShape*) *i;
+    lvl1->SetRnrSelf(kFALSE);
+    for (TEveElement::List_i j = lvl1->BeginChildren(); j != lvl1->EndChildren(); ++j) {
+
+      TEveGeoShape* lvl2 = (TEveGeoShape*) *j;
+      
+      if ( sm == 0 || sm == 1 || sm == 7 || sm == 8 || sm == 9 || sm == 10 || sm == 17 )
+       lvl2->SetRnrSelf(kTRUE);        
+      else 
+       lvl2->SetRnrSelf(kFALSE);       
+
+      lvl2->SetMainColor(3);
+      lvl2->SetMainTransparency(80);
+
+      ++sm;
+    }
+    
+  }
+
+  return gsre;
+}
diff --git a/EVE/hlt-macros/geom_hlt.C b/EVE/hlt-macros/geom_hlt.C
deleted file mode 100644 (file)
index 058815b..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/**************************************************************************
- * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
- * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
- * full copyright notice.                                                 *
- **************************************************************************/
-
-/*
- *   Geometry as used for HLT 
- */
-
-#include "AliEveMUONData.h"
-#include "AliEveMUONChamber.h"
-#include "AliCDBManager.h"
-
-#include "TEveGeoShapeExtract.h"
-#include "TEveGeoNode.h"
-#include "TEveManager.h"
-#include "TEveEventManager.h"
-#include "TEveElement.h"
-
-#include "TFile.h"
-#include "TStyle.h"
-
-TEveGeoShape* geom_hlt()
-{
-  TFile f("$ALICE_ROOT/EVE/alice-data/gentle_geo.root");
-  TEveGeoShapeExtract* gse = (TEveGeoShapeExtract*) f.Get("Gentle");
-  TEveGeoShape* gsre = TEveGeoShape::ImportShapeExtract(gse, 0);
-  gEve->AddGlobalElement(gsre);
-  f.Close();
-
-  TEveElement* elTRD = gsre->FindChild("TRD+TOF");
-  elTRD->SetRnrState(kFALSE);
-
-  TEveElement* elPHOS = gsre->FindChild("PHOS");
-  elPHOS->SetRnrState(kFALSE);
-
-  TEveElement* elHMPID = gsre->FindChild("HMPID");
-  elHMPID->SetRnrState(kFALSE);
-
-  Int_t MUON_geom();
-  MUON_geom();
-
-  return gsre;
-}
-
-//#if 0
-
-Int_t MUON_geom()
-{
-  gStyle->SetPalette(1, 0);
-  gEve->DisableRedraw();
-
-  AliCDBManager *cdb = AliCDBManager::Instance();
-  cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
-  cdb->SetRun(0);
-
-  AliEveMUONData *g_muon_data = new AliEveMUONData;
-
-  TEveElementList* l = new TEveElementList("MUONChambers");
-  l->SetTitle("MUON chambers");
-  l->SetMainColor(2);
-  gEve->AddGlobalElement(l);
-
-  for (Int_t ic = 0; ic < 14; ic++)
-  {
-    AliEveMUONChamber* mucha = new AliEveMUONChamber(ic);
-
-    mucha->SetFrameColor(2);
-    mucha->SetChamberID(ic);
-
-    mucha->SetDataSource(g_muon_data);
-
-    gEve->AddElement(mucha, l);
-  }
-
-  gEve->Redraw3D(kTRUE);
-  gEve->EnableRedraw();
-
-
-
-  
-  return true;
-}
-
-//#endif
diff --git a/EVE/hlt-macros/hlt_alieve_init.C b/EVE/hlt-macros/hlt_alieve_init.C
new file mode 100644 (file)
index 0000000..7b25867
--- /dev/null
@@ -0,0 +1,96 @@
+// $Id: alieve_init.C 30728 2009-01-22 18:14:34Z mtadel $
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+void hlt_alieve_init(const Text_t* path   = ".", Int_t event=0,
+                 const Text_t* esdfile = 0,
+                 const Text_t* aodfile = 0,
+                 const Text_t* rawfile = 0,
+                const Text_t* cdburi  = 0,
+                Bool_t assert_runloader = kFALSE,
+                 Bool_t assert_esd       = kFALSE,
+                 Bool_t assert_aod       = kFALSE,
+                 Bool_t assert_raw       = kFALSE)
+{
+  Info("alieve_init", "Adding standard macros.");
+  TString  hack = gSystem->pwd(); // Problem with TGFileBrowser cding
+  alieve_init_import_macros();
+  gSystem->cd(hack);
+
+  alieve_init_basic_vizdb();
+  // Temporarily assert also default vizdb.
+  TEveUtil::AssertMacro("VizDB_scan.C");
+
+  gSystem->ProcessEvents();
+}
+
+void alieve_init_import_macros()
+{
+  // Put macros in the list of browsables, add a macro browser to
+  // top-level GUI.
+
+  TString macdir("$(ALICE_ROOT)/EVE/alice-macros");
+  gSystem->ExpandPathName(macdir);
+
+  TFolder* f = gEve->GetMacroFolder();
+  void* dirhandle = gSystem->OpenDirectory(macdir.Data());
+  if (dirhandle != 0)
+  {
+    char* filename;
+    TPMERegexp re("\\.C$");
+    std::list<string> names; // This form understood by cint (fails with std::string).
+    while ((filename = gSystem->GetDirEntry(dirhandle)) != 0)
+    {
+      if (re.Match(filename))
+       names.push_back(filename);
+    }
+    names.sort();
+    //PH The line below is replaced waiting for a fix in Root
+    //PH which permits to use variable siza arguments in CINT
+    //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
+    // f->Add(new TEveMacro(Form("%s/%s", macdir.Data(), filename)));
+    char fullName[1000];
+    for (std::list<string>::iterator si=names.begin(); si!=names.end(); ++si)
+    {
+      sprintf(fullName,"%s/%s", macdir.Data(), si->c_str());
+      f->Add(new TEveMacro(fullName));
+    }
+  }
+  gSystem->FreeDirectory(dirhandle);
+
+  gROOT->GetListOfBrowsables()->Add
+    // (new TSystemDirectory("alice-macros", macdir.Data())); // !!!! this spits blood, but then works
+    (new TSystemDirectory(macdir.Data(), macdir.Data()));
+
+  {
+    TEveBrowser   *br = gEve->GetBrowser();
+    TGFileBrowser *fb = 0;
+    fb = br->GetFileBrowser();
+    fb->GotoDir(macdir);
+    {
+      br->StartEmbedding(0);
+      fb = br->MakeFileBrowser();
+      fb->BrowseObj(f);
+      fb->Show();
+      br->StopEmbedding();
+      br->SetTabTitle("Macros", 0);
+      br->SetTab(0, 0);
+    }
+  }
+}
+
+void alieve_init_basic_vizdb()
+{
+  TEvePointSet* ps;
+
+  ps = new TEvePointSet();
+  ps->SetMarkerColor(4);
+  ps->SetMarkerSize(0.2);
+  ps->SetMarkerStyle(2);
+  gEve->InsertVizDBEntry("Clusters", ps);
+}
diff --git a/EVE/hlt-macros/homer_display.C b/EVE/hlt-macros/homer_display.C
deleted file mode 100644 (file)
index 4e6bed1..0000000
+++ /dev/null
@@ -1,814 +0,0 @@
-// $Id$
-// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
-
-/**************************************************************************
- * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
- * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
- * full copyright notice.                                                 *
- **************************************************************************/
-
-// Functions to read data from HOMER.
-//
-// Setup: edit location of HLT configuration in first line of
-// homer_display(). This is a temporary solution.
-//
-// Run as: alieve command_queue.C+ hlt_structs.C+ homer_display.C
-//
-// nextEvent() will get next event from HOMER.
-
-
-class AliRawReaderMemory;
-class AliEveHOMERManager;
-class AliHLTHOMERBlockDesc;
-
-class TEvePointSet;
-class TEveTrackList;
-class AliEveTrack;
-
-class AliEveTPCLoader;
-class AliEveTPCData;
-class AliEveTPCSector2D;
-class AliEveTPCSector3D;
-class AliEveITSDigitsInfo;
-
-//***********************************************************
-#include "TTimer.h"
-#include "TRandom.h"
-#include "TVirtualPad.h"
-#include "TGLViewer.h"
-#include "TThread.h"
-#include "TGFileBrowser.h"
-#include "TStyle.h"
-#include "TList.h"
-#include "TDirectory.h"
-//***********************************************************
-#include "TEveManager.h"
-#include "TEvePointSet.h"
-#include "AliEveTrack.h"
-#include "TEveVSDStructs.h"
-#include "TEveTrackPropagator.h"
-#include "TEvePointSet.h"
-#include "TEveScene.h"
-#include "TEveElement.h"
-// #include "TEveElementList.h"
-#include "TEveEventManager.h"
-//***********************************************************
-#include "AliESDEvent.h"
-#include "AliCDBManager.h"
-#include "AliRawReaderMemory.h"
-#include "AliTPCRawStream.h"
-#include "AliGeomManager.h"
-//***********************************************************
-#include "AliEveHOMERManager.h"
-#include "AliEveTPCLoader.h" 
-#include "AliEveTPCData.h"
-#include "AliEveITSDigitsInfo.h"
-#include "AliEveITSModule.h"
-//***********************************************************
-#include "AliHLTHOMERBlockDesc.h"
-#include "AliHLTHOMERReader.h"
-//***********************************************************
-#include "hlt_structs.C"
-#include "TFile.h"
-//***********************************************************
-#include <AliHLTMUONUtils.h>
-#include "AliHLTMUONDataBlockReader.h"
-#include "tracking-ca/AliHLTTPCCATrackParam.h"
-
-// -- globals --
-AliEveTPCLoader*                          gTPCLoader    = 0;
-AliEveTPCData*                            gTPCData      = 0;
-TEvePointSet*                             gTPCClusters  = 0;
-TEveTrackList*                            gTPCTrack     = 0;
-
-AliEveITSDigitsInfo*                      gITSDigits    = 0; 
-
-AliRawReaderMemory*                       gMemReader    = 0;
-AliEveHOMERManager*                       gHomerManager = 0;
-
-TEvePointSet*                             gMUONClusters  = 0;
-Double_t                                  gSolenoidField = 5;
-//***********************************************************
-
-Int_t globMaxPoint = 0 ;
-
-//***********************************************************
-
-// -- needed below ??
-
-Int_t    event  = -1;
-
-TTimer   timer;
-TTimer   event_timer;
-
-TThread* ldthread = 0;
-
-TRandom  rnd(0);
-
-Bool_t vC = kFALSE;
-TGFileBrowser *g_hlt_browser = 0;
-TCanvas       *g_hlt_canvas  = 0;
-
-TGLViewer::ECameraType camera = TGLViewer::kCameraPerspXOZ;
-
-//****************************************************************************
-Int_t nextEvent();
-
-//****************************************************************************
-Int_t processSPDRawData( AliHLTHOMERBlockDesc* block );
-Int_t drawSPDRawData();
-
-//****************************************************************************
-Int_t processTPCRawData( AliHLTHOMERBlockDesc* block );
-Int_t processTPCClusters( AliHLTHOMERBlockDesc* block );
-Int_t processTPCTracks( AliHLTHOMERBlockDesc* block );
-
-Int_t processMUONClusters( AliHLTHOMERBlockDesc* block );
-
-//****************************************************************************
-TEveTrack* makeESDTrack( TEveTrackPropagator*   rnrStyle,
-                        Int_t                  idx,
-                        AliESDtrack*           at,
-                        AliExternalTrackParam* tp = 0 );
-
-//****************************************************************************
-void homer_display( Int_t run = 0) {
-
-  AliCDBManager::Instance()->SetRun(run);
-  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
-  
-  gMemReader = new AliRawReaderMemory(0, 0);
-
-  gStyle->SetPalette(1, 0);
-  gEve->DisableRedraw();
-
-  // -- Create HOMER Manager
-  gHomerManager = new AliEveHOMERManager("/local/home/hlt/AliEVE-Config.xml");
-
-  // -- Set Realm  ( can be "GPN","ACR","HLT","KIP" )
-  gHomerManager->SetRealm("ACR"); 
-  
-  gEve->AddToListTree(gHomerManager, kTRUE);
-
-  // -- Create list of HOMER sources
-  gHomerManager->CreateHOMERSourcesList();
-
-  // -- TPC Loader
-  gTPCLoader = new AliEveTPCLoader;
-  gTPCLoader->SetDoubleSR(kTRUE);
-  gTPCLoader->SetInitParams(40, 900, 2, 100);   // Sector params (mint, maxt, thr, maxval)
-  
-  // -- TPC Data
-  gTPCData = gTPCLoader->GetData();
-  gTPCData->SetLoadPedestal(0);
-  gTPCData->SetLoadThreshold(0);
-  gTPCData->SetAutoPedestal(kFALSE);             // For zero suppressed data.
-
-  gEve->AddElement(gTPCLoader);
-
-  gEve->Redraw3D(0,1); // (0, 1)
-  gEve->EnableRedraw();  
-}
-
-//****************************************************************************
-Int_t nextEvent() {
-
-  Int_t iResult = 0;
-
-  gStyle->SetPalette(1, 0);
-  gEve->DisableRedraw();
-
-  // ** Get Next Event from HOMER
-  if ( gHomerManager->NextEvent() ) 
-    return ++iResult;
-
-  // ** Reset
-  if ( gTPCClusters ) gTPCClusters->Reset();
-  if ( gTPCTrack )    gTPCTrack->DestroyElements();
-  if ( gTPCData )     gTPCData->DropAllSectors();
-
-  if ( gITSDigits ) {
-    delete gITSDigits;
-    gITSDigits = NULL;
-  }
-  
-  if ( gMUONClusters ) gMUONClusters->Reset();
-
-
-  // ----------------------------------- foo A
-  vC = kFALSE;
-
-  // TList* hListKR = new TList;
-  // TList* hListCF = new TList;
-
-  // ----------------------------------- foo A
-
-  TIter next(gHomerManager->GetBlockList());
-  AliHLTHOMERBlockDesc* block = 0;
-
-  while ((block = (AliHLTHOMERBlockDesc*)next())) {
-   
-//     printf ( "Det : %s\n" ,block->GetDetector().Data() );
-//     printf ( "Datatype : %s\n" ,block->GetDataType().Data() );
-
-    
-    
-    // -- TPC
-    // -----------------------------------------------------
-    
-    if ( ! block->GetDetector().CompareTo("TPC") ){
-      
-
-    // +++ CLUSTERS BLOCK
-    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
-      
-      if ( block->GetDataType().CompareTo("CLUSTERS") == 0 ) {
-       if ( !gTPCClusters ) {
-         gTPCClusters = new TEvePointSet("TPC Clusters");
-         gTPCClusters->SetMainColor(kRed);
-         gTPCClusters->SetMarkerStyle((Style_t)kFullDotSmall);
-         gEve->AddElement(gTPCClusters);
-       }
-       
-       // ** Process Clusters
-       processTPCClusters( block );
-       
-       gTPCClusters->ElementChanged();
-       
-      }else if ( block->GetDataType().CompareTo("ESD_TREE") == 0 ) {
-      // +++ ESD BLOCK
-      // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
-
-       // ** Initialize TPC Tracks
-       if ( !gTPCTrack ) {
-         gTPCTrack = new TEveTrackList("TPC Tracks");
-         gTPCTrack->SetMainColor(kBlue);
-         
-         gEve->AddElement(gTPCTrack);
-       
-         TEveTrackPropagator* rnrStyle = gTPCTrack->GetPropagator();
-         rnrStyle->SetMagField( 0 );
-         rnrStyle->SetFitDecay( 1 );
-       }
-       cout<<"SIZE : "<<block->GetSize()<<endl;
-       // ** Proces Tracks
-       processTPCTracks( block );
-      }else if ( block->GetDataType().CompareTo("DDL_RAW") == 0 ) {
-       processTPCRawData( block );
-      }
-      
-    } else if ( ! block->GetDetector().CompareTo("MUON") ) {
-
-      // -- MUON
-      //-----------------------------------------------------
-      if ( (block->GetDataType().CompareTo("RECHITS") == 0) || (block->GetDataType().CompareTo("TRIGRECS") == 0) ) {
-
-//     printf ( "Inside : Datatype : %s\n" ,block->GetDataType().Data() );
-//     printf ( "Inside : DataSize : %d\n" ,block->GetSize() );
-       if ( !gMUONClusters ) {
-         gMUONClusters = new TEvePointSet("MUON RecHits");
-         gMUONClusters->SetMainColor(kBlue);
-         gMUONClusters->SetMarkerStyle(20);
-         gEve->AddElement(gMUONClusters);
-       }
-       
-       // ** Process Clusters
-       processMUONClusters( block );
-       
-       gMUONClusters->ElementChanged();
-       
-      }//MUON Clusters
-
-
-    }  else if ( ! block->GetDetector().CompareTo("SPD") ) {
-
-      // -- SPD 
-      // -----------------------------------------------------
-
-      if ( block->GetDataType().CompareTo("DDL_RAW") == 0 ) {
-       // ** Initialize SPD Digits
-       if ( !gITSDigits ) {
-         gITSDigits = new AliEveITSDigitsInfo();
-       }
-       
-       processSPDRawData( block );             
-      }
-
-    }else{
-
-      printf ("Detector \"%s\" has not been recognized",block->GetDetector().Data());
-    }
-    
-  }
-  
-  if ( gTPCLoader )   gTPCLoader->UpdateSectors( kTRUE );
-  if ( gTPCClusters ) gTPCClusters->ResetBBox();
-  if ( gTPCTrack )    gTPCTrack->MakeTracks();
-  if ( gITSDigits )   drawSPDRawData();
-  
-  if ( gMUONClusters ) gMUONClusters->ResetBBox();
-  
-  gEve->Redraw3D(0,1); // (0, 1)
-  gEve->EnableRedraw(); 
-    
-  return iResult;
-}
-
-//****************************************************************************
-//****************************************************************************
-//****************************************************************************
-void loopEvent() {
-  event_timer.SetCommand("nextEvent()");
-  event_timer.Start(6000);
-}
-
-//****************************************************************************
-void stopLoopEvent() {
-  event_timer.Stop();
-}
-
-//****************************************************************************
-Int_t processTPCRawData(AliHLTHOMERBlockDesc* block) {
-
-  Int_t iResult = 0;
-
-  Int_t sector = block->GetSubDetector().Atoi();
-  Int_t patch  = block->GetSubSubDetector().Atoi();
-  Int_t eqId   = 768 + patch;
-  
-  if ( patch >= 2) eqId += 4 * sector + 70;
-  else            eqId += 2 * sector;
-
-  printf("sector : %d %d %d -- %p %lu\n", sector, patch, eqId, block->GetData(), block->GetSize());
-
-  gMemReader->SetMemory( reinterpret_cast<UChar_t*> ( block->GetData() ), block->GetSize() );
-  gMemReader->SetEquipmentID( eqId );
-  gMemReader->Reset();
-
-  AliTPCRawStream tpcStream( gMemReader );
-  gMemReader->Select("TPC"); 
-  
-  gTPCData->LoadRaw( tpcStream, kTRUE, kTRUE );
-
-  return iResult;
-}
-
-//****************************************************************************
-Int_t processTPCClusters(AliHLTHOMERBlockDesc* block) {
-  Int_t iResult = 0;
-
-  Int_t   slice = block->GetSubDetector().Atoi();
-  Int_t   patch = block->GetSubSubDetector().Atoi();
-  Float_t phi   = ( slice + 0.5 ) * TMath::Pi() / 9.0;  
-  Float_t cos   = TMath::Cos( phi );
-  Float_t sin   = TMath::Sin( phi );
-    
-  AliHLTTPCClusterData *cd = (AliHLTTPCClusterData*) block->GetData();
-  UChar_t *data            = (UChar_t*) cd->fSpacePoints;
-
-  if ( cd->fSpacePointCnt == 0 ) {
-    printf ("No Clusters found in sector %d patch %d.\n", slice, patch );
-    iResult = -1;
-  } 
-  else {
-    
-    for (Int_t ii = 0; ii < cd->fSpacePointCnt; ++ii, data += sizeof(AliHLTTPCSpacePointData)) {
-      AliHLTTPCSpacePointData *sp = (AliHLTTPCSpacePointData *) data;
-
-      gTPCClusters->SetNextPoint(cos*sp->fX - sin*sp->fY, sin*sp->fX + cos*sp->fY, sp->fZ);
-    }
-  }
-
-  return iResult;
-}
-
-//****************************************************************************
-TEveTrack* makeESDTrack( TEveTrackPropagator*   rnrStyle,
-                        Int_t                  idx,
-                        AliESDtrack*           esdTrack,
-                        AliExternalTrackParam* trackParam  ) {
-  // Helper function
-  
-  Double_t     pbuf[3], vbuf[3];
-  TEveRecTrack rt;
-  TEvePathMark startPoint(TEvePathMark::kReference);
-  TEvePathMark midPoint(TEvePathMark::kReference);
-  TEvePathMark mid1Point(TEvePathMark::kReference);
-  TEvePathMark endPoint(TEvePathMark::kReference);
-  TEvePathMark decPoint(TEvePathMark::kDecay);
-
-  /*printf("ESD track: %f, %f, %f, %f, %f, %f, %f",
-        esdTrack->GetAlpha(),
-        esdTrack->GetX(), 
-        esdTrack->GetY(),
-        esdTrack->GetZ(),    
-        esdTrack->GetSnp(),  
-        esdTrack->GetTgl(),  
-        esdTrack->GetSigned1Pt()
-        );
-  */
-  cout<<"TPCPoints::"<<esdTrack->GetTPCPoints(0)<<" "<<esdTrack->GetTPCPoints(1)<<" "<<esdTrack->GetTPCPoints(2)<<" "<<esdTrack->GetTPCPoints(3)<<endl;
-
-  if ( trackParam == 0 ) 
-    trackParam = esdTrack;
-
-  rt.fLabel  = esdTrack->GetLabel();
-  rt.fIndex  = idx;
-  rt.fStatus = (Int_t) esdTrack->GetStatus();
-  rt.fSign   = (Int_t) trackParam->GetSign();
-
-  Double_t x0 = trackParam->GetX();
-  Double_t dx = esdTrack->GetTPCPoints(2) - x0;
-
-  for( Double_t x1=x0; x1<x0+dx; x1+=(dx)*.1 ){//SG
-    AliExternalTrackParam startParam = *trackParam;
-    AliHLTTPCCATrackParam t;
-    t.SetExtParam(startParam, gSolenoidField );
-    if( !t.TransportToX(x1) ) continue; 
-    t.GetExtParam( startParam, startParam.GetAlpha(), gSolenoidField );
-    if( TMath::Abs(startParam.GetSnp())>.99 ) continue;
-
-    startParam.GetXYZ(vbuf);
-    
-    { // get momentum manually because trackParam->GetPxPyPz doesn't works for straight lines
-
-      Double_t pt= TMath::Abs(startParam.GetSigned1Pt());
-      pt = (pt>kAlmost0) ?1./pt :100.;
-      
-      Double_t cA=TMath::Cos(startParam.GetAlpha()), sA=TMath::Sin(startParam.GetAlpha());
-    
-      Double_t sT=startParam.GetSnp();
-      if( sT>kAlmost1 ){ sT = kAlmost1; }
-      else if( sT<-kAlmost1 ){ sT = -kAlmost1; }
-      Double_t cT = TMath::Sqrt(TMath::Abs(1 - sT*sT));
-      
-      pbuf[0] = pt*(cT*cA - sT*sA); 
-      pbuf[1] = pt*(sT*cA + cT*sA); 
-      pbuf[2] = pt*startParam.GetTgl();
-    }
-  
-    break;
-  }
-
-  rt.fV.Set(vbuf);
-  rt.fP.Set(pbuf);
-  startPoint.fV.Set(vbuf);
-  startPoint.fP.Set(pbuf);
-  
-  Double_t ep = esdTrack->GetP(), mc = esdTrack->GetMass();
-  rt.fBeta = ep/TMath::Sqrt(ep*ep + mc*mc);
-
-  AliEveTrack* track = new AliEveTrack(&rt, rnrStyle);
-
-  cout<<"startPoint = "<<vbuf[0]<<" "<<vbuf[1]<<" "<<vbuf[2]<<" "<<pbuf[0]<<" "<<pbuf[1]<<" "<<pbuf[2]<<endl;
-
-  for( ; TMath::Abs(dx)>=1.; dx*=.9 ){
-    AliExternalTrackParam endParam = *trackParam;
-    //if( !endParam.PropagateTo(x0+dx, gSolenoidField) ) continue; 
-    AliHLTTPCCATrackParam t;
-    t.SetExtParam(endParam, gSolenoidField );
-    if( !t.TransportToX(x0+dx) ) continue; 
-    t.GetExtParam( endParam, endParam.GetAlpha(), gSolenoidField );
-
-    if( TMath::Abs(endParam.GetSnp())>.99 ) continue;
-    
-    { // get momentum manually because trackParam->GetPxPyPz doesn't works for straight lines
-
-      Double_t pt= TMath::Abs(endParam.GetSigned1Pt());
-      pt = (pt>kAlmost0) ?1./pt :100.;
-      
-      Double_t cA=TMath::Cos(endParam.GetAlpha()), sA=TMath::Sin(endParam.GetAlpha());
-      
-      Double_t sT=endParam.GetSnp();
-      if( sT>=kAlmost1 ){ sT = kAlmost1; }
-      else if( sT<-kAlmost1 ){ sT = -kAlmost1; }
-      Double_t cT = TMath::Sqrt(TMath::Abs(1 - sT*sT));
-      
-      endParam.GetXYZ(vbuf);
-      pbuf[0] = pt*(cT*cA - sT*sA);
-      pbuf[1] = pt*(sT*cA + cT*sA);
-      pbuf[2] = pt*endParam.GetTgl();
-    }
-    break;
-  }
-  endPoint.fV.Set(vbuf);
-  endPoint.fP.Set(pbuf);
-  decPoint.fV.Set(vbuf);
-  decPoint.fP.Set(pbuf);
-
-  cout<<"endPoint = "<<vbuf[0]<<" "<<vbuf[1]<<" "<<vbuf[2]<<" "<<pbuf[0]<<" "<<pbuf[1]<<" "<<pbuf[2]<<endl;
-
-  dx*=.6;
-  for( ; TMath::Abs(dx)>=.5; dx*=.8 ){
-    AliExternalTrackParam endParam = *trackParam;
-    //if( !endParam.PropagateTo(x0+dx, gSolenoidField) ) continue; 
-    AliHLTTPCCATrackParam t;
-    t.SetExtParam(endParam, gSolenoidField );
-    if( !t.TransportToX(x0+dx) ) continue; 
-    t.GetExtParam( endParam, endParam.GetAlpha(), gSolenoidField );
-    if( TMath::Abs(endParam.GetSnp())>.99 ) continue;
-    
-    { // get momentum manually because trackParam->GetPxPyPz doesn't works for straight lines
-
-      Double_t pt= TMath::Abs(endParam.GetSigned1Pt());
-      pt = (pt>kAlmost0) ?1./pt :100.;
-      
-      Double_t cA=TMath::Cos(endParam.GetAlpha()), sA=TMath::Sin(endParam.GetAlpha());
-      
-      Double_t sT=endParam.GetSnp();
-      if( sT>=kAlmost1 ){ sT = kAlmost1; }
-      else if( sT<-kAlmost1 ){ sT = -kAlmost1; }
-      Double_t cT = TMath::Sqrt(TMath::Abs(1 - sT*sT));
-      
-      endParam.GetXYZ(vbuf);
-      pbuf[0] = pt*(cT*cA - sT*sA);
-      pbuf[1] = pt*(sT*cA + cT*sA);
-      pbuf[2] = pt*endParam.GetTgl();
-    }
-    break;
-  }
-
-  mid1Point.fV.Set(vbuf);
-  mid1Point.fP.Set(pbuf);
-
-  //cout<<"midPoint = "<<vbuf[0]<<" "<<vbuf[1]<<" "<<vbuf[2]<<" "<<pbuf[0]<<" "<<pbuf[1]<<" "<<pbuf[2]<<endl;
-  dx*=.5;
-  for( ; TMath::Abs(dx)>=.5; dx*=.8 ){
-    AliExternalTrackParam endParam = *trackParam;
-    //if( !endParam.PropagateTo(x0+dx, gSolenoidField) ) continue; 
-    AliHLTTPCCATrackParam t;
-    t.SetExtParam(endParam, gSolenoidField );
-    if( !t.TransportToX(x0+dx) ) continue; 
-    t.GetExtParam( endParam, endParam.GetAlpha(), gSolenoidField );
-    if( TMath::Abs(endParam.GetSnp())>.99 ) continue;
-    
-    { // get momentum manually because trackParam->GetPxPyPz doesn't works for straight lines
-
-      Double_t pt= TMath::Abs(endParam.GetSigned1Pt());
-      pt = (pt>kAlmost0) ?1./pt :100.;
-      
-      Double_t cA=TMath::Cos(endParam.GetAlpha()), sA=TMath::Sin(endParam.GetAlpha());
-      
-      Double_t sT=endParam.GetSnp();
-      if( sT>=kAlmost1 ){ sT = kAlmost1; }
-      else if( sT<-kAlmost1 ){ sT = -kAlmost1; }
-      Double_t cT = TMath::Sqrt(TMath::Abs(1 - sT*sT));
-      
-      endParam.GetXYZ(vbuf);
-      pbuf[0] = pt*(cT*cA - sT*sA);
-      pbuf[1] = pt*(sT*cA + cT*sA);
-      pbuf[2] = pt*endParam.GetTgl();
-    }
-    break;
-  }
-
-  midPoint.fV.Set(vbuf);
-  midPoint.fP.Set(pbuf);
-
-  track->AddPathMark( startPoint );
-  track->AddPathMark( midPoint );
-  track->AddPathMark( mid1Point );
-  track->AddPathMark( endPoint );
-  track->AddPathMark( decPoint );
-  
-  //PH The line below is replaced waiting for a fix in Root
-  //PH which permits to use variable siza arguments in CINT
-  //PH on some platforms (alphalinuxgcc, solariscc5, etc.)
-  //PH  track->SetName(Form("ESDTrack %d", rt.label));
-  //PH  track->SetTitle(Form("pT=%.3f, pZ=%.3f; V=(%.3f, %.3f, %.3f)",
-  //PH                rt.sign*TMath::Hypot(rt.P.x, rt.P.y), rt.P.z,
-  //PH                rt.V.x, rt.V.y, rt.V.z));
-  char form[1000];
-  sprintf(form,"AliEveTrack %d", rt.fIndex);
-  track->SetName(form);
-  track->SetStdTitle();
-  return track;
-}
-
-//****************************************************************************
-Int_t processTPCTracks(AliHLTHOMERBlockDesc* block) {
-
-  TTree *tr = (TTree*) block->GetTObject();
-
-//   ofstream fout("ESD_TPC.dat",ios::binary);
-//   fout.write((char*)block->GetData(),block->GetSize());
-//   fout.close();
-  TFile f("ESD_TPC.root","recreate");
-  tr->Write();
-  f.Close();
-
-  TFile* esdFile = TFile::Open("ESD_TPC.root");
-  
-  AliESDEvent* esd = new AliESDEvent();
-  TTree* tree = (TTree*) esdFile->Get("esdTree");
-  esd->ReadFromTree(tree);
-  //tr->SetBranchAddress("ESD", &esd);
-  //   if(tr->GetBranch("ESD"))
-  //     return 0;
-
-  tree->GetEntry(0);
-
-  TEveTrackPropagator* rnrStyle = gTPCTrack->GetPropagator();
-  rnrStyle->SetMagField( 0.1*esd->GetMagneticField() );
-  gSolenoidField = esd->GetMagneticField();
-
-  cout << "Number of tracks found :" << esd->GetNumberOfTracks() << endl;
-
-  Double_t pin[3];
-  
-  for (Int_t ii=0; ii< esd->GetNumberOfTracks(); ii++) {
-
-    AliESDtrack           *esdTrack = esd->GetTrack(ii);
-    AliExternalTrackParam *trackParam = esdTrack;
-    cout<<"\nESD track N"<<ii<<":"<<endl;
-    trackParam->Print();
-
-    AliEveTrack* track = makeESDTrack( rnrStyle, ii, esdTrack, trackParam );
-    esdTrack->GetPxPyPz(pin);
-
-    //cout<<"pt : "<<sqrt(pin[0]*pin[0] + pin[1]*pin[1])<<endl;
-    track->SetAttLineAttMarker(gTPCTrack);    
-   gEve->AddElement(track, gTPCTrack);
- }
-  
-  delete esd;
-  
-  return 0;
-}
-
-//****************************************************************************
-Int_t processSPDRawData(AliHLTHOMERBlockDesc* block) {
-  Int_t iResult = 0;
-
-  Int_t partition = block->GetSubDetector().Atoi();
-  Int_t eqId      = partition;
-
-  gMemReader->SetMemory( reinterpret_cast<UChar_t*> ( block->GetData() ), block->GetSize() );
-  gMemReader->SetEquipmentID( eqId );
-  gMemReader->Reset();
-
-  gITSDigits->ReadRaw( gMemReader, 3);
-
-  return iResult;
-}
-
-//****************************************************************************
-Int_t drawSPDRawData() {
-
-  Int_t iResult = 0;
-
-  TString sSector;
-  TString bsSector="Sector";
-  TString sStave;
-  TString bsStave="Stave";
-
-  Int_t ndx=0;
-  Int_t sector, stave, module;
-
-  //gEve->DisableRedraw();
-
-  // ** first layer **
-
-  TEveElementList* layer1 = new TEveElementList( "SPD0" );
-  layer1->SetTitle( "SPDs' first layer" );
-  layer1->SetMainColor(2);
-  gEve->AddElement( layer1 );
-  
-  for ( sector=0; sector<10; sector++ ) {
-    sSector  = bsSector;
-    sSector += sector;
-
-    TEveElementList* relSector = new TEveElementList( sSector.Data() );
-    relSector->SetMainColor(2);
-    gEve->AddElement( relSector, layer1 );
-
-    for ( stave=0; stave<2; stave++ ) {
-      sStave  = bsStave;
-      sStave += stave;
-      
-      TEveElementList* relStave = new TEveElementList( sStave.Data() );
-      relStave->SetMainColor(2);
-      gEve->AddElement( relStave, relSector );
-
-      for ( module=0; module<4; module++ ) {
-       
-       if ( gITSDigits->GetDigits( ndx, 0 ) && 
-            gITSDigits->GetDigits( ndx, 0 )->GetEntriesFast() > 0) {
-         
-         AliEveITSModule* moduleITS = new AliEveITSModule( ndx, gITSDigits );
-         gEve->AddElement( moduleITS, relStave );
-       }
-
-       ++ndx; 
-
-      } // for ( module=0; module<4; module++ ) {
-    } // for ( stave=0; stave<2; stave++ ) {
-  } // for ( sector=0; sector<10; sector++ ) {
-
-  // ** second layer **
-
-  TEveElementList* layer2 = new TEveElementList( "SPD1" );
-  layer2->SetTitle( "SPDs' second layer" );
-  layer2->SetMainColor(2);
-  gEve->AddElement(layer2);
-  
-  for ( sector=0; sector<10; sector++ ) {
-    sSector  = bsSector;
-    sSector += sector;
-    
-    TEveElementList* relSector = new TEveElementList( sSector.Data() );
-    relSector->SetMainColor(2);
-    gEve->AddElement(relSector, layer2 );
-    
-    for ( stave=0; stave<4; stave++ ) {
-      sStave  = bsStave;
-      sStave += stave;
-
-      TEveElementList* relStave = new TEveElementList( sStave.Data() );
-      relStave->SetMainColor(2);
-      gEve->AddElement( relStave, relSector );
-
-      for ( module=0; module<4; module++) {
-
-       if ( gITSDigits->GetDigits( ndx, 0 ) && 
-            gITSDigits->GetDigits( ndx, 0 )->GetEntriesFast() > 0) {
-
-         AliEveITSModule* moduleITS = new AliEveITSModule( ndx, gITSDigits );
-         gEve->AddElement( moduleITS, relStave );
-       }
-        
-       ++ndx;
-      } // for ( module=0; module<4; module++) {
-    } // for ( stave=0; stave<2; stave++ ) {
-  } //for ( sector=0; sector<10; sector++ ) {
-
-  gEve->EnableRedraw();
-    
-  return iResult;
-}
-
-//****************************************************************************
-Int_t processMUONClusters(AliHLTHOMERBlockDesc* block) {
-  Int_t iResult = 0;
-
-      unsigned long size = block->GetSize();
-      int * buffer ;
-
-      //       for(int idata=0;idata<int(size);idata++)
-      //       printf("\tbuffer[%d] : %d\n",idata,buffer[idata]);
-      
-      buffer = (int *)block->GetData();
-      
-      if(block->GetDataType().CompareTo("RECHITS") == 0){
-       
-       AliHLTMUONRecHitsBlockReader trackblock((char*)buffer, size);
-       const AliHLTMUONRecHitStruct* hit = trackblock.GetArray();
-      
-       for(AliHLTUInt32_t ientry = 0; ientry < trackblock.Nentries(); ientry++){
-//       cout << setw(13) << left << hit->fX << setw(0);
-//       cout << setw(13) << left << hit->fY << setw(0);
-//       cout << hit->fZ << setw(0) << endl;
-         gMUONClusters->SetNextPoint(hit->fX,hit->fY,hit->fZ);
-         hit++;
-         
-       }// track hit loop
-      }else{// if rechits
-      
-      
-//       if(!strcmp((BlockType(ULong64_t(reader->GetBlockDataType(i)))).Data(),"TRIGRECS")){
-
-       AliHLTMUONTriggerRecordsBlockReader trigblock(buffer, size);
-       const AliHLTMUONTriggerRecordStruct* trigrec = trigblock.GetArray();
-       for(AliHLTUInt32_t ientry = 0; ientry < trigblock.Nentries(); ientry++){
-
-         const AliHLTMUONRecHitStruct* hit = &trigrec->fHit[0];
-         for(AliHLTUInt32_t ch = 0; ch < 4; ch++)
-           {
-//           cout << setw(10) << left << ch + 11 << setw(0);
-//           cout << setw(13) << left << hit->fX << setw(0);
-//           cout << setw(13) << left << hit->fY << setw(0);
-//           cout << hit->fZ << setw(0) << endl;
-             gMUONClusters->SetNextPoint(hit->fX,hit->fY,hit->fZ);
-             hit++;
-           }// trig chamber loop
-         
-       }//trig hit loop
-      }// if trigrecs
-      
-      
-//       //delete[] buffer;
-//     }//nof Block received
-//   }// if any event found
-  
-  
-//   delete reader;
-
-
-  return iResult;
-}
-
-
-//****************************************************************************
diff --git a/EVE/hlt-macros/onlineDisplay.C b/EVE/hlt-macros/onlineDisplay.C
new file mode 100644 (file)
index 0000000..94f6056
--- /dev/null
@@ -0,0 +1,636 @@
+//-*- Mode: C++ -*-
+
+// ** USED macros :
+// ***************************************************
+// - hlt_alieve_init.C
+// - VizDB_scan.C
+// - geom_gentle_hlt.C
+// - geom_gentle_muon.C
+// ***************************************************
+
+#include "unistd.h"
+#include <TEvePointSet.h>
+#include "EveBase/AliEveEventManager.h"
+#include <AliCluster.h>
+#include <TPC/AliTPCClustersRow.h>
+
+class TEveProjectionManager;
+class TEveGeoShape;
+class TEveUtil;
+class AliEveMacroExecutor;
+class TEveScene;
+class TEveElement;
+class TEveText;
+class AliHLTTriggerDecision;
+class TEvePointSet;
+
+// -----------------------------------------------------------------
+// --                       Geometry / Scenes                     --
+// -----------------------------------------------------------------
+
+TEveProjectionManager *gRPhiMgr = 0;
+TEveProjectionManager *gRhoZMgr = 0;
+
+// -----------------------------------------------------------------
+// --                Geometry / Scenes Parameters                 --
+// -----------------------------------------------------------------
+
+// -- Parameters to show different geometries
+Bool_t gShowMUON     = kTRUE;
+Bool_t gShowMUONRPhi = kFALSE;
+Bool_t gShowMUONRhoZ = kTRUE;
+
+// -----------------------------------------------------------------
+// --                         Members                            --
+// -----------------------------------------------------------------
+
+// -- Timer for automatic event loop
+TTimer                                    eventTimer;
+
+// -- HOMERManager
+AliEveHOMERManager*                       gHomerManager    = 0;
+
+// -- Cluster members
+TEvePointSet*                             gPHOSClusters    = 0;
+TEvePointSet*                             gTPCClusters     = 0;
+TEvePointSet*                             gSPDClusters     = 0;
+
+// -- Tracks members
+TEveTrackList*                            gTPCTrack        = 0;
+
+// -----------------------------------------------------------------
+// --                          Methods                            --
+// -----------------------------------------------------------------
+
+Int_t initializeEveViewer( Bool_t showExtraGeo );
+
+Int_t nextEvent();
+
+Int_t processPHOSClusters( AliHLTHOMERBlockDesc* block);
+
+Int_t processEsdTracks( AliHLTHOMERBlockDesc* block, TEveTrackList* cont );
+
+Int_t processHLTRDLST( AliHLTHOMERBlockDesc* block );
+
+Int_t processROOTTOBJ( AliHLTHOMERBlockDesc* block );
+
+Int_t processTPCClusters (AliHLTHOMERBlockDesc * block, TEvePointSet cont );
+
+// #################################################################
+// #################################################################
+// #################################################################
+
+// -----------------------------------------------------------------
+void onlineDisplay(Bool_t showMuonGeo=kFALSE) {
+  
+  // -- Loading Geometry
+  // ---------------------
+  Int_t run = 67179;
+  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  AliCDBManager::Instance()->SetRun(run);
+  AliGeomManager::LoadGeometry();
+
+  // -- Create new hM object
+  // -------------------------
+  gHomerManager = new AliEveHOMERManager();
+  gHomerManager->SetRetryCount(50,5);
+
+  Int_t iResult = gHomerManager->Initialize();
+  if (iResult) { 
+    printf("Error Initializing AliHLTHOMERManager, quitting");
+    return; 
+  }
+
+  // -- Add hM to EveTree
+  // ----------------------
+  gEve->AddToListTree(gHomerManager, kTRUE);
+
+  // -- Create SourceList
+  // ----------------------
+  iResult = gHomerManager->CreateEveSourcesListLoop();
+  if (iResult) {
+    printf ("Couldn't find active services. returning\n");
+    return;
+  } 
+
+  // -- Initialize pointsets and add macros
+  // ----------------------------------------
+  TEveUtil::LoadMacro("hlt_alieve_init.C");
+  hlt_alieve_init(".", -1);
+
+  // -- Initialize Eve
+  // -------------------
+  initializeEveViewer( showMuonGeo );
+
+  // -- Finalize Eve
+  // -----------------
+  gSystem->ProcessEvents();
+  gEve->Redraw3D(kTRUE);
+}
+
+// -----------------------------------------------------------------
+Int_t initializeEveViewer( Bool_t showMuonGeo ) {
+  
+  //==============================================================================
+  // Geometry, scenes, projections and viewers
+  //==============================================================================
+
+  TEveGeoShape *geomGentle     = 0;
+  TEveGeoShape *geomGentleRPhi = 0;
+  TEveGeoShape *geomGentleRhoZ = 0;
+  TEveGeoShape *geomGentleTRD  = 0;
+  TEveGeoShape *geomGentleMUON = 0;
+
+  // -- Disable extra geometry
+  // ---------------------------
+  if ( ! showMuonGeo ) {
+    gShowMUON = gShowMUONRPhi = gShowMUONRhoZ = kFALSE;
+  }
+  
+  // -- Load Geometry
+  // ------------------
+  TEveUtil::LoadMacro("geom_gentle_hlt.C");
+  geomGentle = geom_gentle_hlt();
+  geomGentleRPhi = geom_gentle_rphi(); geomGentleRPhi->IncDenyDestroy();
+  geomGentleRhoZ = geom_gentle_rhoz(); geomGentleRhoZ->IncDenyDestroy();
+  geomGentleTRD  = geom_gentle_trd();
+  
+  if (gShowMUON) {
+    TEveUtil::LoadMacro("geom_gentle_muon.C");
+    geomGentleMUON = geom_gentle_muon(kFALSE);
+  }
+
+  // -- Scenes
+  // -----------
+
+  TEveScene *rPhiGeomScene  = gEve->SpawnNewScene("RPhi Geometry",
+                               "Scene holding projected geometry for the RPhi view.");
+  TEveScene *rhoZGeomScene  = gEve->SpawnNewScene("RhoZ Geometry",
+                               "Scene holding projected geometry for the RhoZ view.");
+  TEveScene *rPhiEventScene = gEve->SpawnNewScene("RPhi Event Data",
+                               "Scene holding projected geometry for the RPhi view.");
+  TEveScene *rhoZEventScene = gEve->SpawnNewScene("RhoZ Event Data",
+                               "Scene holding projected geometry for the RhoZ view.");
+
+  // -- Projection managers
+  // ------------------------
+
+  // -- R-Phi Projection
+  gRPhiMgr = new TEveProjectionManager();
+  gRPhiMgr->SetProjection(TEveProjection::kPT_RPhi);
+  gEve->AddToListTree(gRPhiMgr, kFALSE);
+  {
+    TEveProjectionAxes* a = new TEveProjectionAxes(gRPhiMgr);
+    a->SetMainColor(kWhite);
+    a->SetTitle("R-Phi");
+    a->SetTitleSize(0.05);
+    a->SetTitleFont(102);
+    a->SetLabelSize(0.025);
+    a->SetLabelFont(102);
+    rPhiGeomScene->AddElement(a);
+  }
+
+  gRPhiMgr->SetCurrentDepth(-10);
+  gRPhiMgr->ImportElements(geomGentleRPhi, rPhiGeomScene);
+  gRPhiMgr->SetCurrentDepth(0);
+  gRPhiMgr->ImportElements(geomGentleTRD, rPhiGeomScene);
+  if (gShowMUONRPhi) gRPhiMgr->ImportElements(geomGentleMUON, rPhiGeomScene);
+
+  // -- Rho-Z Projection
+  gRhoZMgr = new TEveProjectionManager();
+  gRhoZMgr->SetProjection(TEveProjection::kPT_RhoZ);
+  gEve->AddToListTree(gRhoZMgr, kFALSE);
+  {
+    TEveProjectionAxes* a = new TEveProjectionAxes(gRhoZMgr);
+    a->SetMainColor(kWhite);
+    a->SetTitle("Rho-Z");
+    a->SetTitleSize(0.05);
+    a->SetTitleFont(102);
+    a->SetLabelSize(0.025);
+    a->SetLabelFont(102);
+    rhoZGeomScene->AddElement(a);
+  }
+  gRhoZMgr->SetCurrentDepth(-10);
+  gRhoZMgr->ImportElements(geomGentleRhoZ, rhoZGeomScene);
+  gRhoZMgr->SetCurrentDepth(0);
+  gRhoZMgr->ImportElements(geomGentleTRD, rhoZGeomScene);
+  if (gShowMUONRhoZ) gRhoZMgr->ImportElements(geomGentleMUON, rhoZGeomScene);
+
+  // -- Viewers
+  // ------------
+  TEveBrowser *browser = gEve->GetBrowser();
+  browser->ShowCloseTab(kFALSE);
+
+
+  TEveViewer *threeDView  = 0;
+  TEveViewer *rPhiView = 0;
+  TEveViewer *rhoZView = 0;
+  
+  TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
+  TEveWindowPack *pack = slot->MakePack();
+  pack->SetElementName("Multi View");
+  pack->SetHorizontal();
+  pack->SetShowTitleBar(kFALSE);
+  pack->NewSlot()->MakeCurrent();
+  threeDView = gEve->SpawnNewViewer("3D View", "");
+  threeDView->AddScene(gEve->GetGlobalScene());
+  threeDView->AddScene(gEve->GetEventScene());
+    
+  pack = pack->NewSlot()->MakePack();
+  pack->SetShowTitleBar(kFALSE);
+  pack->NewSlot()->MakeCurrent();
+  rPhiView = gEve->SpawnNewViewer("RPhi View", "");
+  rPhiView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  rPhiView->AddScene(rPhiGeomScene);
+  rPhiView->AddScene(rPhiEventScene);
+
+  pack->NewSlot()->MakeCurrent();
+  rhoZView = gEve->SpawnNewViewer("RhoZ View", "");
+  rhoZView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  rhoZView->AddScene(rhoZGeomScene);
+  rhoZView->AddScene(rhoZEventScene);
+
+  TEveViewerList *viewerlist = new TEveViewerList();
+  viewerlist->AddElement(gEve->GetDefaultViewer());
+
+  viewerlist->AddElement(threeDView);
+  viewerlist->AddElement(rhoZView);
+  viewerlist->AddElement(rPhiView);
+  viewerlist->AddElement(threeDView);
+  viewerlist->SwitchColorSet();
+
+  //==============================================================================
+  // Macros / QA histograms
+  //==============================================================================
+
+  // -- Registration of per-event macros
+  // -------------------------------------
+
+  AliEveMacroExecutor *exec    = new AliEveMacroExecutor();
+#if 0
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Track",   "kine_tracks.C", "kine_tracks", "", kFALSE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hit ITS", "its_hits.C",    "its_hits",    "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hit TPC", "tpc_hits.C",    "tpc_hits",    "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hit T0",  "t0_hits.C",     "t0_hits",     "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "SIM Hit FMD", "fmd_hits.C",    "fmd_hits",    "", kFALSE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "DIG FMD",     "fmd_digits.C",  "fmd_digits",  "", kFALSE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW TPC",     "tpc_raw.C",     "tpc_raw",     "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW T0",      "t0_raw.C",      "t0_raw",      "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW FMD",     "fmd_raw.C",     "fmd_raw",     "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW VZERO",   "vzero_raw.C",   "vzero_raw",   "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRawReader, "RAW ACORDE",  "acorde_raw.C",  "acorde_raw",  "", kFALSE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex",             "",                kTRUE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse",     "",                kTRUE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box",         "kFALSE, 3, 3, 3", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex_spd",         "",                kTRUE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse_spd", "",                kTRUE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box_spd",     "kFALSE, 3, 3, 3", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX",         "primary_vertex.C", "primary_vertex_tpc",         "",                kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Ellipse", "primary_vertex.C", "primary_vertex_ellipse_tpc", "",                kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC PVTX Box",     "primary_vertex.C", "primary_vertex_box_tpc",     "kFALSE, 3, 3, 3", kFALSE));
+#endif
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0",   "esd_V0_points.C",       "esd_V0_points_onfly"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0",   "esd_V0_points.C",       "esd_V0_points_offline"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC V0",   "esd_V0.C",              "esd_V0"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC CSCD", "esd_cascade_points.C",  "esd_cascade_points"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC CSCD", "esd_cascade.C",         "esd_cascade"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC KINK", "esd_kink_points.C",     "esd_kink_points"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC KINK", "esd_kink.C",            "esd_kink"));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track", "esd_tracks.C", "esd_tracks",             "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track", "esd_tracks.C", "esd_tracks_MI",          "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Track", "esd_tracks.C", "esd_tracks_by_category", "", kTRUE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC Tracklet", "esd_spd_tracklets.C", "esd_spd_tracklets", "", kFALSE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kESD, "REC ZDC",      "esd_zdc.C", "esd_zdc", "", kFALSE));
+#if 0
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus",     "clusters.C+",     "clusters", "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus ITS", "its_clusters.C+", "its_clusters"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TPC", "tpc_clusters.C+", "tpc_clusters"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TRD", "trd_clusters.C+", "trd_clusters"));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TOF", "tof_clusters.C+", "tof_clusters"));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kRunLoader, "REC Clus TPC", "vplot_tpc.C+",    "vplot_tpc", "", kFALSE));
+
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA HF",   "aod_HF.C",   "aod_HF",   "", kFALSE));
+  exec->AddMacro(new AliEveMacro(AliEveMacro::kAOD, "ANA Jets", "jetplane.C", "jetplane", "", kFALSE));
+
+  // -- QA Viewer
+  // --------------
+
+  slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
+  slot->StartEmbedding();
+  new AliQAHistViewer(gClient->GetRoot(), 600, 400, kTRUE);
+  slot->StopEmbedding("QA histograms");
+
+#endif
+
+  //==============================================================================
+  // Additional GUI components
+  //==============================================================================
+  
+  slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
+  TEveWindowTab *store_tab = slot->MakeTab();
+  store_tab->SetElementNameTitle("WindowStore",
+                                "Undocked windows whose previous container is not known\n"
+                                "are placed here when the main-frame is closed.");
+  gEve->GetWindowManager()->SetDefaultContainer(store_tab);
+  
+  return 0;
+}
+
+// -----------------------------------------------------------------
+Int_t nextEvent() {
+
+  Int_t iResult = 0;
+
+  gStyle->SetPalette(1, 0);
+  gEve->DisableRedraw();
+
+  // -- Get Next Event from HOMER
+  // ------------------------------
+  if ( ( iResult = gHomerManager->NextEvent()) ){
+    return iResult;
+  }
+
+  // -- Reset
+  // ----------
+  if ( gTPCClusters ) gTPCClusters->Reset();
+  if ( gPHOSClusters ) gPHOSClusters->Reset();
+  if ( gTPCTrack )    gTPCTrack->DestroyElements();
+
+  if (gHomerManager->GetBlockList()->IsEmpty() ) {
+    printf ("No Blocks in list ... ");
+    return;
+  }
+
+  TIter next(gHomerManager->GetBlockList());
+  AliHLTHOMERBlockDesc* block = 0;
+
+  // -- Iterate over blocks in the block list
+  // ------------------------------------------
+  while ((block = (AliHLTHOMERBlockDesc*)next())) {
+    
+    printf( "------------------- xxxxxxxxxxxxxxx ----------------------\n");
+    printf( "Detector           : %s\n", block->GetDetector().Data() );
+    printf( "Datatype           : %s\n", block->GetDataType().Data() );
+    if (block->IsTObject() )
+      printf( "Is TObject of class: %s\n", block->GetClassName().Data() );
+    printf( "------------------- xxxxxxxxxxxxxxx ----------------------\n");
+
+    // -- CHECK SOURCE
+    // -----------------------------------------------------
+    
+    // ++ HLT BLOCK
+    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    if ( ! block->GetDetector().CompareTo("HLT") ) {
+
+      // -- ESDTREE
+      if ( ! block->GetDataType().CompareTo("ALIESDV0") ) {
+       cout << "ALIESDV0 ------- ALIESDV0 ------ ALIESDV0" << endl;
+
+       if(!gTPCTrack){
+         gTPCTrack = new TEveTrackList("ESD Tracks");
+         gTPCTrack->SetMainColor(6);
+         gEve->AddElement(gTPCTrack);
+       }
+
+       iResult = processEsdTracks(block, gTPCTrack);
+      }
+
+      // -- Process ROOTObj
+      else if ( ! block->GetDataType().CompareTo("ROOTTOBJ") ) {
+               processROOTTOBJ( block );
+      } 
+
+      // -- Process HLT RDLST
+      else if ( ! block->GetDataType().CompareTo("HLTRDLST") ) {
+       processHLTRDLST( block );
+      } 
+    } // if ( ! block->GetDetector().CompareTo("HLT") ) {
+
+    // ++ TPC BLOCK
+    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    else if ( ! block->GetDetector().CompareTo("TPC") ) {
+      
+      // -- ESDTREE
+      if ( ! block->GetDataType().CompareTo("ALIESDV0") ) {
+
+      }
+    } // else if ( ! block->GetDetector().CompareTo("HLT") ) {
+
+    // ++ ITS - SPD  BLOCK
+    // +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+    else if ( ! block->GetDetector().CompareTo("ISPD") ){
+      if ( block->GetDataType().CompareTo("CLUSTERS") == 0 ) {
+       //processISPDClusters( block );
+      } 
+    } // else if ( ! block->GetDetector().CompareTo("ISPD") ){
+
+  } // while ((block = (AliHLTHOMERBlockDesc*)next())) {
+
+  if ( gTPCClusters ) gTPCClusters->ResetBBox();
+  if ( gPHOSClusters ) gPHOSClusters->ResetBBox();
+  if ( gSPDClusters ) gSPDClusters->ResetBBox();
+  if ( gTPCTrack ) gTPCTrack->ElementChanged();
+
+  
+#if 0
+  TTimeStamp ts(esd->GetTimeStamp());
+  TString win_title("Eve Main Window -- Timestamp: ");
+  win_title += ts.AsString("s");
+  win_title += "; Event # in ESD file: ";
+  win_title += esd->GetEventNumberInFile();
+  gEve->GetBrowser()->SetWindowName(win_title);
+#endif
+
+  // -- Set Projections
+  // --------------------------------------------
+  TEveElement* top = gEve->GetCurrentEvent();
+
+  // XXX Primary vertex ... to be retrieved from the ESD
+  Double_t x[3] = { 0, 0, 0 };
+
+  if (gRPhiMgr && top) {
+    gRPhiMgr->DestroyElements();
+    gRPhiMgr->SetCenter(x[0], x[1], x[2]);
+    gRPhiMgr->ImportElements(geomGentleRPhi);
+    gRPhiMgr->ImportElements(top);
+  }
+  if (gRhoZMgr && top) {
+    gRhoZMgr->DestroyElements();
+    gRhoZMgr->SetCenter(x[0], x[1], x[2]);
+    gRhoZMgr->ImportElements(geomGentleRhoZ);
+    gRhoZMgr->ImportElements(geomMuon);
+    gRhoZMgr->ImportElements(top);
+  }
+  // --------------------------------------------
+
+  gEve->Redraw3D(0,1); // (0, 1)
+  gEve->EnableRedraw(); 
+  
+  return iResult;
+}
+
+// -----------------------------------------------------------------
+void loopEvent() {
+  eventTimer.SetCommand("nextEvent()");
+  eventTimer.Start(6000);
+}
+
+// -----------------------------------------------------------------
+void stopLoopEvent() {
+  eventTimer.Stop();
+}
+
+// -----------------------------------------------------------------
+Int_t processHLTRDLST(AliHLTHOMERBlockDesc* block) {
+
+  return 0;
+}
+
+// -----------------------------------------------------------------
+Int_t processISPDClusters(AliHLTHOMERBlockDesc* block) {
+  cout<<"ISPD dump:"<<endl;
+  TObject ob = block->GetTObject();
+  ob.Dump();
+
+  return 0;
+}
+
+// -----------------------------------------------------------------
+Int_t processROOTTOBJ(AliHLTHOMERBlockDesc* block) {
+  
+  // -- AliHLTGlobalTriggerDecision
+  if ( ! block->GetClassName().CompareTo("AliHLTGlobalTriggerDecision") ) {
+
+    AliHLTGlobalTriggerDecision *trig = dynamic_cast<AliHLTGlobalTriggerDecision*> block->GetTObject();
+    trig->Print(); 
+
+    TEveText* tt = new TEveText("Trigger: Class is known ;-) ");
+    gEve->AddElement(tt);
+
+  }
+  else {
+    printf(" Unknown root object %s",block->GetClassName().Data() );
+  }
+
+  return 0;
+}
+
+// -----------------------------------------------------------------
+Int_t processEsdTracks( AliHLTHOMERBlockDesc* block, TEveTrackList* cont ) {
+
+  AliESDEvent* esd = (AliESDEvent *) (block->GetTObject());
+  esd->GetStdContent();
+
+  esd_track_propagator_setup(cont->GetPropagator(),0.1*esd->GetMagneticField(), 520);
+
+  printf( "Number of ESD Tracks : %d \n", esd->GetNumberOfTracks());
+
+  for (Int_t iter = 0; iter < esd->GetNumberOfTracks(); ++iter) {
+    AliEveTrack* track = esd_make_track(esd->GetTrack(iter), cont);
+    cont->AddElement(track);
+  }
+  
+  cont->SetTitle(Form("N=%d", esd->GetNumberOfTracks()) );
+  cont->MakeTracks();
+
+  return 0;
+}
+
+
+// Int_t tpc_clusters(TEveElement* cont=0, Float_t maxR=270)
+// {
+
+
+//   AliTPCClustersRow *clrow = new AliTPCClustersRow();
+//   clrow->SetClass("AliTPCclusterMI");
+//   clrow->SetArray(kMaxCl);
+//   cTree->SetBranchAddress("Segment", &clrow);
+
+//   tTPCClusters->SetOwnIds(kTRUE);
+
+
+//   Float_t maxRsqr = maxR*maxR;
+//   Int_t nentr=(Int_t)cTree->GetEntries();
+//   for (Int_t i=0; i<nentr; i++)
+//   {
+//     if (!cTree->GetEvent(i)) continue;
+
+//     TClonesArray *cl = clrow->GetArray();
+//     Int_t ncl = cl->GetEntriesFast();
+
+//     while (ncl--)
+//     {
+//       AliCluster *c = (AliCluster*) cl->UncheckedAt(ncl);
+//       Float_t g[3]; //global coordinates
+//       c->GetGlobalXYZ(g);
+//       if (g[0]*g[0]+g[1]*g[1] < maxRsqr)
+//       {
+//     clusters->SetNextPoint(g[0], g[1], g[2]);
+//     AliCluster *atp = new AliCluster(*c);
+//     clusters->SetPointId(atp);
+//       }
+//     }
+//     cl->Clear();
+//   }
+
+//   delete clrow;
+
+//   if (clusters->Size() == 0 && gEve->GetKeepEmptyCont() == kFALSE)
+//   {
+//     Warning("tpc_clusters.C", "No TPC clusters");
+//     delete clusters;
+//     return 1;
+//   }
+
+//   char form[1000];
+//   sprintf(form,"TPC Clusters");
+//   gTPCClusters->SetName(form);
+
+//   char tip[1000];
+//   sprintf(tip,"N=%d", gTPCClusters->Size());
+//   gTPCClusters->SetTitle(tip);
+
+//   const TString viz_tag("TPC Clusters");
+//   gTPCClusters->ApplyVizTag(viz_tag, "Clusters");
+
+//   return 0;
+// }
+
+
+
+ Int_t processTPCClusters(AliHLTHOMERBlockDesc* block, TEvePointSet *  cont) {
+  Int_t iResult = 0;
+  
+  Int_t   slice = block->GetSubDetector().Atoi();
+  Int_t   patch = block->GetSubSubDetector().Atoi();
+  Float_t phi   = ( slice + 0.5 ) * TMath::Pi() / 9.0;  
+  Float_t cos   = TMath::Cos( phi );
+  Float_t sin   = TMath::Sin( phi );
+    
+  AliHLTTPCClusterData *cd = (AliHLTTPCClusterData*) block->GetData();
+  UChar_t *data            = (UChar_t*) cd->fSpacePoints;
+
+  if ( cd->fSpacePointCnt == 0 ) {
+    printf ("No Clusters found in sector %d patch %d.\n", slice, patch );
+    iResult = -1;
+  } 
+  else {
+    
+    for (Int_t ii = 0; ii < cd->fSpacePointCnt; ++ii, data += sizeof(AliHLTTPCSpacePointData)) {
+      AliHLTTPCSpacePointData *sp = (AliHLTTPCSpacePointData *) data;
+      
+      cont->SetNextPoint(cos*sp->fX - sin*sp->fY, sin*sp->fX + cos*sp->fY, sp->fZ);
+    }
+  }
+  
+  return iResult;
+}
index 60124bc..c10c873 100644 (file)
@@ -13,7 +13,7 @@
   gSystem->Load("libAliHLTUtil");
   gSystem->Load("libHLTinterface");
   gSystem->Load("libAliHLTMUON");
-   gSystem->Load("libAliHLTTPC");
+  gSystem->Load("libAliHLTTPC");
  
   cout << "Setting include path ..." << endl;
   TString includePath = "-I${ALICE_ROOT}/include ";
diff --git a/EVE/hlt-macros/sampleConfig.xml b/EVE/hlt-macros/sampleConfig.xml
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/EVE/hlt-macros/sampleConfig_2.xml b/EVE/hlt-macros/sampleConfig_2.xml
deleted file mode 100755 (executable)
index e69de29..0000000
diff --git a/EVE/hlt-macros/test_sources.C b/EVE/hlt-macros/test_sources.C
deleted file mode 100644 (file)
index e69de29..0000000
index 9eccd4b..5842b8a 100644 (file)
@@ -96,8 +96,7 @@ void AliHLTHOMERBlockDesc::SetBlock( void * data, ULong_t size, TString origin,
   fDataType = dataType;
   fSpecification = specification; 
 
-  //  fBlockName.Form("%s_%s_0x%08LX", fDetector.Data(), fDataType.Data(), fSpecification ); 
-  fBlockName.Form("%s_%s_0", fDetector.Data(), fDataType.Data() ); 
+  fBlockName.Form("%s_%s_0x%08X", fDetector.Data(), fDataType.Data(), fSpecification ); 
 
   // -- Set block parameters
   SetBlockParameters();
index 85794e4..2234e86 100644 (file)
@@ -32,7 +32,7 @@
    using namespace std;
 #endif
 
-#define EVE_DEBUG 1
+#define EVE_DEBUG 0
 
 #include "AliHLTHOMERManager.h"
 // -- -- -- -- -- -- -- 
@@ -141,6 +141,10 @@ Int_t AliHLTHOMERManager::CreateSourcesList() {
   else if ( iResult > 0 ) {
     HLTWarning(Form("No active services found."));
   }
+  else if ( fSourceList->IsEmpty() ) {
+    HLTWarning(Form("No active services in the list."));
+    iResult = 2;
+  }
   else {
      HLTInfo(Form("New sources list created."));
 
@@ -176,35 +180,37 @@ Int_t AliHLTHOMERManager::ConnectHOMER( TString detector ){
 
   Int_t iResult = 0;
 
+  // -- Check if LibManager is present
+  if ( ! fLibManager ) {
+    HLTError(Form("No LibManager present."));
+    return -1;
+  }
+  
   // -- Check if already connected and state has not changed
   if ( fStateHasChanged == kFALSE && IsConnected() ) {
     HLTInfo(Form("No need for reconnection."));
     return iResult;
   }
-
+  
   // -- If already connected, disconnect before connect
   if ( IsConnected() )
     DisconnectHOMER();
-
+  
   // -- Create the Readoutlist
   UShort_t* sourcePorts = new UShort_t [fSourceList->GetEntries()];
   const char ** sourceHostnames = new const char* [fSourceList->GetEntries()];
   UInt_t sourceCount = 0;
-
+  
   CreateReadoutList( sourceHostnames, sourcePorts, sourceCount, detector );
   if ( sourceCount == 0 ) {
     HLTError(Form("No sources selected, aborting."));
-    return -1;
+    return -2;
   }
 
   // *** Connect to data sources
-  if ( !fReader && fLibManager )
+  if ( !fReader )
     fReader = fLibManager->OpenReader( sourceCount, sourceHostnames, sourcePorts );
-  else {
-    HLTError(Form("No LibManager present."));
-    return -2;
-  }
-    
+  
   iResult = fReader->GetConnectionStatus();
   if ( iResult ) {
     // -- Connection failed
@@ -279,15 +285,17 @@ Int_t AliHLTHOMERManager::ReconnectHOMER( TString detector="" ){
  * ---------------------------------------------------------------------------------
  */
 
-
 //##################################################################################
 Int_t AliHLTHOMERManager::NextEvent(){
   // see header file for class documentation
 
   Int_t iResult = 0;
   Int_t iRetryCount = 0;
-
-  if ( !fReader || ! IsConnected() ) {
+  
+  if ( !IsConnected() || fStateHasChanged )
+    ConnectHOMER();
+  
+  if ( !fReader || !IsConnected() ) {
     HLTWarning(Form( "Not connected yet." ));
     return -1;
   }
@@ -459,11 +467,12 @@ void AliHLTHOMERManager::CreateBlockList() {
     // -- Check sources list if block is requested
     if ( CheckIfRequested( block ) ) {
       fBlockList->Add( block );
-      
     }
     else {
-      delete block;
-      block = NULL;
+      // XXX HACK Jochen
+      fBlockList->Add( block );
+      //      delete block;
+      //      block = NULL;
     }
  
   } while( GetNextBlk() );
@@ -613,7 +622,7 @@ Bool_t AliHLTHOMERManager::CheckIfRequested( AliHLTHOMERBlockDesc * block ) {
     // -- Check if source is selected
     if ( ! source->IsSelected() )
       continue;
-        
+    
     // -- Check if detector matches
     if ( source->GetSourceName().CompareTo( block->GetBlockName() ) )
       continue;
@@ -623,7 +632,7 @@ Bool_t AliHLTHOMERManager::CheckIfRequested( AliHLTHOMERBlockDesc * block ) {
 
   } // while ( ( source = dynamic_cast<AliHLTHOMERSourceDesc*>(next()) ) ) {
   
-#if 0 //EVE_DEBUG
+#if EVE_DEBUG
   if ( requested ) {
     HLTInfo(Form("Block requested : %s", block->GetBlockName().Data())); 
   }
index 51dea91..c0ff11e 100644 (file)
@@ -285,7 +285,7 @@ Int_t AliHLTHOMERProxyHandler::ProcessXmlRpcResponse() {
   // -- Get Content
   TString xmlContent(node->GetText() );
 
-  HLTInfo(Form("XMLContent: %s",xmlContent.Data()));
+  HLTDebug(Form("XMLContent: %s",xmlContent.Data()));
 
   iResult = xmlParser.ParseBuffer(xmlContent.Data(), xmlContent.Length());
   if ( iResult < 0 ) {
@@ -295,7 +295,6 @@ Int_t AliHLTHOMERProxyHandler::ProcessXmlRpcResponse() {
     return iResult;
   }
   
-
   if ( !xmlParser.GetXMLDocument()->GetRootNode()->HasChildren() ) {
     HLTWarning(Form("No Services active."));
     return 1;
index dd753df..f818cf2 100644 (file)
@@ -78,12 +78,11 @@ void AliHLTHOMERSourceDesc::SetService( TString hostname, Int_t port, TString or
   fDetector.Remove( TString::kTrailing, ' ' );
 
   // -- Temporary until Specification is set in service
-  fSpecification = spec.Atoi();
+  fSpecification = static_cast<ULong_t>(spec.Atoll());
   fSubDetector = 0;
   fSubSubDetector = 0;
 
   fSourceName.Form("%s_%s_0x%08X", fDetector.Data(), fDataType.Data(), fSpecification ); 
-  //fSourceName.Form("%s_%s_0", fDetector.Data(), fDataType.Data() ); 
 
   return;
 }
index 455b9d3..0932e81 100644 (file)
@@ -45,7 +45,9 @@ Int_t HOMERManager() {
 
   printf( "== CONNECT HOMER ==\n" );
   
-  iResult = hM->ConnectHOMER("TRD");
+  // Empty argument should connect to all
+  //iResult = hM->ConnectHOMER();
+    iResult = hM->ConnectHOMER("HLT");
   if (iResult) return iResult;
   
   printf( "== NEXT EVENT ==\n" );
@@ -57,10 +59,6 @@ Int_t HOMERManager() {
 
   TObject * object =  NULL;  
 
-  //  TList* bl = hM->GetBlockList();
-  //bl->Dump();
-
-
   TIter next(hM->GetBlockList());
   AliHLTHOMERBlockDesc* block = NULL;