-Created new libarey AliHLTEve with processor classes for the HLT online display
authorslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Mar 2010 16:00:15 +0000 (16:00 +0000)
committerslindal <slindal@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Mar 2010 16:00:15 +0000 (16:00 +0000)
-Created new binarey alihlteve for the hlt display

46 files changed:
EVE/EveHLT/AliEveHOMERManager.cxx
EVE/EveHLT/AliEveHOMERManager.h
EVE/EveHLT/AliEveHOMERManagerEditor.cxx
EVE/alieve_main/alihlteve_main.cxx [new file with mode: 0644]
EVE/binalieve.pkg
EVE/binalihlteve.pkg [new file with mode: 0644]
EVE/hlt-macros/od.C [new file with mode: 0644]
EVE/hlt-macros/onlineDisplay.C
EVE/libEveHLT.pkg
HLT/BASE/AliHLTHOMERManager.cxx
HLT/EVE/AUTHORS [new file with mode: 0644]
HLT/EVE/AliHLTEveAny.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveAny.h [new file with mode: 0644]
HLT/EVE/AliHLTEveBase.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveBase.h [new file with mode: 0644]
HLT/EVE/AliHLTEveCalo.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveCalo.h [new file with mode: 0644]
HLT/EVE/AliHLTEveEmcal.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveEmcal.h [new file with mode: 0644]
HLT/EVE/AliHLTEveHLT.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveHLT.h [new file with mode: 0644]
HLT/EVE/AliHLTEveISDD.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveISDD.h [new file with mode: 0644]
HLT/EVE/AliHLTEveISPD.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveISPD.h [new file with mode: 0644]
HLT/EVE/AliHLTEveISSD.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveISSD.h [new file with mode: 0644]
HLT/EVE/AliHLTEveITS.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveITS.h [new file with mode: 0644]
HLT/EVE/AliHLTEveMuon.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveMuon.h [new file with mode: 0644]
HLT/EVE/AliHLTEvePhos.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEvePhos.h [new file with mode: 0644]
HLT/EVE/AliHLTEveTPC.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveTPC.h [new file with mode: 0644]
HLT/EVE/AliHLTEveTRD.cxx [new file with mode: 0644]
HLT/EVE/AliHLTEveTRD.h [new file with mode: 0644]
HLT/EVE/ChangeLog [new file with mode: 0644]
HLT/EVE/Makefile.am [new file with mode: 0644]
HLT/EVE/NEWS [new file with mode: 0644]
HLT/EVE/README [new file with mode: 0644]
HLT/EVE/configure.ac [new file with mode: 0644]
HLT/EVE/tutorial.c [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSConstant.h
HLT/PHOS/AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h
HLT/libAliHLTEve.pkg [new file with mode: 0644]

index 23820df2916af47f33b773358e05738b449745a9..8141d5b927d2858246034b4679c1f902af428b7b 100644 (file)
@@ -1,14 +1,15 @@
 //-*- Mode: C++ -*-
 
 // $Id$
-// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
+// Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007              *
 // Author: Jochen Thaeder <thaeder@kip.uni-heidelberg.de>                *
+// Author: 2010 Svein Lindal <slindal@fys.uio.no>                        *
 //         for The ALICE HLT Project.                                    *
 
 
 
 /** @file   AliEveHOMERManager.cxx
-    @author Jochen Thaeder and Svein Lindal
+    @author Jochen Thaeder,  Svein Lindal <slindal@fys.uio.no>
     @date
     @brief  Manager for HOMER online
 */
 #endif
 
 #include "unistd.h"
-//#include "TIter.h"
+#include "TEveManager.h"
+#include "TTimer.h"
+#include "TEveScene.h"
+#include "TEveProjectionManager.h"
+#include "TEveBrowser.h"
+
 #include "AliEveHOMERManager.h"
 #include "AliHLTHOMERBlockDesc.h"
-//#include <TEveElementList.h>
 #include "AliHLTHOMERManager.h"
 #include "AliHLTTriggerDecision.h"
+#include "AliHLTEvePhos.h"
+#include "AliHLTEveEmcal.h"
+#include "AliHLTEveTPC.h"
+#include "AliHLTEveHLT.h"
+#include "AliHLTEveITS.h"
+#include "AliHLTEveISPD.h"
+#include "AliHLTEveISSD.h"
+#include "AliHLTEveISDD.h"
+#include "AliHLTEveTRD.h"
+#include "AliHLTEveMuon.h"
+#include "AliHLTEveAny.h"
+#include "AliEveHOMERSourceList.h"
+
+//#include "TTimer.h"
 
 ClassImp(AliEveHOMERManager)
   
@@ -35,30 +54,141 @@ ClassImp(AliEveHOMERManager)
   
 //##################################################################################
 AliEveHOMERManager::AliEveHOMERManager() :
-     TEveElementList("Homer Manager"),
-     AliHLTHOMERManager(), 
-     fSrcList(NULL),
-     fRetryCount(1),
-     fRetrySleeptime(10000)
+TEveElementList("Homer Manager"),
+  AliHLTHOMERManager(), 
+  fSrcList(NULL),
+  fRetryCount(1000),
+  fRetrySleeptime(15),
+  fGeoManager(NULL),
+  fEveManager(NULL),
+  fRPhiManager(NULL),
+  fRhoZManager(NULL),
+  fRPhiEventScene(NULL),
+  fRhoZEventScene(NULL),
+  fTimer(NULL),
+//  fSourceListTimer(NULL),
+  fPhosElement(NULL), 
+  fEmcalElement(NULL), 
+  fTPCElement(NULL),
+  fHLTElement(NULL),
+  fITSElement(NULL),
+  fISPDElement(NULL),
+  fISSDElement(NULL),
+  fISDDElement(NULL),
+  fTRDElement(NULL),
+  fMuonElement(NULL),
+  fAnyElement(NULL),
+  fEventLoopStarted(kFALSE),
+  fCenterProjectionsAtPrimaryVertex(kFALSE),
+  fShowBarrel(kTRUE),
+  fShowMuon(kFALSE) 
 {
-  
-// see header file for class documentation
+  // see header file for class documentation
   // or
   // refer to README to build package
   // or
   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+   
+  fTimer = new TTimer();
+  fTimer->Connect("Timeout()", "AliEveHOMERManager", this, "NextHOMEREvent()" );
+
+  //fSourceListTimer = new TTimer();
+
+  fPhosElement = new AliHLTEvePhos();
+  fPhosElement->SetEventManager(this);
+   
+  fEmcalElement = new AliHLTEveEmcal();
+  fEmcalElement->SetEventManager(this);
+   
+  fTPCElement = new AliHLTEveTPC();
+  fTPCElement->SetEventManager(this);
+   
+  fHLTElement = new AliHLTEveHLT();
+  fHLTElement->SetEventManager(this);
+   
+  fITSElement = new AliHLTEveITS();
+  fITSElement->SetEventManager(this);
+  
+  fISPDElement = new AliHLTEveISPD();
+  fISPDElement->SetEventManager(this);
+
+  fISDDElement = new AliHLTEveISDD();
+  fISDDElement->SetEventManager(this);
+
+  fISSDElement = new AliHLTEveISSD();
+  fISSDElement->SetEventManager(this);
+
+  fTRDElement = new AliHLTEveTRD();
+  fTRDElement->SetEventManager(this);
+
 }
 
 //##################################################################################
 AliEveHOMERManager::~AliEveHOMERManager() {
  // see header file for class documentation 
 
+  DestroyElements();
+  DestroyDetectorElements();
+
+}
+
+
+
+void AliEveHOMERManager::DestroyDetectorElements(){
+  //See header file for documentation
   if (fSrcList)
     delete fSrcList;
   fSrcList = NULL;
+
+  if (fPhosElement)
+    delete fPhosElement;
+  fPhosElement = NULL;
+
+  if(fEmcalElement)
+    delete fEmcalElement;
+  fEmcalElement = NULL;
+
+  if(fTPCElement)
+    delete fTPCElement;
+  fTPCElement = NULL;
+
+  if(fHLTElement)
+    delete fHLTElement;
+  fHLTElement = NULL;
+
+  if(fITSElement)
+    delete fITSElement;
+  fITSElement = NULL;
+
+  if(fISSDElement)
+    delete fISSDElement;
+  fISSDElement = NULL;
+
+  if(fISDDElement)
+    delete fISDDElement;
+  fISDDElement = NULL;
+
+  if(fISPDElement)
+    delete fISPDElement;
+  fISPDElement = NULL;
+
+  if(fTRDElement)
+    delete fTRDElement;
+  fTRDElement = NULL;
+
+  if(fMuonElement)
+    delete fMuonElement;
+  fMuonElement = NULL;
+  if(fAnyElement)
+    delete fAnyElement;
+  fAnyElement = NULL;
+  
+
 }
 
+
+
 /*
  * ---------------------------------------------------------------------------------
  *                                 Source Handling
@@ -72,23 +202,38 @@ Int_t AliEveHOMERManager::CreateEveSourcesList() {
   DestroyElements();
 
   Int_t iResult = CreateSourcesList();
+
+  //  fStateHasChanged = kTRUE;
   
-  fStateHasChanged = kTRUE;
-  
+  HLTInfo(Form("iResult XXX %d", iResult));
   if ( iResult )
     return iResult;
 
-  if (fSrcList)
-    delete fSrcList;
-  fSrcList = NULL;
+
+  HLTInfo(Form("iResult %d", iResult));
+  if (fSrcList) {
+    HLTInfo(Form("delete source list", iResult));
+    DestroyElements();
+    //delete fSrcList;
+    fSrcList = NULL;
+    //fSrcList->Clear();
+    HLTInfo(Form("cleared source list", iResult));
+  }
+
 
   // -- Create new AliEVE sources list 
-  fSrcList = new AliEveHOMERSourceList("HLT Sources");
-  fSrcList->SetManager(this);
-    
-  AddElement(fSrcList);
-  fSrcList->CreateByType();
+  if(!fSrcList){
+    HLTInfo(Form("no source list", iResult));
+    fSrcList = new AliEveHOMERSourceList("HLT Sources");
+    fSrcList->SetManager(this);
     
+    AddElement(fSrcList);
+  }
+
+  HLTInfo(Form("createbytype", iResult));
+  fSrcList->CreateByDet();
+  HLTInfo(Form("did it", iResult));    
+  
   return iResult;
 }
 
@@ -99,23 +244,27 @@ Int_t AliEveHOMERManager::CreateEveSourcesListLoop() {
   Int_t iResult = 0;
 
   for ( Int_t retry = 0; retry < fRetryCount ; retry++ ) {
-  
+
     iResult = CreateEveSourcesList();
-    if (!iResult) 
+
+    if (!iResult) {
+      HLTInfo("Source list successfully created.");
       break;
-    
+    }
     else if (iResult == 1) {
       HLTWarning( Form("Couldn't find active services, sleeping %d s before making attempt %d out of %d", fRetrySleeptime, retry, fRetryCount) ) ;
     }   
     else if (iResult == 2) {
-      HLTWarning( Form("Services List empty, sleeping %d s", fRetrySleeptime) ) ;
+      HLTWarning( Form("Services List empty, sleeping %d s before making new attempt.", fRetrySleeptime) ) ;
     }
     else {
       HLTError( Form("Other problem ... \n") ); 
       return iResult;
     } 
-    
+
+    //fSourceListTimer->Start(fRetrySleeptime, kFALSE);
     sleep(fRetrySleeptime);
+
   }
 
   if ( iResult ) {
@@ -130,8 +279,272 @@ Int_t AliEveHOMERManager::CreateEveSourcesListLoop() {
 Int_t AliEveHOMERManager::ConnectEVEtoHOMER( TString detector ) {
   // see header file for class documentation
 
+  HLTInfo("");
   fStateHasChanged = fSrcList->GetSelectedSources();
-  
+  HLTInfo(Form("has state changed % d", fStateHasChanged));
   return ConnectHOMER(detector);
 }
 
+
+//##################################################################################
+Int_t AliEveHOMERManager::ReConnectHOMER( TString detector ){
+  // see header file for class documentation
+  
+  Int_t iResult = 0;
+
+  DisconnectHOMER();
+  iResult = CreateEveSourcesListLoop();
+  HLTInfo("Created new source list, reconnect to HOMER");
+  iResult = ConnectEVEtoHOMER();
+  if ( iResult ) {
+    HLTError(Form("Error reconnecting."));
+  }
+
+  return iResult;
+}
+
+
+//_____________________________________________________________________________________
+Int_t AliEveHOMERManager::NextHOMEREvent() {
+  //See header file for documentation  
+  Int_t iResult = 0;
+
+  
+  //Loop over blocks
+  AliHLTHOMERBlockDesc * block = NULL;
+  if ( NextEvent() ) {
+    
+    HLTInfo("Failed getting next event, trying to reconnect");
+    iResult = ReConnectHOMER();
+    return NextHOMEREvent();
+  }
+  
+  //We have a new event, reset display items (need to check if there really is anything interesting in event before resetting. ie not just histos)
+  ResetDisplay();
+  
+  //Process the SYNCED block list
+  if ( GetBlockList() == NULL) {
+    printf ("onlineDisplay:   No regular BlockList ... \n");
+    cout << endl;
+    //return -1;
+   
+  } else {
+    
+    if (GetBlockList()->IsEmpty() ) {
+      printf ("onlineDisplay:   No Sync Blocks in list ... \n");
+      cout<<endl;
+      //return;
+    }  
+   
+    
+    TIter next(GetBlockList());
+   
+    while ((block = (AliHLTHOMERBlockDesc*)next())) {
+      ProcessBlock(block);
+     
+    } 
+  }
+
+
+  //Read out histograms and elements from detectors outside physics 1 partition
+  TIter anext(GetAsyncBlockList());
+
+  while ( (block = (AliHLTHOMERBlockDesc*)anext()) ) {
+    HLTInfo("Process block");
+    ProcessBlock(block);
+    HLTInfo("Processed block");
+    
+  }
+  
+  UpdateDisplay();
+
+  return 0;
+
+}
+
+void  AliEveHOMERManager::UpdateDisplay() {
+  //See header file for documentation
+  fPhosElement->UpdateElements();
+  fEmcalElement->UpdateElements();
+  fTPCElement->UpdateElements();
+  fHLTElement->UpdateElements();
+  fITSElement->UpdateElements();
+  fISSDElement->UpdateElements();
+  fISDDElement->UpdateElements();
+  fISPDElement->UpdateElements();
+  fTRDElement->UpdateElements();
+  if(fAnyElement) fAnyElement->UpdateElements();
+  if(fMuonElement) fMuonElement->UpdateElements();
+
+
+  // -- Set EventID in Window Title  
+
+  TString winTitle("Eve Main Window -- Event ID : ");
+  winTitle += Form("0x%016X ", GetEventID() );
+  GetEveManager()->GetBrowser()->SetWindowName(winTitle);
+
+  //==============================================================================
+  // -- Import global scene into projection scenes
+  //==============================================================================
+
+  // XXX Primary vertex ... to be retrieved from the ESD
+  Double_t x[3] = { 0, 0, 0 };
+  
+  TEveElement* top = GetEveManager()->GetCurrentEvent();
+  
+  if (fRPhiManager && top) {
+    fRPhiEventScene->DestroyElements();
+    if (fCenterProjectionsAtPrimaryVertex)
+      fRPhiManager->SetCenter(x[0], x[1], x[2]);
+    fRPhiManager->ImportElements(top, fRPhiEventScene);
+  }
+  
+  if (fRhoZManager && top) {
+    fRhoZEventScene->DestroyElements();
+    if (fCenterProjectionsAtPrimaryVertex)
+      fRhoZManager->SetCenter(x[0], x[1], x[2]);
+    fRhoZManager->ImportElements(top, fRhoZEventScene);
+  }
+
+
+  //Redraw the display
+  GetEveManager()->Redraw3D(0,1); // (0, 1)
+  GetEveManager()->EnableRedraw(); 
+
+}
+
+void AliEveHOMERManager::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+  
+#if 1//DEBUG
+  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");
+#endif
+
+
+  if(fShowBarrel) {
+
+    if ( ! block->GetDetector().CompareTo("PHOS") ) 
+      fPhosElement->ProcessBlock(block);
+    
+    else if ( ! block->GetDetector().CompareTo("EMCA") ) 
+      fEmcalElement->ProcessBlock(block);
+  
+    else if ( ! block->GetDetector().CompareTo("TPC") ) 
+      fTPCElement->ProcessBlock(block);
+  
+    else if ( ! block->GetDetector().CompareTo("HLT") ) 
+      fHLTElement->ProcessBlock(block);
+  
+    else if ( ! block->GetDetector().CompareTo("ITS") ) 
+      fITSElement->ProcessBlock(block);
+  
+    else if ( ! block->GetDetector().CompareTo("ISDD") ) 
+      fISDDElement->ProcessBlock(block);
+  
+    else if ( ! block->GetDetector().CompareTo("ISPD") ) 
+      fISPDElement->ProcessBlock(block);
+  
+    else if ( ! block->GetDetector().CompareTo("ISSD") ) 
+      fISSDElement->ProcessBlock(block);
+
+    else if ( ! block->GetDetector().CompareTo("TRD") ) 
+      fTRDElement->ProcessBlock(block);
+   
+    else if ( ! block->GetDetector().CompareTo("MUON") ) {
+      //Do Nothing
+       
+
+    } else {
+      if(!fAnyElement) {
+       fAnyElement = new AliHLTEveAny();
+       fAnyElement->SetEventManager(this);
+      } 
+      fAnyElement->ProcessBlock(block);
+    }
+     
+  }
+
+   
+  if(fShowMuon) {
+    if ( ! block->GetDetector().CompareTo("MUON") ) {
+      if(!fMuonElement) {
+       fMuonElement = new AliHLTEveMuon();
+       fMuonElement->SetEventManager(this);
+      }
+      fMuonElement->ProcessBlock(block);
+    }
+  }
+
+}
+
+void AliEveHOMERManager::ResetDisplay () {
+  //See header file for documentation
+
+ if(fPhosElement)
+   fPhosElement->ResetElements();
+ if(fEmcalElement)
+   fEmcalElement->ResetElements();
+ if(fTPCElement)
+   fTPCElement->ResetElements();
+ if(fHLTElement)
+   fHLTElement->ResetElements();
+ if(fITSElement)
+   fITSElement->ResetElements();
+ if(fISPDElement)
+   fISPDElement->ResetElements();
+ if(fISDDElement)
+   fISDDElement->ResetElements();
+ if(fISSDElement)
+   fISSDElement->ResetElements();
+
+ if (fTRDElement)
+   fTRDElement->ResetElements();
+
+ if(fAnyElement)
+   fAnyElement->ResetElements();
+
+ if(fMuonElement)
+   fMuonElement->ResetElements();
+
+}
+
+
+void AliEveHOMERManager::StartLoop() {
+  //See header file for documentation
+  //fTimer->SetCommand("NextEvent()", "AliEveHOMERManager", this);
+  SetEventLoopStarted(kTRUE);
+  fTimer->Start(3000);
+}
+
+void AliEveHOMERManager::StopLoop() {
+  //See header file for documentation
+  fTimer->Stop();
+  SetEventLoopStarted(kFALSE);
+}
+
+// void AliEveHOMERManager::TimeOut(Int_t sec) {
+  
+//   TTimer t(sec*1000, kFALSE);
+
+//   cout << "Start timer for " << sec << " seconds" << endl;
+
+//   while (!t.CheckTimer(gSystem->Now()))
+//     gSystem->Sleep(100);  // 100 ms sleep
+
+//   cout << "Timed out." << endl;
+
+// }
index ec1156772974e8f38e5c51cb3ba9f0d6044fb7e7..5612fd0696a39d89e996a5543ef4e6e5c9931d38 100644 (file)
  * See cxx source for full Copyright notice                               */
 
 /** @file   AliEveHOMERManager.h
-    @author Jochen Thaeder
+    @author Jochen Thaeder, Svein Lindal
     @date
-    @brief  Manager for HOMER in offline. Inherits most functionalitye
-    from AliHLTHOMERManager, with small additions for alieve interface
+    @brief  Manager for HOMER in HLT . Inherits some functionalitye
+    from AliHLTHOMERManager, mainly from TEveEventManager
 */
-#include <AliHLTHOMERManager.h>
-//\#include <TEveElementList.h>
-#include "AliEveHOMERSourceList.h"
-#include "TString.h"
-class TEveElementList;
-
-class AliEveHOMERManager : public TEveElementList, public AliHLTHOMERManager
-{
+#include "AliHLTHOMERManager.h"
+#include <TEveEventManager.h>
+#include <TGeoManager.h>
+
+class AliEveHOMERSourceList;
+class TString;
+class TEveManager;
+class TEveScene;
+class TEveProjectionManager;
+class TTimer;
+
+class AliHLTEvePhos;
+class AliHLTEveEmcal;
+class AliHLTEveTPC;
+class AliHLTEveHLT;
+class AliHLTEveITS;
+class AliHLTEveISSD;
+class AliHLTEveISDD;
+class AliHLTEveISPD;
+class AliHLTEveTRD;
+class AliHLTEveAny;
+class AliHLTEveMuon;
+
+class AliEveHOMERManager : public TEveElementList, public AliHLTHOMERManager {
+
 public:
 
   /*
@@ -43,26 +60,51 @@ public:
   /** destructor */
   virtual ~AliEveHOMERManager();
 
-
-  /*
-   * ---------------------------------------------------------------------------------
-   *                            Source Handling - public
-   * ---------------------------------------------------------------------------------
-   */
-
-  /** Create Sources List from HOMER-Proxy 
-   *  @return 0 on success, <0 for failure, 1 for no active service
-   */
+  /** Connect to avahi and get the list for sources */
   Int_t CreateEveSourcesList();
 
+  /** Keep on looking for sources until some are found */
   Int_t CreateEveSourcesListLoop();
   
+  /** Connect to the sources found */
   Int_t ConnectEVEtoHOMER(TString detector="ALL");
 
-  void SetRetryCount(Int_t count, Int_t sleeptime) { fRetryCount = count; fRetrySleeptime = sleeptime; }
+  /** Delete current connections to sources and reconnect */
+  Int_t ReConnectHOMER( TString detector="" );
 
-  ///////////////////////////////////////////////////////////////////////////////////
+  /** Set the retry count for source list loop */
+  void SetRetryCount(Int_t count, Int_t sleeptime) { fRetryCount = count; fRetrySleeptime = sleeptime; }
+  
+  /** Get next event and process it */
+  Int_t NextHOMEREvent();
+
+  /** Set flag for event loop */
+  void SetEventLoopStarted (Bool_t started) {fEventLoopStarted = started;}
+
+  /** Set flag for showing barrel */
+  void SetBarrelFlag(Bool_t flag) { fShowBarrel = flag;}
+  /** Set flag for showing muon arm */
+  void SetMuonFlag(Bool_t flag) { fShowMuon = flag;}
+
+  /**Set and get the global instance of the Eve manager */
+  void SetEveManager(TEveManager * manager) {fEveManager = manager;}
+  TEveManager * GetEveManager() const {return fEveManager;}
+
+  /**Set and get the global instance of TGeoManager */
+  void SetGeoManager(TGeoManager * manager) {fGeoManager = manager;}
+  TGeoManager * GetGeoManager() const {return fGeoManager;}
+
+  /** Set the projection scenes and their managers */
+  void SetRPhiManager (TEveProjectionManager * mgr) {fRPhiManager = mgr;}
+  void SetRPhiEventScene (TEveScene * scene ) {fRPhiEventScene = scene;}
+  void SetRhoZManager(TEveProjectionManager * mgr) {fRhoZManager = mgr;}
+  void SetRhoZEventScene(TEveScene * scene ) {fRhoZEventScene = scene;}
+  
 
+  /** Start and stop the automatic event loop */
+  void StartLoop();
+  void StopLoop();
 private:
 
   /** copy constructor prohibited */
@@ -71,23 +113,50 @@ private:
   /** assignment operator prohibited */
   AliEveHOMERManager& operator=(const AliEveHOMERManager&);
 
-  /*
-   * ---------------------------------------------------------------------------------
-   *                            Members - private
-   * ---------------------------------------------------------------------------------
-   */
+  void DestroyDetectorElements();
+  
+  /** Process block */
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);  //Process block
+  /** Reset the elements in the display */
+  void ResetDisplay();  
+  /** Update the display  */
+  void UpdateDisplay(); 
 
   // == sources ==
-  AliEveHOMERSourceList* fSrcList;                // List of Connected HOMER Sources
-
-  Int_t fRetryCount;
-
-  Int_t fRetrySleeptime;
-
+  AliEveHOMERSourceList* fSrcList;        // List of Connected HOMER Sources
+
+  Int_t fRetryCount;                     //How many times to retry creating source list before giving up
+  Int_t fRetrySleeptime;                 //Sleep time between attempt at craeting source list
+
+  TGeoManager * fGeoManager;              //The global TGeoManager instance
+  TEveManager * fEveManager;              //The global TEveManager instance
+  TEveProjectionManager * fRPhiManager;   //The R - Phi projection scene manager
+  TEveProjectionManager * fRhoZManager;   //The Rho- Z projection sene manager
+  TEveScene * fRPhiEventScene;            //The R - Phi projection scene
+  TEveScene * fRhoZEventScene;            //The Rho - Z projection sene
+
+
+  TTimer * fTimer;                   //Timer for event loop
+  //TTimer * fSourceListTimer;       //Timer for source list loop
+  AliHLTEvePhos  * fPhosElement;     //Phos eve processor
+  AliHLTEveEmcal * fEmcalElement;    //Emcal eve processor
+  AliHLTEveTPC   * fTPCElement;      //TPC eve processor
+  AliHLTEveHLT   * fHLTElement;      //HLT
+  AliHLTEveITS   * fITSElement;      //ITS
+  AliHLTEveISPD  * fISPDElement;     //ISPD
+  AliHLTEveISSD  * fISSDElement;     //ISSD
+  AliHLTEveISDD  * fISDDElement;     //ISDD
+  AliHLTEveTRD   * fTRDElement;      //TRD
+  AliHLTEveMuon  * fMuonElement;     //MUON
+  AliHLTEveAny   * fAnyElement;      //Catch all
+
+  Bool_t fEventLoopStarted;                    // Flag indicating whether the loop is running
+  Bool_t fCenterProjectionsAtPrimaryVertex;    // Flag indicating whether to center the projection scenes at primary vertex (as opposed to 0, 0, 0)
+  Bool_t fShowBarrel;                               // Display barrel detectors ?
+  Bool_t fShowMuon;                                 // Display Muon arm ?
+   
   ClassDef(AliEveHOMERManager, 0); // Manage connections to HLT data-sources.
 
 };
-
-
-
 #endif
index e7fe429450c72e3c2425d7db3322e55c3a10158f..15ca37b38c7aeb3b5c028c7e133ac5ef93241aa2 100644 (file)
@@ -110,14 +110,7 @@ void AliEveHOMERManagerEditor::SetModel(TObject* obj) {
 
 void AliEveHOMERManagerEditor::NextEvent() {
   // call next event from macro
-
-  if ( fM->NextEvent() )
-    return;
-
-    
-  gROOT->ProcessLineFast("processEvent();");
-
-  return;
+  fM->NextHOMEREvent();
 }
 
 void AliEveHOMERManagerEditor::WriteBlockListToFile() {
@@ -152,16 +145,21 @@ void AliEveHOMERManagerEditor::NavigateBack() {
 }
 
 void AliEveHOMERManagerEditor::EventLoop() {
-
   // Start/stop event loop
   if ( !fEventLoopStarted ) {
-    gROOT->ProcessLineFast("loopEvent();");
     fEventLoopStarted = kTRUE;
     fButtonEventLoopText->SetText(" Stop Loop ");
-  }
-  else {
-    gROOT->ProcessLineFast("stopLoopEvent();");
+    //fM->SetEventLoopStarted(kTRUE);
+    fM->StartLoop();
+    
+    //    gROOT->ProcessLineFast("loopEvent();");
+  
+  } else {
+    
+    //gROOT->ProcessLineFast("stopLoopEvent();");
+    fM->StopLoop();
     fEventLoopStarted = kFALSE;
+    //fM->SetEventLoopStarted(kFALSE);
     fButtonEventLoopText->SetText(" Loop Events ");
   }
 }
diff --git a/EVE/alieve_main/alihlteve_main.cxx b/EVE/alieve_main/alihlteve_main.cxx
new file mode 100644 (file)
index 0000000..556094b
--- /dev/null
@@ -0,0 +1,96 @@
+// $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.                                                 *
+ **************************************************************************/
+
+#include <EveBase/AliEveConfigManager.h>
+
+#include <TInterpreter.h>
+#include <TRint.h>
+#include <TROOT.h>
+#include <TPRegexp.h>
+#include <TSystem.h>
+#include <TError.h>
+#include <RVersion.h>
+
+#include <AliLog.h>
+
+#include <TEveUtil.h>
+#include <TEveManager.h>
+#include <TEveSelection.h>
+#include <TEveBrowser.h>
+
+#include <Getline.h>
+
+int main(int argc, char **argv)
+{
+  static const TEveException kEH("alihlteve::main");
+
+  if (gSystem->Getenv("ALICE_ROOT") == 0)
+  {
+    Error(kEH.Data(), "ALICE_ROOT is not defined, aborting.");
+    gSystem->Exit(1);
+  }
+
+  TString evedir(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
+
+  if (gSystem->AccessPathName(evedir) == kTRUE)
+  {
+    Error(kEH.Data(), "Directory $ALICE_ROOT/EVE does not exist.");
+    gSystem->Exit(1);
+  }
+
+  TString macPath(gROOT->GetMacroPath());
+  macPath += Form(":%s/macros", evedir.Data());
+  gInterpreter->AddIncludePath(evedir);
+  if (gSystem->Getenv("ALICE_ROOT") != 0)
+  {
+    macPath += Form(":%s/alice-macros", evedir.Data());
+    gInterpreter->AddIncludePath(Form("%s/EVE", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(Form("%s/PWG0", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(Form("%s/include", gSystem->Getenv("ALICE_ROOT")));
+    gInterpreter->AddIncludePath(gSystem->Getenv("ALICE_ROOT"));
+  }
+  {
+    // TabCom fails on double-colon in macro-path.
+    // I fixed this in ROOT sometime ago ... could be removed
+    // when we go to 5.26.
+    TPMERegexp doubleColon(":{2,}", "og");
+    doubleColon.Substitute(macPath, ":");
+  }
+  gROOT->SetMacroPath(macPath);
+
+  // get a logger instance
+  AliLog *log = AliLog::GetRootLogger();
+  TRint  *app = new TRint("App", &argc, argv);
+
+#if ROOT_VERSION_CODE >= ROOT_VERSION(5,25,4) || defined XXX_LATEST_ROOT
+  // Waiting for update by Pawel. Now GED in ROOT is better again :)
+  // Uncomment when fixed in AliEveGedXXX.
+  // TEveGListTreeEditorFrame::SetEditorClass("AliEveGedEditor");
+#endif
+
+  TEveManager::Create();
+  gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound);
+  gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound);
+
+  gEve->RegisterGeometryAlias("Default", Form("%s/alice-data/default_geo.root", evedir.Data()));
+
+  AliEveConfigManager::InitializeMaster();
+
+  app->Run(kTRUE);
+
+  if (gEve && gEve->GetBrowser())
+    gEve->GetBrowser()->UnmapWindow();
+  TEveManager::Terminate();
+
+  app->Terminate(0);
+
+  //  delete log;
+
+  return 0;
+}
index 669c4c3358288af5aa09ad921438aeb181f88e3c..435d3c0658716913465a73fbe144e929d43845b7 100644 (file)
@@ -3,12 +3,12 @@
 SRCS  := alieve_main/alieve_main.cxx
 CSRCS :=
 
-$(BINPATH)/alieve: $(EveBaseLIB) $(EveDetLIB) $(EveHLTLIB)
+$(BINPATH)/alieve: $(EveBaseLIB) $(EveDetLIB) 
 
 EINCLUDE :=
 ELIBSDIR :=
 
-ELIBS    := EveBase EveDet EveHLT \
+ELIBS    := EveBase EveDet \
   MUONbase MUONevaluation MUONmapping MUONshuttle MUONcalib MUONgeometry \
   MUONraw MUONsim MUONcore MUONgraphics MUONrec MUONtrigger \
   TPCbase TPCsim TPCrec TPCfast \
diff --git a/EVE/binalihlteve.pkg b/EVE/binalihlteve.pkg
new file mode 100644 (file)
index 0000000..6f8f7e0
--- /dev/null
@@ -0,0 +1,56 @@
+#-*- Mode: Makefile -*-
+
+SRCS  := alieve_main/alihlteve_main.cxx
+CSRCS :=
+
+$(BINPATH)/alihlteve: $(EveBaseLIB) $(EveHLTLIB)
+
+EINCLUDE :=
+ELIBSDIR :=
+
+ELIBS    := EveBase EveHLT \
+  HLTbase AliHLTUtil AliHLTEve AliHLTTPC TPCcalib AliHLTRCU \
+  TPCbase TPCsim TPCrec \
+  ITSbase ITSrec \
+  TRDbase TRDrec AliHLTTRD \
+  PHOSbase PHOSUtils \
+  EMCALbase EMCALUtils EMCALrec EMCALsim TRIGGERbase VZERObase VZEROrec VZEROsim TRIGGERbase \
+  MUONbase MUONevaluation MUONmapping MUONshuttle MUONcalib MUONgeometry \
+  MUONraw MUONsim MUONcore MUONgraphics MUONrec MUONtrigger \
+  STEERBase ESD AOD CDB STEER MONITOR \
+  ANALYSIS ANALYSISalice \
+  FASTSIM microcern \
+  RAWDatabase RAWDatarec RAWDatasim \
+   XMLParser STAT
+
+PACKBLIBS := $(ROOTCLIBS) $(ROOTPLIBS) -lTreePlayer -lGeomPainter -lGed -lRGL -lEve $(SYSLIBS)
+
+.PHONY default: alihlteve_clean_compiled_macros
+
+alihlteve_clean_compiled_macros:
+       @echo "***** Removing .d and .$(SOEXT) files from EVE/hlt-macros/ *****"
+       $(MUTE)rm -f $(ALICE_ROOT)/EVE/hlt-macros/*_C.d
+       $(MUTE)rm -f $(ALICE_ROOT)/EVE/hlt-macros/*_C.$(SOEXT)
+       $(MUTE)rm -f -R $(HOME)/.trdQArec
+       $(MUTE)rm -f -R $(HOME)/.QArec
+
+ifeq (macosx,$(ALICE_TARGET))
+
+# On Mac OS X gcc we need GL
+ELIBS+=GL
+ELIBSDIR+=/usr/X11R6/lib/
+
+ELIBSCPP:=$(filter-out microcern,$(ELIBS))
+ELIBSCPP:=$(filter-out lhapdf,$(ELIBSCPP))
+ELIBSCPP:=$(filter-out herwig,$(ELIBSCPP))
+PACKLDFLAGS:=$(LDFLAGS) $(ELIBSCPP:%=-Wl,-u,_G__cpp_setupG__%)
+ifeq (5,$(MACOSX_MINOR))
+# This is a bug in OS 10.5
+# see http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug
+PACKLDFLAGS+=-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
+endif
+# On Mac OS X gcc we need f2c and GLU
+ELIBS+=GLU
+ELIBSDIR+=$(FINK_ROOT)/lib
+
+endif
diff --git a/EVE/hlt-macros/od.C b/EVE/hlt-macros/od.C
new file mode 100644 (file)
index 0000000..3b62df8
--- /dev/null
@@ -0,0 +1,974 @@
+//-*- Mode: C++ -*-
+
+// ** USED macros :
+// ***************************************************
+// - hlt_alieve_init.C
+// - VizDB_scan.C
+// - geom_gentle_hlt.C
+// - geom_gentle_muon.C
+// ***************************************************
+
+#if !defined(__CINT__) || defined(__MAKECINT__)
+
+//****************** ROOT ******************************************
+#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 "TFile.h"
+#include "TH2.h"
+#include "TCanvas.h"
+#include "TColor.h"
+#include "TVector3.h"
+
+//****************** ROOT/EVE **************************************
+#include "TEveManager.h"
+
+#include "AliEveHOMERManager.h"
+
+#include "geom_gentle_hlt.C"
+
+#endif
+
+
+
+// -----------------------------------------------------------------
+// --                       Geometry / Scenes                     --
+// -----------------------------------------------------------------
+
+TEveGeoShape *gGeomGentle     = 0;
+TEveGeoShape *gGeomGentleRPhi = 0;
+TEveGeoShape *gGeomGentleRhoZ = 0;
+TEveGeoShape *gGeomGentleTRD  = 0;
+TEveGeoShape *gGeomGentleMUON = 0;
+
+TEveScene *gRPhiGeomScene  = 0;
+TEveScene *gRhoZGeomScene  = 0;
+TEveScene *gRPhiEventScene = 0;
+TEveScene *gRhoZEventScene = 0;
+
+TEveProjectionManager *gRPhiMgr = 0;
+TEveProjectionManager *gRhoZMgr = 0;
+
+TEveViewer *g3DView   = 0;
+TEveViewer *gRPhiView = 0;
+TEveViewer *gRhoZView = 0;
+
+// -----------------------------------------------------------------
+// --                Geometry / Scenes Parameters                 --
+// -----------------------------------------------------------------
+
+// -- Parameters to show different geometries
+Bool_t gShowMUON     = kTRUE;
+Bool_t gShowMUONRPhi = kFALSE;
+Bool_t gShowMUONRhoZ = kTRUE;
+Bool_t gShowTRD      = kFALSE;
+
+
+// -----------------------------------------------------------------
+// --                         Members                            --
+// -----------------------------------------------------------------
+
+// -- Timer for automatic event loop
+TTimer                                    eventTimer;
+TTimer                                    eventTimerFast;
+
+// -- HOMERManager
+AliEveHOMERManager*                       gHomerManager      = 0;
+
+// -- Geometry Manager 
+TGeoManager*                              gGeoManager        = 0;
+AliPHOSGeometry*                          gPHOSGeom          = 0;
+
+// -- Cluster members
+TEvePointSet*                             gSPDClusters       = 0;
+TEvePointSet*                             gSSDClusters       = 0;
+TEvePointSet*                             gSDDClusters       = 0;
+TEvePointSet*                             gTRDClusters       = 0;
+TEvePointSetArray*                        gTRDColClusters    = 0;
+TEvePointSet*                             gTPCClusters       = 0;
+TEvePointSet*                             gTPCTestClusters       = 0;
+TEvePointSetArray*                        gTPCColClusters    = 0;
+TEveBoxSet*                               gPHOSBoxSet[5]     = {0, 0, 0, 0, 0}; 
+TEveBoxSet*                               gEMCALBoxSet[13]   = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+TEvePointSet*                             gMUONClusters      = 0;
+TEveStraightLineSet*                      gMUONTracks        = 0;
+
+// -- Text output members
+TEveText*                                 gHLTText           = 0;
+
+// -- Tracks members
+TEveTrackList*                            gTPCTrack          = 0;
+
+// -- Canvas for histograms
+TCanvas*                                  gTRDCanvas         = 0;
+TCanvas*                                  gTPCCanvas         = 0;
+TCanvas*                                  gTPCClustCanvas          = 0;
+TCanvas*                                  gTRDCalibCanvas    = 0;
+TCanvas*                                  gTRDEORCanvas      = 0;
+TCanvas*                                  gPrimVertexCanvas  = 0;
+TCanvas*                                  gSPDVertexCanvas   = 0;
+TCanvas*                                  gITSCanvas         = 0;
+TCanvas*                                  gSSDCanvas0        = 0;
+TCanvas*                                  gSSDCanvas1        = 0;
+TCanvas*                                  gV0Canvas          = 0;
+TCanvas*                                  gPHOSCanvas          = NULL;
+TCanvas*                                  gEMCALCanvas          = 0;
+
+// -- vertex --
+Int_t                                     gSPDVertexHistoCount  = 0;
+
+
+
+// -- TRD --
+Int_t                                     gTRDHistoCount     = 0;
+Int_t                                     gTRDEvents         = 0;
+Int_t                                     gTRDBins           = 12;
+
+// -- TPC --
+Int_t                                     gTPCBins           = 15;
+TH1F*                                     gTPCCharge         = 0;
+TH1F*                                     gTPCQMax           = 0;
+TH1F*                                     gTPCQMaxOverCharge = 0;
+
+TH1F*                                     gTPCPt        = 0; // KK
+TH1F*                                     gTPCEta       = 0; 
+TH1F*                                     gTPCPsi       = 0; 
+TH1F*                                     gTPCnClusters = 0; 
+TH1F*                                     gTPCMult      = 0;
+
+// -- PHOS --
+TEveElementList*                          gPHOSElementList   = 0;
+Int_t                                     gPHOSHistoCount    =0;
+// -- EMCAL
+TEveElementList*                          gEMCALElementList  = 0;
+TGeoNode*                                 gEMCALNode         = 0;
+Int_t                                     gEMCALHistoCount    =0;
+
+// --- Flag if eventloop is running
+Bool_t                                    gEventLoopStarted = kFALSE;
+
+
+
+//Container for gGeoManager till it is broken
+TGeoManager *fGeoManager = 0;
+// -----------------------------------------------------------------
+// --                          Methods                            --
+// -----------------------------------------------------------------
+
+Int_t initializeEveViewer( Bool_t showBarrel, Bool_t showMuon );
+
+void writeToFile();
+
+
+// #################################################################
+// #################################################################
+// #################################################################
+
+// -----------------------------------------------------------------
+void od ( Bool_t showBarrel = kTRUE, Bool_t showMuon = kFALSE ) {
+
+  // -- Loading Geometry
+  // ---------------------
+  Int_t run = 67179;
+  AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+  AliCDBManager::Instance()->SetRun(run);
+  AliGeomManager::LoadGeometry();
+
+
+  // Get the pointer to gGeoManager before it's broken (bug in alieve)
+  fGeoManager = gGeoManager;
+
+    // -- Initialize pointsets and add macros
+  // ----------------------------------------
+  //TEveUtil::LoadMacro("hlt_alieve_init.C");
+  //hlt_alieve_init(".", -1);
+
+  // -- Initialize Eve
+  // -------------------
+  initializeEveViewer( showBarrel, showMuon );
+
+  // -- Reset gGeoManager to the original pointer
+  // ----------------------------------------------
+
+  // -- Finalize Eve
+  // -----------------
+  gSystem->ProcessEvents();
+  gEve->Redraw3D(kTRUE);
+
+  // -- Create new hM object
+  // -------------------------
+  gHomerManager = new AliEveHOMERManager();
+  gHomerManager->SetRetryCount(1000,15);
+  gHomerManager->SetEveManager(gEve);
+  gHomerManager->SetGeoManager(gGeoManager);
+  gHomerManager->SetRPhiManager(gRPhiMgr);
+  gHomerManager->SetRPhiEventScene(gRPhiEventScene);
+  gHomerManager->SetRhoZManager(gRhoZMgr);
+  gHomerManager->SetRhoZEventScene(gRhoZEventScene);
+  gHomerManager->SetBarrelFlag(showBarrel);
+  gHomerManager->SetMuonFlag(showMuon);
+
+  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. Giving up. \n");
+    return;
+  } 
+
+
+  if ( showBarrel ) {
+    gHomerManager->ConnectEVEtoHOMER("TPC" );
+  } else if ( MUONMode ) {
+    gHomerManager->ConnectEVEtoHOMER("MUON");
+  } else if( TRDMode ) {
+    gHomerManager->ConnectEVEtoHOMER("TRD");  
+  } else {
+    cout<<" No detectors selected, nothing will be displayed"<<endl;
+  }    
+
+  gGeoManager = fGeoManager;
+  
+
+}
+
+// -------------------------------------------------------------------------
+Int_t initializeEveViewer( Bool_t showBarrel, Bool_t showMuon ) {
+  
+  //=============================================================================
+  // Visualization database
+  //============================================================================
+
+  TEveUtil::AssertMacro("VizDB_scan.C");
+  
+  //  alieve_vizdb();
+  
+
+
+  //==============================================================================
+  // -- Geometry, scenes, projections and viewers
+  //==============================================================================
+
+  TEveBrowser         *browser = gEve->GetBrowser();
+  browser->ShowCloseTab(kFALSE);
+  
+  // -- Disable extra geometry
+  // ---------------------------
+  if (!showMuon)
+    gShowMUON = gShowMUONRPhi = gShowMUONRhoZ = kFALSE;
+  
+  // -- Load Geometry
+  // ------------------
+  TEveUtil::LoadMacro("geom_gentle_hlt.C");
+  gGeomGentle = geom_gentle_hlt();
+  gGeomGentleRPhi = geom_gentle_rphi(); gGeomGentleRPhi->IncDenyDestroy();
+  gGeomGentleRhoZ = geom_gentle_rhoz(); gGeomGentleRhoZ->IncDenyDestroy();
+  gGeomGentleTRD  = geom_gentle_trd();
+
+  gGeoManager = fGeoManager;
+
+  gEMCALNode = gGeoManager->GetTopVolume()->FindNode("XEN1_1");
+
+  TEveGeoTopNode* emcal_re = new TEveGeoTopNode(gGeoManager, gEMCALNode);
+  gEve->AddGlobalElement(emcal_re);
+  gEve->Redraw3D();
+
+  if (gShowMUON) 
+    gGeomGentleMUON = geom_gentle_muon(kFALSE);
+  
+  // -- Scenes
+  // -----------
+  gRPhiGeomScene  = gEve->SpawnNewScene("RPhi Geometry",
+                    "Scene holding projected geometry for the RPhi view.");
+  gRhoZGeomScene  = gEve->SpawnNewScene("RhoZ Geometry",
+                   "Scene holding projected geometry for the RhoZ view.");
+  gRPhiEventScene = gEve->SpawnNewScene("RPhi Event Data",
+                   "Scene holding projected geometry for the RPhi view.");
+  gRhoZEventScene = gEve->SpawnNewScene("RhoZ Event Data",
+                   "Scene holding projected geometry for the RhoZ view.");
+
+  // -- Projection managers
+  // ------------------------
+
+  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);
+    gRPhiGeomScene->AddElement(a);
+  }
+  gRPhiMgr->SetCurrentDepth(-10);
+  gRPhiMgr->ImportElements(gGeomGentleRPhi, gRPhiGeomScene);
+  gRPhiMgr->SetCurrentDepth(0);
+  gRPhiMgr->ImportElements(gGeomGentleTRD, gRPhiGeomScene);
+  if (gShowMUONRPhi) gRPhiMgr->ImportElements(gGeomGentleMUON, gRPhiGeomScene);
+
+  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);
+    gRhoZGeomScene->AddElement(a);
+  }
+  gRhoZMgr->SetCurrentDepth(-10);
+  gRhoZMgr->ImportElements(gGeomGentleRhoZ, gRhoZGeomScene);
+  gRhoZMgr->SetCurrentDepth(0);
+  gRhoZMgr->ImportElements(gGeomGentleTRD, gRhoZGeomScene);
+  
+  if (gShowMUONRhoZ) gRhoZMgr->ImportElements(gGeomGentleMUON, gRhoZGeomScene);
+
+  // -- Viewers
+  // ------------
+
+  TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
+  TEveWindowPack *pack = slot->MakePack();
+  pack->SetElementName("Multi View");
+  pack->SetHorizontal();
+  pack->SetShowTitleBar(kFALSE);
+  pack->NewSlot()->MakeCurrent();
+  g3DView = gEve->SpawnNewViewer("3D View", "");
+  g3DView->AddScene(gEve->GetGlobalScene());
+  g3DView->AddScene(gEve->GetEventScene());
+
+
+
+  pack = pack->NewSlot()->MakePack();
+  pack->SetShowTitleBar(kFALSE);
+  pack->NewSlot()->MakeCurrent();
+  gRPhiView = gEve->SpawnNewViewer("RPhi View", "");
+  gRPhiView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  gRPhiView->AddScene(gRPhiGeomScene);
+  gRPhiView->AddScene(gRPhiEventScene);
+
+  pack->NewSlot()->MakeCurrent();
+  gRhoZView = gEve->SpawnNewViewer("RhoZ View", "");
+  gRhoZView->GetGLViewer()->SetCurrentCamera(TGLViewer::kCameraOrthoXOY);
+  gRhoZView->AddScene(gRhoZGeomScene);
+  gRhoZView->AddScene(gRhoZEventScene);
+
+
+   
+  //Add HLT Text to windows
+  TGLOverlayButton *ob1 = new TGLOverlayButton(g3DView->GetGLViewer(),  "HLT", 0, 20, 110, 60);
+  ob1->SetAlphaValues(0.8, 0.8);
+  //  cout << "color" << ob1->GetBackColor() << endl;
+  //ob1->SetBackColor(8421631);
+  //ob1->SetBackColor(10492431);
+  TGLOverlayButton *ob2 = new TGLOverlayButton(g3DView->GetGLViewer(),  "ALICE", 0, 0, 110, 20);
+  ob2->SetAlphaValues(0.8, 0.8);
+  //ob2->SetBackColor(0.2);
+  TGLOverlayButton *ob3 = new TGLOverlayButton(gEve->GetDefaultGLViewer(),  "HLT", 0, 20, 110, 60);
+  ob3->SetAlphaValues(0.8, 0.8);
+  TGLOverlayButton *ob4 = new TGLOverlayButton(gEve->GetDefaultGLViewer(),  "ALICE", 0, 0, 110, 20);
+  ob4->SetAlphaValues(0.8, 0.8);
+
+
+  TGLOverlayButton *ne = new TGLOverlayButton(gEve->GetDefaultGLViewer(),  "Next Event", 110, 0, 210, 20);
+  ne->SetAlphaValues(0.0, 0.8);
+
+  // -- List of Viewers
+  // --------------------
+
+  TEveViewerList *viewerlist = new TEveViewerList();
+  viewerlist->AddElement(gEve->GetDefaultViewer());
+  
+  viewerlist->AddElement(g3DView);
+  viewerlist->AddElement(gRhoZView);
+  viewerlist->AddElement(gRPhiView);
+  viewerlist->SwitchColorSet();
+
+  //==============================================================================
+  // -- Macros / QA histograms
+  //==============================================================================
+
+  // -- Registration of per-event macros
+  // -------------------------------------
+
+  AliEveMacroExecutor *exec    = new AliEveMacroExecutor();
+
+
+
+  gStyle->SetPalette(1, 0);
+
+
+  
+  return 0;
+}
+
+// -----------------------------------------------------------------
+void nextEvent() {
+
+  if ( gHomerManager->NextEvent() ) {
+    if (gEventLoopStarted) {
+      cout << "HomerManager failed getting next event, trying to reconnect" << endl;
+
+      gHomerManager->DisconnectHOMER();
+      gHomerManager->ConnectEVEtoHOMER();
+      nextEvent();
+   
+    } else {
+      return;
+    }
+  }
+
+  //  processEvent();
+}
+
+
+
+// -----------------------------------------------------------------
+
+
+Int_t updateDisplay() {
+
+  Int_t iResult = 0;
+
+  
+    
+  //==============================================================================
+  // -- Set EventID in Window Title  
+  // -- Update Objects
+  //==============================================================================
+
+  TString winTitle("Eve Main Window -- Event ID : ");
+  winTitle += Form("0x%016X ", gHomerManager->GetEventID() );
+  gEve->GetBrowser()->SetWindowName(winTitle);
+
+  //==============================================================================
+  // -- Set Projections
+  //==============================================================================
+
+  // XXX Primary vertex ... to be retrieved from the ESD
+  Double_t x[3] = { 0, 0, 0 };
+  
+  TEveElement* top = gEve->GetCurrentEvent();
+  
+  if (gRPhiMgr && top) {
+    gRPhiEventScene->DestroyElements();
+    if (gCenterProjectionsAtPrimaryVertex)
+      gRPhiMgr->SetCenter(x[0], x[1], x[2]);
+    gRPhiMgr->ImportElements(top, gRPhiEventScene);
+  }
+  
+  if (gRhoZMgr && top) {
+    gRhoZEventScene->DestroyElements();
+    if (gCenterProjectionsAtPrimaryVertex)
+      gRhoZMgr->SetCenter(x[0], x[1], x[2]);
+    gRhoZMgr->ImportElements(top, gRhoZEventScene);
+  }
+
+  //==============================================================================
+
+  gEve->Redraw3D(0,1); // (0, 1)
+  gEve->EnableRedraw(); 
+
+  return iResult;
+
+}
+
+
+
+// -----------------------------------------------------------------
+Int_t processROOTTOBJ(AliHLTHOMERBlockDesc* block, TEveText* /*et*/) {
+  
+  // -- AliHLTGlobalTriggerDecision
+  if ( ! block->GetClassName().CompareTo("AliHLTGlobalTriggerDecision") ) {
+
+    AliHLTGlobalTriggerDecision *trig = dynamic_cast<AliHLTGlobalTriggerDecision*>( block->GetTObject());
+    trig->Print(); 
+    
+    // et->SetText("balle");;
+
+    // TEveText* tt = new TEveText("Trigger: Class is known ;-) ");
+    // gEve->AddElement(tt);
+
+  }
+  else {
+    printf(" Unknown root object %s",block->GetClassName().Data() );
+  }
+
+  return 0;
+}
+
+
+// -----------------------------------------------------------------
+Int_t processMUONClusters(AliHLTHOMERBlockDesc* block) {
+  
+  Int_t iResult = 0;
+  
+  unsigned long size = block->GetSize();
+  Int_t * buffer ;
+
+  buffer = (Int_t *)block->GetData();
+//   cout<<"block size : "<<size<<", buffer : "<<buffer<<", DataType : "<<block->GetDataType()<<endl;
+
+// //   for(int idata=0;idata<int(size);idata++)
+// //     printf("\tbuffer[%d] : %d\n",idata,buffer[idata]);
+  
+  
+  
+  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;
+      if(hit->fX!=0.0 && hit->fY!=0.0 && hit->fZ!=0.0)
+       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;
+         if(hit->fX!=0.0 && hit->fY!=0.0 && hit->fZ!=0.0)
+           gMUONClusters->SetNextPoint(hit->fX,hit->fY,hit->fZ);
+         hit++;
+       }// trig chamber loop
+      trigrec++;
+    }//trig hit loop
+  }//else trigger
+
+  return iResult;
+}
+
+// -----------------------------------------------------------------
+Int_t processMUONTracks(AliHLTHOMERBlockDesc* block) {
+  
+  Int_t iResult = 0;
+  
+  unsigned long size = block->GetSize();
+  Int_t * buffer = (Int_t *)block->GetData();
+  AliHLTMUONRecHitStruct hit1,hit2;
+  hit1.fX = hit1.fY = hit1.fZ = hit2.fX = hit2.fY = hit2.fZ = 0;
+  Int_t ch1=0, ch2=0;
+  Float_t x0=0.0,y0=0.0,z0=0.0;
+  Float_t x3=0.0,y3=0.0,z3=0.0;
+  if(block->GetDataType().CompareTo("MANTRACK") == 0){  
+    AliHLTMUONMansoTracksBlockReader mantrackblock(buffer, size);
+    const AliHLTMUONMansoTrackStruct* mtrack = mantrackblock.GetArray();
+    for(AliHLTUInt32_t ientry = 0; ientry < mantrackblock.Nentries(); ientry++){
+      const AliHLTMUONRecHitStruct* hit = &mtrack->fHit[0];
+      for(AliHLTUInt32_t ch = 0; ch < 4; ch++){
+       // cout << setw(10) << left << ch + 7 << setw(0);
+       // cout << setw(13) << left << hit->fX << setw(0);
+       // cout << setw(13) << left << hit->fY << setw(0);
+       // cout << hit->fZ << setw(0) << endl;
+       if(hit->fZ != 0.0){
+         if(ch==0 || ch==1){
+           hit1 = *hit; ch1 = ch+6;
+         }else{
+           hit2 = *hit; ch2 = ch+6;
+         }
+       }
+       hit++;
+      }// trig chamber loop
+      // printf("ch : %d, (X,Y,Z) : (%f,%f,%f)\n",ch1,hit1.fX,hit1.fY,hit1.fZ);
+      // printf("ch : %d, (X,Y,Z) : (%f,%f,%f)\n",ch2,hit2.fX,hit2.fY,hit2.fZ);
+      // meminfo();
+      z3 = AliMUONConstants::DefaultChamberZ(ch2+4);
+      y3 =  hit1.fY - (hit1.fZ-z3)*(hit1.fY - hit2.fY)/(hit1.fZ - hit2.fZ) ;
+      x3 =  hit1.fX - (hit1.fZ-z3)*(hit1.fX - hit2.fX)/(hit1.fZ - hit2.fZ) ;
+
+      z0 = AliMUONConstants::DefaultChamberZ(ch1);
+      y0 =  hit1.fY - (hit1.fZ-z0)*(hit1.fY - hit2.fY)/(hit1.fZ - hit2.fZ) ;
+      x0 =  hit1.fX - (hit1.fZ-z0)*(hit1.fX - hit2.fX)/(hit1.fZ - hit2.fZ) ;
+      
+
+      gMUONTracks->AddLine(x0,y0,z0,x3,y3,z3);
+      mtrack++;
+    }
+    cout<<"NofManso Tracks : "<<mantrackblock.Nentries()<<endl;
+  }
+  
+  return iResult;
+
+}
+
+// -----------------------------------------------------------------
+Int_t processTRDClusters(AliHLTHOMERBlockDesc* block, TEvePointSet *cont, TEvePointSetArray *contCol) {
+  
+  Int_t iResult = 0;
+
+  Int_t sm = block->GetSubDetector();
+  if ( sm == 6 ) sm = 7;
+  
+  Float_t phi   = ( sm + 0.5 ) * TMath::Pi() / 9.0;  
+  Float_t cos   = TMath::Cos( phi );
+  Float_t sin   = TMath::Sin( phi );
+  
+  Byte_t* ptrData = reinterpret_cast<Byte_t*>(block->GetData());
+  UInt_t ptrSize = block->GetSize();
+
+  for (UInt_t size = 0; size+sizeof(AliHLTTRDCluster) <= ptrSize; size+=sizeof(AliHLTTRDCluster) ) {
+    AliHLTTRDCluster *cluster = reinterpret_cast<AliHLTTRDCluster*>(&(ptrData[size]));
+   
+    AliTRDcluster *trdCluster = new AliTRDcluster;
+    cluster->ExportTRDCluster( trdCluster );
+   
+    contCol->Fill(cos*trdCluster->GetX() - sin*trdCluster->GetY(), 
+                  sin*trdCluster->GetX() + cos*trdCluster->GetY(), 
+                  trdCluster->GetZ(),
+                  trdCluster->GetQ() );    
+     
+    cont->SetNextPoint(cos*trdCluster->GetX() - sin*trdCluster->GetY(), 
+                      sin*trdCluster->GetX() + cos*trdCluster->GetY(), trdCluster->GetZ());
+  }
+  
+  return iResult;
+}
+
+// -----------------------------------------------------------------
+Int_t processTRDHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {
+
+  Int_t iResult = 0;
+
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    ++gTRDHistoCount;
+  
+    TVirtualPad* pad = canvas->cd(gTRDHistoCount);
+    histo->Draw();
+    pad->SetGridy();
+    pad->SetGridx();
+
+    if ( ! strcmp(histo->GetName(), "nscls") ) {
+      gTRDEvents = static_cast<Int_t>(histo->GetEntries());
+        histo->GetXaxis()->SetRangeUser(0.,15.);
+    }
+
+    if ( ! strcmp(histo->GetName(),"sclsdist") ||
+        ! strcmp(histo->GetName(),"evSize") )
+      pad->SetLogy();
+  }
+
+  gTRDCanvas->Update();
+
+  return iResult;
+}
+
+// -----------------------------------------------------------------
+Int_t processPrimVertexHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {
+
+  Int_t iResult = 0;
+
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    if( histo ){
+      TString name(histo->GetName());
+      if( !name.CompareTo("primVertexZ") ){
+       canvas->cd(2);
+       histo->Draw();
+      }else if( !name.CompareTo("primVertexX") ){
+       canvas->cd(3);
+       histo->Draw();
+      }else if( !name.CompareTo("primVertexY") ){
+       canvas->cd(4);
+       histo->Draw();
+      }
+    }
+  }  else if ( ! block->GetClassName().CompareTo("TH2F")) {
+    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());
+    if (hista ){
+       TString name(hista->GetName());
+       if( !name.CompareTo("primVertexXY")) {      
+        canvas->cd(1);
+        hista->Draw();
+       }
+    }
+  }
+  canvas->cd();
+
+  return iResult;
+}
+
+// -----------------------------------------------------------------
+Int_t processSPDVertexHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {
+
+  Int_t iResult = 0;
+
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    ++gSPDVertexHistoCount;
+  
+    canvas->cd(gSPDVertexHistoCount);
+    histo->Draw();
+
+  }  
+  else if ( ! block->GetClassName().CompareTo("TH2F")) {
+    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());
+    if (hista) {
+      ++gSPDVertexHistoCount;
+  
+      canvas->cd(gSPDVertexHistoCount);
+      hista->Draw();
+    }
+  }
+  canvas->cd();
+
+  return iResult;
+}
+
+// -----------------------------------------------------------------
+Int_t processV0Histograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {
+
+  cout << "Processing to see if it's V0 histogram, !!!!!!!!!"<<endl;
+
+  Int_t iResult = 0;
+  bool update = 0;
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    if( histo ){
+      TString name(histo->GetName());
+      if( !name.CompareTo("hKShort") ){
+       canvas->cd(1);
+       histo->Draw();
+       update = 1;
+      }else if( !name.CompareTo("hLambda") ){
+       canvas->cd(3);
+       histo->Draw();
+       update = 1;
+      }
+    }
+  }  else if ( ! block->GetClassName().CompareTo("TH2F")) {
+    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());
+    if (hista ){
+       TString name(hista->GetName());
+       if( !name.CompareTo("hAP")) {      
+        canvas->cd(2);
+        hista->Draw();
+        update = 1;
+       }
+       else if( !name.CompareTo("hGammaXY")) {      
+        canvas->cd(4);
+        hista->Draw();
+        update = 1;
+       }
+    }
+  }
+  if( update ){
+    canvas->cd();
+    canvas->Update();
+  }
+  return iResult;
+}
+
+
+
+//*-------------------------------------------------------------------------------------- 
+Int_t processTRDCalibHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {
+  Int_t iResult = 0;
+
+  TObjArray *HistArray=(TObjArray*)block->GetTObject();
+  Int_t nCalibHistos=HistArray->GetEntriesFast();
+  for(Int_t CalibHistoCount=0;CalibHistoCount<nCalibHistos;CalibHistoCount++){
+    canvas->cd(CalibHistoCount+1);
+    
+    if(HistArray->At(CalibHistoCount)->InheritsFrom("TH2S")){
+        TH2S *histCalib=(TH2S*)(HistArray->At(CalibHistoCount));
+        histCalib->Draw("colz");
+       }
+     else if(HistArray->At(CalibHistoCount)->InheritsFrom("TH2")){
+      //TH2D *histCalib=dynamic_cast<TH2D*>(HistArray->At(CalibHistoCount));
+      TH2D *histCalib=(TH2D*)(HistArray->At(CalibHistoCount));
+      histCalib->Draw("lego2");
+    }
+    else if(HistArray->At(CalibHistoCount)->InheritsFrom("TH1")){
+      //TH1D *histCalib=dynamic_cast<TH1D*>(HistArray->At(CalibHistoCount));
+      TH1D *histCalib=(TH1D*)(HistArray->At(CalibHistoCount));
+      histCalib->Draw();
+    }
+    else if(HistArray->At(CalibHistoCount)->InheritsFrom("AliTRDCalibraVdriftLinearFit")){
+      //TH2S *histCalib = ((dynamic_cast<AliTRDCalibraVdriftLinearFit*>(HistArray->At(CalibHistoCount)))->GetLinearFitterHisto(10,kTRUE));
+      TH2S *histCalib =(TH2S*)(((AliTRDCalibraVdriftLinearFit*)HistArray->At(CalibHistoCount))->GetLinearFitterHisto(10,kTRUE));
+
+      histCalib->Draw();
+    }
+    
+   
+  }
+  
+  gTRDCalibCanvas->Update();
+
+ return iResult;
+}
+//****************************************************************************
+
+
+
+
+void writeToFile(){
+
+  TList * bList = gHomerManager->GetBlockList();
+  if(bList){
+    TFile * file = TFile::Open(Form("Event_0x%016X_ITS.root", gHomerManager->GetEventID()), "RECREATE"); 
+    bList->Write("blockList", TObject::kSingleKey);
+    file->Close();
+  }
+  
+  bList = gHomerManager->GetAsyncBlockList();
+  if(bList){
+    TFile * afile = TFile::Open(Form("Event_0x%016X_Async.root", gHomerManager->GetEventID()), "RECREATE"); 
+    bList->Write("blockList", TObject::kSingleKey);
+  }afile->Close();
+    
+}
+
+
+// -----------------------------------------------------------------
+void loopEvent() {
+  eventTimer.SetCommand("nextEvent()");
+  eventTimer.Start(3000);
+}
+
+// -----------------------------------------------------------------
+void stopLoopEvent() {
+  eventTimer.Stop();
+}
+
+
+
+
+Int_t processTRDBlock (AliHLTHOMERBlockDesc * block) {
+
+   Int_t iResult = 0;
+
+  if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {
+     
+    if(!gTRDClusters){
+      gTRDClusters = new TEvePointSet("TRD Clusters");
+      gTRDClusters->SetMainColor(kBlue);
+      gTRDClusters->SetMarkerStyle((Style_t)kFullDotSmall);
+      //gEve->AddElement(gTRDClusters);
+    } 
+
+    if(!gTRDColClusters){
+      gTRDColClusters = new TEvePointSetArray("TRD Clusters Colorized");
+      gTRDColClusters->SetMainColor(kRed);
+      gTRDColClusters->SetMarkerStyle(4); // antialiased circle
+      //         gTRDColClusters->SetMarkerStyle((Style_t)kFullDotSmall);
+      gTRDColClusters->SetMarkerSize(0.4);
+      gTRDColClusters->InitBins("Cluster Charge", gTRDBins, 0., gTRDBins*100.);
+
+      //TColor::SetPalette(1, 0); // Spectrum palette
+      const Int_t nCol = TColor::GetNumberOfColors();
+      for (Int_t ii = 0; ii < gTRDBins+1; ++ii)
+       gTRDColClusters->GetBin(ii)->SetMainColor(TColor::GetColorPalette(ii * nCol / (gTRDBins+2)));
+         
+      gEve->AddElement(gTRDColClusters);
+    } 
+
+    iResult = processTRDClusters( block, gTRDClusters, gTRDColClusters );
+    //gTRDClusters->ElementChanged();
+    gTRDColClusters->ElementChanged();
+  }
+
+  // -- Process TRD Histograms
+  else if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) {
+    if(!gTRDCanvas) {
+      gTRDCanvas = createCanvas("TRD", "TRD");
+      gTRDCanvas->Divide(3,2);
+    }
+    iResult = processTRDHistograms( block, gTRDCanvas );     
+  }
+
+  else if(block->GetDataType().CompareTo("CALIBRAH")==0){
+     
+    if(!gTRDCalibCanvas){
+      gTRDCalibCanvas = createCanvas("TRD Calib", "TRD Calib");
+      gTRDCalibCanvas->Divide(2,2);
+    }
+     
+    iResult=processTRDCalibHistograms(block,gTRDCalibCanvas);
+  }
+
+  else if(block->GetDataType().CompareTo("CALIBEOR")==0){
+     
+    if(!gTRDEORCanvas){
+      gTRDEORCanvas = createCanvas("TRD QA", "TRD QA");
+      gTRDEORCanvas->Divide(3,2);       
+    }
+  
+    iResult=processTRDCalibHistograms(block,gTRDEORCanvas);
+  }
+  return iResult;
+}
+
+
+
+        
+
+
+void processHLTBlock(AliHLTHOMERBlockDesc * block) {
+
+  if ( ! block->GetDataType().CompareTo("ALIESDV0") ) {
+    if(!gTPCTrack){
+      gTPCTrack = new TEveTrackList("ESD Tracks");
+      gTPCTrack->SetMainColor(6);
+      gEve->AddElement(gTPCTrack);
+    }
+    
+    processEsdTracks(block, gTPCTrack);
+    gTPCTrack->ElementChanged();
+  } 
+  
+  else if ( ! block->GetDataType().CompareTo("ROOTTOBJ") ) {
+    processROOTTOBJ( block, gHLTText );
+  } 
+
+  else if ( ! block->GetDataType().CompareTo("HLTRDLST") ) {
+    processHLTRDLST( block );
+  } 
+
+  else if ( !block->GetDataType().CompareTo("ROOTHIST") ) {      
+    processPrimVertexHistograms( block , gPrimVertexCanvas);
+    gPrimVertexCanvas->Update();    
+  }
+
+} 
index fd2d0bdbc8eef0985fd772eb203e5135bb743ad6..08b2b81c54f19eeb1a8daeeb3ce219e35a988850 100644 (file)
@@ -336,11 +336,11 @@ void processTPCBlock(AliHLTHOMERBlockDesc * block);
 void processITSBlock(AliHLTHOMERBlockDesc * block);
 //Generic functions
 
-TCanvas * createCanvas(TString  tabTitle, TString  canvasTitle );
+TCanvas * CreateCanvas(TString  tabTitle, TString  canvasTitle );
 
 Int_t updateDisplay();
 
-Int_t addHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount );
+Int_t AddHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount );
 
 void writeToFile();
 
@@ -365,7 +365,7 @@ void onlineDisplay(Bool_t TPCMode = kTRUE, Bool_t MUONMode = kFALSE, Bool_t TRDM
   // -- Create new hM object
   // -------------------------
   gHomerManager = new AliEveHOMERManager();
-  gHomerManager->SetRetryCount(1000,15);
+  gHomerManager->SetRetryCount(100,10);
 
   Int_t iResult = gHomerManager->Initialize();
   if (iResult) { 
@@ -428,8 +428,6 @@ Int_t initializeEveViewer( Bool_t TPCMode, Bool_t MUONMode, Bool_t TRDMode) {
   TEveUtil::AssertMacro("VizDB_scan.C");
   
   //  alieve_vizdb();
-  
-
 
   //==============================================================================
   // -- Geometry, scenes, projections and viewers
@@ -528,8 +526,6 @@ Int_t initializeEveViewer( Bool_t TPCMode, Bool_t MUONMode, Bool_t TRDMode) {
   g3DView->AddScene(gEve->GetGlobalScene());
   g3DView->AddScene(gEve->GetEventScene());
 
-
 
   pack = pack->NewSlot()->MakePack();
   pack->SetShowTitleBar(kFALSE);
@@ -646,16 +642,6 @@ Int_t initializeEveViewer( Bool_t TPCMode, Bool_t MUONMode, Bool_t TRDMode) {
   // -- Histograms
   //==============================================================================
 
-  if(TPCMode){
-    slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
-    slot->StartEmbedding();
-    
-    gTPCCanvas = new TCanvas("canvasTPC","canvasTPC", 600, 400);
-    gTPCCharge = new TH1F("ClusterCharge","ClusterCharge",100,0,500);
-    gTPCQMax = new TH1F("QMax","QMax",50,0,250);
-    gTPCQMaxOverCharge = new TH1F("QMaxOverCharge","QMaxOverCharge",50,0,1);
-    slot->StopEmbedding("TPC QA");
-  }
 
   slot = TEveWindow::CreateWindowInTab(browser->GetTabRight());
   slot->StartEmbedding();  
@@ -725,17 +711,19 @@ void nextEvent() {
   processEvent();
 }
 
-TCanvas * createCanvas(TString  tabTitle, TString  canvasTitle ) {
-   
-  cout <<"here"<<endl;
+TCanvas * CreateCanvas(TString  tabTitle, TString  canvasTitle ) {
 
-  TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
-  slot->StartEmbedding();
-  TCanvas * canvas = new TCanvas(canvasTitle.Data(),canvasTitle.Data(), 600, 400);
-  slot->StopEmbedding(tabTitle.Data());
   
+
+//   TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(gEve->GetBrowser()->GetTabRight());
+//   slot->StartEmbedding();
+//   TCanvas * canvas = new TCanvas(canvasTitle.Data(),canvasTitle.Data(), 600, 400);
+//   slot->StopEmbedding(tabTitle.Data());
+  cout << "Create"<<endl;
+
+  TCanvas * canvas = gEve->AddCanvasTab(canvasTitle.Data());
   return canvas;
-  
 }
 
 
@@ -1142,6 +1130,8 @@ Int_t processPHOSClusters(AliHLTHOMERBlockDesc* block) {
 // -----------------------------------------------------------------
 Int_t processEMCALClusters(AliHLTHOMERBlockDesc* block) {
 
+  cout << "EMCAL"<<endl;
+
   AliHLTCaloChannelDataHeaderStruct *dhs = reinterpret_cast<AliHLTCaloChannelDataHeaderStruct*> (block->GetData());
   Short_t nC = dhs->fNChannels;
   AliHLTUInt8_t *ui = reinterpret_cast<AliHLTUInt8_t*>(dhs) + sizeof(AliHLTCaloChannelDataHeaderStruct);
@@ -1215,6 +1205,8 @@ Int_t processITSClusters(AliHLTHOMERBlockDesc* block, TEvePointSet* cont) {
 // -----------------------------------------------------------------
 Int_t processTPCClusters(AliHLTHOMERBlockDesc* block, TEvePointSet* cont, TEvePointSetArray *contCol ) {
 
+  
+
   Int_t   slice = block->GetSubDetector();
   Float_t phi   = ( slice + 0.5 ) * TMath::Pi() / 9.0;  
   Float_t cos   = TMath::Cos( phi );
@@ -1223,6 +1215,22 @@ Int_t processTPCClusters(AliHLTHOMERBlockDesc* block, TEvePointSet* cont, TEvePo
   AliHLTTPCClusterData *cd = reinterpret_cast<AliHLTTPCClusterData*> (block->GetData());
   UChar_t *data            = reinterpret_cast<UChar_t*> (cd->fSpacePoints);
 
+
+  if(!gTPCCanvas){
+    gTPCCanvas = gEve->AddCanvasTab("TPC QA");
+    gTPCCharge = new TH1F("ClusterCharge","ClusterCharge",100,0,500);
+    gTPCQMax = new TH1F("QMax","QMax",50,0,250);
+    gTPCQMaxOverCharge = new TH1F("QMaxOverCharge","QMaxOverCharge",50,0,1);
+  }
+
+
+
+  
+
+
+
+
+
   if ( cd->fSpacePointCnt != 0 ) {
     for (Int_t iter = 0; iter < cd->fSpacePointCnt; ++iter, data += sizeof(AliHLTTPCSpacePointData)) {
       AliHLTTPCSpacePointData *sp = reinterpret_cast<AliHLTTPCSpacePointData*> (data);
@@ -1547,7 +1555,7 @@ Int_t processITSHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {
 }
 
 
-Int_t addHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount ) {
+Int_t AddHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount ) {
 
   if (canvas == NULL) 
     cout <<"fucked canvasn"<<endl;
@@ -1774,7 +1782,7 @@ Int_t processBlock (AliHLTHOMERBlockDesc * block ){
   else if ( ! block->GetDetector().CompareTo("PHOS") ) 
     processPHOSBlock(block);
 
-  else if ( ! block->GetDetector().CompareTo("EMCL") )
+  else if ( ! block->GetDetector().CompareTo("EMCA") )
     processEMCALBlock(block);
 
   else if ( ! block->GetDetector().CompareTo("ITS") )
@@ -1793,7 +1801,7 @@ void processITSBlock(AliHLTHOMERBlockDesc * block) {
   
   if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) {
     if(!gITSCanvas){
-      gITSCanvas = createCanvas("ITS QA", "ITS QA");
+      gITSCanvas = gEve->AddCanvasTab("ITS QA");
     }
     processITSHistograms( block , gITSCanvas);
     gITSCanvas->Update();
@@ -1838,7 +1846,7 @@ void processITSBlock(AliHLTHOMERBlockDesc * block) {
   // -- Process TRD Histograms
   else if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) {
     if(!gTRDCanvas) {
-      gTRDCanvas = createCanvas("TRD", "TRD");
+      gTRDCanvas = gEve->AddCanvasTab("TRD");
       gTRDCanvas->Divide(3,2);
     }
     iResult = processTRDHistograms( block, gTRDCanvas );     
@@ -1847,7 +1855,7 @@ void processITSBlock(AliHLTHOMERBlockDesc * block) {
   else if(block->GetDataType().CompareTo("CALIBRAH")==0){
      
     if(!gTRDCalibCanvas){
-      gTRDCalibCanvas = createCanvas("TRD Calib", "TRD Calib");
+      gTRDCalibCanvas = gEve->AddCanvasTab("TRD Calib");
       gTRDCalibCanvas->Divide(2,2);
     }
      
@@ -1857,7 +1865,7 @@ void processITSBlock(AliHLTHOMERBlockDesc * block) {
   else if(block->GetDataType().CompareTo("CALIBEOR")==0){
      
     if(!gTRDEORCanvas){
-      gTRDEORCanvas = createCanvas("TRD QA", "TRD QA");
+      gTRDEORCanvas = gEve->AddCanvasTab("TRD QA");
       gTRDEORCanvas->Divide(3,2);       
     }
   
@@ -1964,10 +1972,11 @@ Int_t processPHOSBlock(AliHLTHOMERBlockDesc * block) {
   if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) { 
     
     if(!gPHOSCanvas) {
-      gPHOSCanvas = createCanvas("PHOS QA", "PHOS QA");
+      gPHOSCanvas = CreateCanvas("PHOS QA", "PHOS QA");
       gPHOSCanvas->Divide(3, 2);
     }
-    addHistogramsToCanvas(block, gPHOSCanvas, gPHOSHistoCount);
+    
+    AddHistogramsToCanvas(block, gPHOSCanvas, gPHOSHistoCount);
    
  
   } else {
@@ -2039,10 +2048,10 @@ void processEMCALBlock(AliHLTHOMERBlockDesc * block) {
   if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) { 
     
     if(!gEMCALCanvas) {
-      gEMCALCanvas = createCanvas("EMCAL QA", "EMCAL QA");
+      gEMCALCanvas = CreateCanvas("EMCAL QA", "EMCAL QA");
       gEMCALCanvas->Divide(3, 2);
     }
-    addHistogramsToCanvas(block, gEMCALCanvas, gEMCALHistoCount);
+    AddHistogramsToCanvas(block, gEMCALCanvas, gEMCALHistoCount);
    
  
   } else {
@@ -2051,7 +2060,7 @@ void processEMCALBlock(AliHLTHOMERBlockDesc * block) {
       gEMCALElementList = createEMCALElementList();
     }
 
-    if ( block->GetDataType().CompareTo("CHANNELT") == 0 ) {
+    if ( block->GetDataType().CompareTo("CALOCLUS") == 0 ) {
       iResult = processEMCALClusters( block );
       for(int sm = 0; sm < 12; sm++) {
        gEMCALBoxSet[sm]->ElementChanged();
@@ -2108,6 +2117,7 @@ void processHLTBlock(AliHLTHOMERBlockDesc * block) {
   } 
 
   else if ( !block->GetDataType().CompareTo("ROOTHIST") ) {      
+    
     processPrimVertexHistograms( block , gPrimVertexCanvas);
     gPrimVertexCanvas->Update();    
   }
@@ -2116,6 +2126,9 @@ void processHLTBlock(AliHLTHOMERBlockDesc * block) {
 
 
 void processTPCBlock(AliHLTHOMERBlockDesc * block) {
+
+  cout <<"Processing tpc clusters"<<endl;
+
   if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {
     if(!gTPCClusters){   
       gTPCClusters = new TEvePointSet("TPC Clusters");
index 4836df8f9f4cba9283aab23f25c5a978f8ced85c..db88fcad3c96f3af0eb1c25553930189587a601e 100644 (file)
@@ -6,13 +6,13 @@ HDRS     := $(SRCS:.cxx=.h)
 
 DHDR     := EveHLT/EveHLTLinkDef.h
 
-EINCLUDE := RAW ITS TPC TRD TOF T0 MUON MUON/mapping PMD HLT/BASE HLT/BASE/HOMER EVE/EveHLT
+EINCLUDE := HLT/BASE HLT/EVE HLT/BASE/util HLT/BASE/HOMER EVE/EveHLT  
 
 ifeq (win32gcc,$(ALICE_TARGET))
 PACKCXXFLAGS:= $(CXXFLAGS) -I/usr/X11R6/include
 ELIBSDIR:= /usr/X11R6/lib
 ELIBS:= GL
 PACKSOFLAGS:= $(SOFLAGS) -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET) -lSTEERBase \
-                         -lTPCbase -lHLTbase \
-                         -L$(ROOTLIBDIR) -lEve -lXMLParser -lGed -lGui
+                         -lTPCbase -lHLTbase -lAliHLTEve \
+                         -L$(ROOTLIBDIR) -lEve -lXMLParser -lGed -lGui 
 endif
index 2b2229c797fd51f0064892a7c657f0a528c655b1..264f22785cc5275725cecbef4dc0ca3f6f11e388 100644 (file)
@@ -252,9 +252,10 @@ Int_t AliHLTHOMERManager::ConnectHOMER( TString detector ){
   
   // -- If already connected, disconnect before connect
   //    or if ReaderList already filled
-  if ( IsConnected() || fReaderList->GetSize() != 0 )
+  if ( IsConnected() || fReaderList->GetSize() != 0 ) {
+    HLTInfo(Form("IsConnected: %d      fReaderList.Size:   %d", IsConnected(), fReaderList->GetSize()));
     DisconnectHOMER();
-  
+  }
   // -- Create the Readoutlist
   UShort_t* sourcePorts = new UShort_t [fSourceList->GetEntries()];
   const Char_t ** sourceHostnames = new const Char_t* [fSourceList->GetEntries()];
@@ -324,23 +325,27 @@ Int_t AliHLTHOMERManager::ConnectHOMER( TString detector ){
 void AliHLTHOMERManager::DisconnectHOMER(){
   // see header file for class documentation
 
-  if ( ! IsConnected() )
-    return;
+  HLTInfo("Disconnecting");
 
   if ( fReaderList && fLibManager ) {
+    HLTInfo("Deleting readerlist and libmanager");
     TIter next(fReaderList);
     TObject * object = NULL;
     while ( ( object = next()) ) 
       fLibManager->DeleteReader(static_cast<AliHLTHOMERReader*>(object) );
       
+
+    HLTInfo(Form("fReaderList size %d", fReaderList->GetSize()));
     fReaderList->Clear();
+    HLTInfo(Form("fReaderList size %d", fReaderList->GetSize()));
     delete fReaderList;
-    fReaderList = NULL;
+    fReaderList = new TList ();
+    HLTInfo(Form("fReaderList size %d", fReaderList->GetSize()));
   }
   
   fStateHasChanged = kTRUE;
   fConnected = kFALSE;
-
+  
   HLTInfo(Form("Connection closed."));
 
   return;
@@ -377,9 +382,11 @@ Int_t AliHLTHOMERManager::NextEvent(){
   Int_t iResult = 0;
   Int_t iRetryCount = 0;
   
-  if ( !IsConnected() || fStateHasChanged ) 
-    ConnectHOMER();
-  
+  if ( !IsConnected() || fStateHasChanged ) {
+    HLTInfo("Not connected or state has changed, returning to AliEveHOMERManager, which will deal with this situation");
+    //    cout << "connectecd  " << IsConnected()  << "haschanged  "<<fStateHasChanged << endl;
+    return 55;//ConnectHOMER();
+  }
   if ( !IsConnected() ) {
     HLTWarning(Form( "Not connected yet." ));
     return -1;
@@ -436,15 +443,18 @@ Int_t AliHLTHOMERManager::NextEvent(){
        break;
       } 
       else {
+       HLTDebug("Successfully read out event from source");
        break;
       }
 
     } // while( 1 ) {
     
     // -- Check if event could be read
-    if ( iResult )
+    if ( iResult ) {
+      HLTInfo("Reading event from source failed");
       continue;
-    
+    }
+
     // -- Handle Blocks from current reader
     iResult = HandleBlocks();
     if ( iResult ) {
@@ -592,7 +602,7 @@ void AliHLTHOMERManager::AddBlockListToBuffer() {
     }
   }
   else {
-    HLTInfo("No trigger selection.");
+    HLTDebug("No trigger selection.");
   }
 
   // -- Set Top mark 
diff --git a/HLT/EVE/AUTHORS b/HLT/EVE/AUTHORS
new file mode 100644 (file)
index 0000000..84c1964
--- /dev/null
@@ -0,0 +1 @@
+Svein Lindal <slindal@fys.uio.no>
\ No newline at end of file
diff --git a/HLT/EVE/AliHLTEveAny.cxx b/HLT/EVE/AliHLTEveAny.cxx
new file mode 100644 (file)
index 0000000..ffa8263
--- /dev/null
@@ -0,0 +1,53 @@
+// Author: Svein Lindal <slindal@fys.uio.no>
+
+/**************************************************************************
+ * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
+ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
+ * full copyright notice.                                                 *
+ **************************************************************************/
+
+#include "AliHLTEveAny.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+
+ClassImp(AliHLTEveAny);
+
+AliHLTEveAny::AliHLTEveAny() : 
+  AliHLTEveBase()
+{
+  // Constructor.
+}
+
+AliHLTEveAny::~AliHLTEveAny()
+{
+  //Destructor, not implemented
+}
+
+
+void AliHLTEveAny::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+
+  if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) { 
+    ProcessHistogram(block);
+    
+  } else {
+    cout << "block of datatype " << block->GetDataType() << " with no parent"<<endl;
+    
+  }
+}
+
+void AliHLTEveAny::ProcessHistogram(AliHLTHOMERBlockDesc * block ) {
+  if(!fCanvas) {
+    fCanvas = CreateCanvas("Orphans", "Orphans");
+    fCanvas->Divide(3, 2);
+  }
+  AddHistogramsToCanvas(block, fCanvas, fHistoCount);
+}
+
+void AliHLTEveAny::UpdateElements() {
+  if(fCanvas) fCanvas->Update();
+}
+
+void AliHLTEveAny::ResetElements(){
+  fHistoCount = 0;
+}
diff --git a/HLT/EVE/AliHLTEveAny.h b/HLT/EVE/AliHLTEveAny.h
new file mode 100644 (file)
index 0000000..afc47be
--- /dev/null
@@ -0,0 +1,40 @@
+// Author: Svein Lindal <slindal@fys.uio.no>
+
+#ifndef ALIHLTEVEANY_H
+#define ALIHLTEVEANY_H
+
+#include "AliHLTEveBase.h"
+class AliHLTHOMERBlockDesc;
+
+class AliHLTEveAny : public AliHLTEveBase {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveAny();
+
+  /** Destructor **/
+ ~AliHLTEveAny();
+
+  /** Inherited form AliHLTEveBase */
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** inherited from AliHLTEveBase */
+  void UpdateElements();
+  
+  /** inherited from AliHLTEveBase */
+  void ResetElements();
+
+private:
+  
+  /** copy constructor prohibited */
+  AliHLTEveAny(const AliHLTEveAny&);
+  /** assignment operator prohibited */
+  AliHLTEveAny& operator = (const AliHLTEveAny &);
+
+  void ProcessHistogram(AliHLTHOMERBlockDesc * block );
+
+  ClassDef(AliHLTEveAny, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveBase.cxx b/HLT/EVE/AliHLTEveBase.cxx
new file mode 100644 (file)
index 0000000..030d93e
--- /dev/null
@@ -0,0 +1,112 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEveBase.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  Base class for the HLT eve display detector elements
+
+
+#include "AliHLTEveBase.h"
+#include "AliHLTHOMERBlockDesc.h"
+//#include "TCollection.h"
+#include "AliEveHOMERManager.h"
+#include "TCanvas.h"
+#include "TEveWindow.h"
+#include "TEveManager.h"
+#include "TEveBrowser.h"
+#include "TH1F.h"
+#include "TH2F.h"
+
+ClassImp(AliHLTEveBase);
+
+AliHLTEveBase::AliHLTEveBase() : 
+  fEventManager(NULL), 
+  fCanvas(NULL),
+  fHistoCount(0)
+{
+  // Constructor.
+}
+
+AliHLTEveBase::~AliHLTEveBase()
+{
+  //Destructor
+
+  if(fCanvas) 
+    delete fCanvas;
+  fCanvas = NULL;
+
+  fEventManager = NULL;
+}
+
+
+
+TCanvas * AliHLTEveBase::CreateCanvas(TString  tabTitle, TString  canvasTitle ) {
+   //See header file for documentation
+
+  TEveWindowSlot *slot = TEveWindow::CreateWindowInTab(fEventManager->GetEveManager()->GetBrowser()->GetTabRight());
+  slot->StartEmbedding();
+  TCanvas * canvas = new TCanvas(canvasTitle.Data(),canvasTitle.Data(), 600, 400);
+  slot->StopEmbedding(tabTitle.Data());
+
+  return canvas;
+}
+
+void AliHLTEveBase::AddHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount ) {
+  //See header file for documentation
+   
+  if ( ! block->GetClassName().CompareTo("TObjArray")) {
+    TIter next((TObjArray*)(block->GetTObject()));
+    TObject *object;
+   
+    while (( object = (TObject*) next())) {
+      TH2F* histo = dynamic_cast<TH2F*>(object);
+      if(histo){
+       canvas->cd(++cdCount);
+       histo->Draw("COLZ");
+      } else {
+       TH1F* hist = dynamic_cast<TH1F*>(object);
+       if (hist) {
+         canvas->cd(++cdCount);
+         hist->Draw();
+       } else {
+         cout <<"AliHLTEveCaloBase::AddHistogramsTocCanvas: Histogram neither TH1F nor TH2F"<<endl;
+       }
+      }
+    }
+  }
+    
+  else if ( ! block->GetClassName().CompareTo("TH1F")) {
+
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    ++cdCount;
+    canvas->cd(cdCount);
+    histo->Draw();
+    
+  } 
+  
+  else if ( ! block->GetClassName().CompareTo("TH2F")) {
+    TH2F *histo = reinterpret_cast<TH2F*>(block->GetTObject());
+    if (histo) {
+      ++cdCount;
+      canvas->cd(cdCount);
+      histo->Draw("COLZ");
+    }
+  }
+
+  canvas->cd();
+}
+
+
diff --git a/HLT/EVE/AliHLTEveBase.h b/HLT/EVE/AliHLTEveBase.h
new file mode 100644 (file)
index 0000000..863a66f
--- /dev/null
@@ -0,0 +1,66 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveBase.h
+/// @author Svein Lindal
+/// @brief  Base class for the HLT eve display elements
+
+#ifndef ALIHLTEVEBASE_H
+#define ALIHLTEVEBASE_H
+
+#include "Rtypes.h"
+class AliHLTHOMERBlockDesc;
+class AliEveHOMERManager;
+class TCanvas;
+class TString;
+
+class AliHLTEveBase{
+
+public:
+  
+  /** Default constructor prohibited **/
+  AliHLTEveBase();
+
+  /** Destructor **/
+  virtual ~AliHLTEveBase();
+
+  /** Process the incoming blocks, must be implemented by children */
+  virtual void ProcessBlock(AliHLTHOMERBlockDesc * block) = 0;
+
+  /** Update the elements after new event loaded, to be implemented by children */
+  virtual void UpdateElements() = 0;
+
+  /** Reset the elements before reading in new event, to be implemented by children */
+  virtual void ResetElements() = 0;
+
+  /** Set the parent AliEveHOMERManager instance */
+  void SetEventManager(AliEveHOMERManager * em) { fEventManager = em; };
+
+  
+
+protected:
+
+  /** Create a new canvas tab */
+  TCanvas * CreateCanvas(TString  tabTitle, TString  canvasTitle );
+  /** Addhistograms to the canvas */
+  virtual void AddHistogramsToCanvas(AliHLTHOMERBlockDesc * block, TCanvas * canvas, Int_t &cdCount );
+
+  
+  AliEveHOMERManager * fEventManager; //Pointer to AliEveHOMERManager instance
+  TCanvas * fCanvas;                  //Canvas for histograms
+  Int_t fHistoCount;                  //Counter for histograms, to track where to draw the next one
+
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveBase(const AliHLTEveBase&);
+  /** assignment operator prohibited */
+  AliHLTEveBase& operator=(const AliHLTEveBase&);
+
+  ClassDef(AliHLTEveBase, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveCalo.cxx b/HLT/EVE/AliHLTEveCalo.cxx
new file mode 100644 (file)
index 0000000..060d50c
--- /dev/null
@@ -0,0 +1,165 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEveCalo.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  Calorimeter base class for the HLT EVE display
+
+#include "AliHLTEveCalo.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "AliHLTEveBase.h"
+#include "TEveBoxSet.h"
+#include "AliPHOSGeometry.h"
+#include "TVector3.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "AliHLTCaloDigitDataStruct.h"
+#include "AliHLTCaloClusterDataStruct.h"
+#include "AliHLTCaloClusterReader.h"
+#include "TEveTrans.h"
+#include "TString.h"
+
+ClassImp(AliHLTEveCalo);
+
+AliHLTEveCalo::AliHLTEveCalo(Int_t nm, TString name) : 
+  AliHLTEveBase(), 
+  fBoxSet(NULL),
+  fElementList(NULL),
+  fNModules(nm),
+  fName(name)
+{
+  // Constructor.
+}
+
+AliHLTEveCalo::~AliHLTEveCalo()
+{
+  //Destructor
+  if(fBoxSet)
+    delete fBoxSet;
+  fBoxSet = NULL;
+
+  if(fElementList)
+    delete fElementList;
+  fElementList = NULL;
+}
+
+
+void AliHLTEveCalo::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+
+  if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) { 
+    ProcessHistogram(block);
+   
+  } else {
+
+    if( !fElementList ) {
+      fElementList = CreateElementList();
+      fEventManager->GetEveManager()->AddElement(fElementList);
+    }
+    
+    if ( block->GetDataType().CompareTo("CALOCLUS") == 0 ){
+      //cout <<"Skipping calo clusters"<<endl;
+      ProcessClusters( block );
+    }
+    else if ( block->GetDataType().CompareTo("DIGITTYP") == 0 )
+      ProcessDigits( block);
+    
+    else if ( block->GetDataType().CompareTo("CHANNELT") == 0 ) 
+      ProcessClusters( block );
+  }
+}
+
+void AliHLTEveCalo::ProcessHistogram(AliHLTHOMERBlockDesc * block ) {
+  //See header file for documentation
+  
+  if(!fCanvas) {
+    fCanvas = CreateCanvas(Form("%s QA", fName.Data()), Form("%s QA", fName.Data()));
+    fCanvas->Divide(3, 2);
+  }
+
+  AddHistogramsToCanvas(block, fCanvas, fHistoCount);
+
+
+}
+
+
+void AliHLTEveCalo::ProcessDigits(AliHLTHOMERBlockDesc* block) {
+  //See header file for documentation
+  
+  AliHLTCaloDigitDataStruct *ds = reinterpret_cast<AliHLTCaloDigitDataStruct*> (block->GetData());
+  UInt_t nDigits = block->GetSize()/sizeof(AliHLTCaloDigitDataStruct);
+    
+
+  for(UInt_t i = 0; i < nDigits; i++, ds++) {
+
+    Float_t x = (ds->fX - 32)* 2.2;
+      Float_t z = (ds->fZ - 28) * 2.2;
+
+      cout << "MODULE DIGITTYP  :" << ds->fModule;
+
+    fBoxSet[4-ds->fModule].AddBox(x, 0, z, 2.2, ds->fEnergy*200, 2.2);
+    fBoxSet[4-ds->fModule].DigitValue(static_cast<Int_t>(ds->fEnergy*10));
+  }
+
+}
+
+
+void AliHLTEveCalo::ProcessClusters(AliHLTHOMERBlockDesc* block) {
+  //See header file for documentation
+
+
+  AliHLTCaloClusterHeaderStruct *dh = reinterpret_cast<AliHLTCaloClusterHeaderStruct*> (block->GetData());
+  AliHLTCaloClusterReader * clusterReader = new AliHLTCaloClusterReader();
+  clusterReader->SetMemory(dh);  
+
+  AliHLTCaloClusterDataStruct * ds;
+
+
+  
+  while( (ds = clusterReader->NextCluster()) ){
+    //    AddClusters(ds->fGlobalPos, ds->fModule, ds->fEnergy);
+  }
+
+  AliHLTCaloDigitDataStruct *dg = clusterReader->GetDigits();
+  UInt_t nDigits = clusterReader->GetNDigits();;
+  for(UInt_t i = 0; i < nDigits; i++, dg++) {
+    AddDigits(dg->fX, dg->fZ, dg->fModule, dg->fEnergy);
+  }
+}
+
+void AliHLTEveCalo::UpdateElements() {
+  //See header file for documentation
+  if(fCanvas) fCanvas->Update();
+
+  if(fBoxSet) {
+    for(int im = 0; im < fNModules; im++) {
+      fBoxSet[im].ElementChanged();
+    }
+  }
+}
+
+void AliHLTEveCalo::ResetElements(){
+  //See header file for documentation
+  fHistoCount = 0;
+  
+  if ( fBoxSet ){
+    for(int im = 0; im < fNModules; im++){
+      cout<<"Resetting"<<endl;
+      fBoxSet[im].Reset();   
+    }
+  }
+}
diff --git a/HLT/EVE/AliHLTEveCalo.h b/HLT/EVE/AliHLTEveCalo.h
new file mode 100644 (file)
index 0000000..b9c118a
--- /dev/null
@@ -0,0 +1,83 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  Base class for the HLT eve calorimeter display elements
+
+
+#ifndef ALIHLTEVECALO_H
+#define ALIHLTEVECALO_H
+
+#include "AliHLTEveBase.h"
+#include "TString.h"
+
+class TEveElementList;
+class TEveBoxSet;
+class AliHLTHOMERBlockDesc;
+
+class AliHLTEveCalo : public AliHLTEveBase {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveCalo(Int_t nm, TString name);
+
+  /** Destructor **/
+ ~AliHLTEveCalo();
+  
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** inherited from AliHLTEveBase */
+  void UpdateElements();
+  
+  /** inherited from AliHLTEveBase */
+  void ResetElements();
+
+
+
+protected :
+
+  /** Create the elementlist */
+  virtual TEveElementList * CreateElementList() = 0;
+  
+  /** Add clusters boxset to eve display */
+  virtual void AddClusters(Float_t * pos, Int_t module, Float_t energy) = 0;
+
+  /** Add digits boxset to eve display */
+  virtual void AddDigits(UShort_t fX, UShort_t fZ, Int_t module, Float_t energy) = 0;
+
+  /** Process clusters block */
+  void ProcessClusters(AliHLTHOMERBlockDesc * block);
+  
+  /** Process digits block */
+  void ProcessDigits(AliHLTHOMERBlockDesc * block);
+
+  /** Process histogram block */
+  void ProcessHistogram(AliHLTHOMERBlockDesc * block );
+
+  
+  
+  TEveBoxSet * fBoxSet;            //Boxset for clusters and digist
+  
+  TEveElementList * fElementList; //Element list to contain the clusters
+
+  const Int_t fNModules;          //Number of modules in calorimeter
+
+
+private:
+  
+  /** default constructor prohibited */
+  AliHLTEveCalo();
+  /** copy constructor prohibited */
+  AliHLTEveCalo(const AliHLTEveCalo&);
+  /** assignment operator prohibited */
+  AliHLTEveCalo& operator = (const AliHLTEveCalo &);
+
+  TString fName;  //PHOS or EMCAL
+  
+  ClassDef(AliHLTEveCalo, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveEmcal.cxx b/HLT/EVE/AliHLTEveEmcal.cxx
new file mode 100644 (file)
index 0000000..008ca53
--- /dev/null
@@ -0,0 +1,111 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  EMCAL class for the HLT EVE display
+// Author:  Svein Lindal <slindal@fys.uio.no>
+
+#include "AliHLTEveEmcal.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "AliHLTEveBase.h"
+#include "TEveBoxSet.h"
+#include "AliPHOSGeometry.h"
+#include "TVector3.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "AliHLTCaloDigitDataStruct.h"
+#include "AliHLTCaloClusterDataStruct.h"
+#include "AliHLTCaloClusterReader.h"
+#include "TEveTrans.h"
+#include "TGeoNode.h"
+#include "AliEMCALGeoUtils.h"
+
+ClassImp(AliHLTEveEmcal)
+
+AliHLTEveEmcal::AliHLTEveEmcal() : 
+AliHLTEveCalo(12, "EMCAL"),
+fGeoUtils(NULL)
+{
+  //Constructor
+  fGeoUtils = new AliEMCALGeoUtils("EMCAL_COMPLETE","EMCAL");
+
+}
+
+
+AliHLTEveEmcal::~AliHLTEveEmcal()
+{
+  //Destructor, not implemented
+}
+
+TEveElementList * AliHLTEveEmcal::CreateElementList() {
+  
+  TGeoNode * gEMCALNode = fEventManager->GetGeoManager()->GetTopVolume()->FindNode("XEN1_1");
+
+  fElementList = new TEveElementList("EMCAL Cells");
+  fElementList->SetTitle("Tooltip");
+  
+  //gStyle->SetPalette(1, 0);
+  TEveRGBAPalette* pal = new TEveRGBAPalette(0, 512);
+  pal->SetLimits(0, 15);
+  
+  fBoxSet = new TEveBoxSet[fNModules];
+  
+  for (Int_t sm=0; sm<fNModules; ++sm) {
+    
+    fBoxSet[sm].SetTitle(Form("Clusters Module %d", sm));
+    fBoxSet[sm].SetName(Form("Clusters Module %d", sm));
+    fBoxSet[sm].SetOwnIds(kTRUE);
+    
+    fBoxSet[sm].Reset(TEveBoxSet::kBT_AABox, kFALSE, 64);
+    fBoxSet[sm].RefMainTrans().SetFrom(*gEMCALNode->GetDaughter(sm)->GetMatrix());
+    fBoxSet[sm].SetPalette(pal);
+    
+    fElementList->AddElement(&fBoxSet[sm]);
+
+  }
+  
+  return fElementList;
+}
+
+void AliHLTEveEmcal::AddClusters(Float_t * pos, Int_t module, Float_t energy) {
+  
+
+  cout << "x " << pos[1] << "   ";
+  cout << "z " << pos[2] << "   ";
+  cout << "y " << pos[0] << endl;
+
+  fBoxSet[module].AddBox(15, pos[1], pos[2], energy*20, 6.1, 6.1);
+  fBoxSet[module].DigitValue(static_cast<Int_t>(energy));
+}
+
+void AliHLTEveEmcal::AddDigits(UShort_t fX, UShort_t fZ, Int_t module, Float_t energy) {
+
+  cout << endl << endl << module  << endl << endl;
+
+
+  Int_t absid = fGeoUtils->GetAbsCellIdFromCellIndexes(module, fX, fZ);
+  Double_t posX, posY, posZ;
+  if(fGeoUtils->RelPosCellInSModule(absid, posX, posY, posZ)) {
+    
+    cout << posX << "  " << posY << "  " << posZ << endl;
+    fBoxSet[module].AddBox(15, posY, posZ, energy*5, 6.1, 6.1);
+    fBoxSet[module].DigitValue(static_cast<Int_t>(energy));
+  } else  {
+    cout <<"fail"<<endl;
+  }
+}
diff --git a/HLT/EVE/AliHLTEveEmcal.h b/HLT/EVE/AliHLTEveEmcal.h
new file mode 100644 (file)
index 0000000..58b437a
--- /dev/null
@@ -0,0 +1,44 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  EMCAL Instance of Eve display processor
+
+#ifndef ALIHLTEVEEMCAL_H
+#define ALIHLTEVEEMCAL_H
+
+#include "AliHLTEveCalo.h"
+class TEveElementList;
+class AliEMCALGeoUtils;
+
+class AliHLTEveEmcal : public AliHLTEveCalo {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveEmcal();
+
+  /** Destructor **/
+ ~AliHLTEveEmcal();
+  
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveEmcal(const AliHLTEveEmcal&);
+  /** assignment operator prohibited */
+  AliHLTEveEmcal& operator = (const AliHLTEveEmcal );
+
+  void AddClusters(Float_t * pos, Int_t module, Float_t energy);
+
+  void AddDigits(UShort_t fX, UShort_t fZ, Int_t module, Float_t energy);
+  
+  TEveElementList * CreateElementList();
+
+  AliEMCALGeoUtils * fGeoUtils;
+
+  ClassDef(AliHLTEveEmcal, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveHLT.cxx b/HLT/EVE/AliHLTEveHLT.cxx
new file mode 100644 (file)
index 0000000..028535d
--- /dev/null
@@ -0,0 +1,407 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  HLT class for the HLT EVE display
+
+#include "AliHLTEveHLT.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "AliHLTEveBase.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "TEvePointSet.h"
+#include "TEveTrack.h"
+#include "TCanvas.h"
+#include "AliESDEvent.h"
+#include "TEveTrackPropagator.h"
+#include "AliEveTrack.h"
+#include "TEveVSDStructs.h"
+#include "TString.h"
+#include "TPCLib/tracking-ca/AliHLTTPCCATrackParam.h"
+#include "TPCLib/tracking-ca/AliHLTTPCCATrackConvertor.h"
+#include "AliEveMagField.h"
+#include "TH1F.h"
+#include "TH2F.h"
+
+ClassImp(AliHLTEveHLT)
+
+AliHLTEveHLT::AliHLTEveHLT() : 
+  AliHLTEveBase(), 
+  fTrueField(kFALSE),
+  fUseIpOnFailedITS(kFALSE),
+  fUseRkStepper(kFALSE),
+  fTrackList(NULL)
+{
+  // Constructor.
+}
+
+AliHLTEveHLT::~AliHLTEveHLT()
+{
+  //Destructor, not implemented
+  if(fTrackList)
+    delete fTrackList;
+  fTrackList = NULL;
+}
+
+
+void AliHLTEveHLT::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+  if ( ! block->GetDataType().CompareTo("ALIESDV0") ) {
+    if(!fTrackList) CreateTrackList();
+    ProcessEsdBlock(block, fTrackList);
+  } 
+  
+  else if ( ! block->GetDataType().CompareTo("ROOTTOBJ") ) {
+    //processROOTTOBJ( block, gHLTText );
+  } 
+
+  else if ( ! block->GetDataType().CompareTo("HLTRDLST") ) {
+    //processHLTRDLST( block );
+  } 
+
+  else if ( !block->GetDataType().CompareTo("ROOTHIST") ) {      
+    if( !fCanvas ) { 
+      fCanvas = CreateCanvas("Primary Vertex", "Primary Vertex");
+      fCanvas->Divide(2, 2);
+    }
+    ProcessHistograms( block , fCanvas);
+  }
+  
+}
+
+
+void AliHLTEveHLT::UpdateElements() {
+  //See header file for documentation
+  if(fCanvas) fCanvas->Update();
+  if(fTrackList) fTrackList->ElementChanged();
+
+}
+
+void AliHLTEveHLT::ResetElements(){
+    //See header file for documentation
+  if(fTrackList) fTrackList->DestroyElements();
+
+  fHistoCount = 0;
+
+}
+
+void AliHLTEveHLT::ProcessHistograms(AliHLTHOMERBlockDesc * block, TCanvas * canvas) {
+  //See header file for documentation
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    if( histo ){
+      TString name(histo->GetName());
+      if( !name.CompareTo("primVertexZ") ){
+       canvas->cd(2);
+       histo->Draw();
+      }else if( !name.CompareTo("primVertexX") ){
+       canvas->cd(3);
+       histo->Draw();
+      }else if( !name.CompareTo("primVertexY") ){
+       canvas->cd(4);
+       histo->Draw();
+      }
+    }
+  }  else if ( ! block->GetClassName().CompareTo("TH2F")) {
+    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());
+    if (hista ){
+       TString name(hista->GetName());
+       if( !name.CompareTo("primVertexXY")) {      
+        canvas->cd(1);
+        hista->Draw();
+       }
+    }
+  }
+  canvas->cd();
+
+
+
+
+}
+
+void AliHLTEveHLT::CreateTrackList() {
+  //See header file for documentation
+  fTrackList = new TEveTrackList("ESD Tracks");
+  fTrackList->SetMainColor(6);
+  gEve->AddElement(fTrackList);
+}
+
+
+void AliHLTEveHLT::ProcessEsdBlock( AliHLTHOMERBlockDesc * block, TEveTrackList * cont ) {
+  //See header file for documentation
+
+  AliESDEvent* esd = (AliESDEvent *) (block->GetTObject());
+  esd->GetStdContent();
+  
+  SetUpTrackPropagator(cont->GetPropagator(),-0.1*esd->GetMagneticField(), 520);
+
+  for (Int_t iter = 0; iter < esd->GetNumberOfTracks(); ++iter) {
+    AliEveTrack* track = dynamic_cast<AliEveTrack*>(MakeEsdTrack(esd->GetTrack(iter), cont));
+    cont->AddElement(track);
+    
+//     gTPCPt->Fill(esd->GetTrack(iter)->GetSignedPt()); // KK
+//     gTPCEta->Fill(esd->GetTrack(iter)->GetSnp());
+//     gTPCPsi->Fill(esd->GetTrack(iter)->GetTgl());
+//     gTPCnClusters->Fill(esd->GetTrack(iter)->GetTPCNcls());  
+  }
+  
+//   gTPCMult->Fill(esd->GetNumberOfTracks()); // KK
+  
+//   Int_t icd = 0;
+//   gTPCClustCanvas->Clear();
+//   gTPCClustCanvas->Divide(2, 2);
+//   gTPCClustCanvas->cd(icd++);
+//   gTPCPt->Draw();
+//   gTPCClustCanvas->cd(icd++);
+//   gTPCEta->Draw();
+//   gTPCClustCanvas->cd(icd++);
+//   gTPCPsi->Draw();
+//   gTPCClustCanvas->cd(icd++);
+//   gTPCnClusters->Draw();
+//   gTPCClustCanvas->cd(icd++);
+//   gTPCMult->Draw();
+//   gTPCClustCanvas->Update();
+
+  
+  cont->SetTitle(Form("N=%d", esd->GetNumberOfTracks()) );
+  cont->MakeTracks();
+
+}
+
+AliEveTrack* AliHLTEveHLT::MakeEsdTrack (AliESDtrack *at, TEveTrackList* cont) {
+  //See header file for documentation
+
+
+  const double kCLight = 0.000299792458;
+  double bz = - kCLight*10.*( cont->GetPropagator()->GetMagField(0,0,0).fZ);
+
+  Bool_t innerTaken = kFALSE;
+  if ( ! at->IsOn(AliESDtrack::kITSrefit) && fUseIpOnFailedITS)
+  {
+    //tp = at->GetInnerParam();
+    innerTaken = kTRUE;
+  }
+
+  // Add inner/outer track parameters as path-marks.
+
+  Double_t     pbuf[3], vbuf[3];
+
+  AliExternalTrackParam trackParam = *at;
+
+  // take parameters constrained to vertex (if they are)
+
+  if( at->GetConstrainedParam() ){
+    trackParam = *at->GetConstrainedParam();
+  }
+  else if( at->GetInnerParam() ){
+    trackParam = *(at->GetInnerParam());
+  }
+  if( at->GetStatus()&AliESDtrack::kTRDin ){
+    // transport to TRD in
+    trackParam = *at;
+    trackParam.PropagateTo( 290.45, -10.*( cont->GetPropagator()->GetMagField(0,0,0).fZ) );
+  }
+
+  TEveRecTrack rt;
+  {
+    rt.fLabel  = at->GetLabel();
+    rt.fIndex  = (Int_t) at->GetID();
+    rt.fStatus = (Int_t) at->GetStatus();
+    rt.fSign   = (Int_t) trackParam.GetSign();  
+    trackParam.GetXYZ(vbuf);
+    trackParam.GetPxPyPz(pbuf);    
+    rt.fV.Set(vbuf);
+    rt.fP.Set(pbuf);
+    Double_t ep = at->GetP(), mc = at->GetMass();
+    rt.fBeta = ep/TMath::Sqrt(ep*ep + mc*mc);
+  }
+
+  AliEveTrack* track = new AliEveTrack(&rt, cont->GetPropagator());
+  track->SetAttLineAttMarker(cont);
+  track->SetName(Form("AliEveTrack %d", at->GetID()));
+  track->SetElementTitle(CreateTrackTitle(at));
+  track->SetSourceObject(at);
+
+
+  // Set reference points along the trajectory
+  // and the last point
+
+  { 
+    TEvePathMark startPoint(TEvePathMark::kReference);
+    trackParam.GetXYZ(vbuf);
+    trackParam.GetPxPyPz(pbuf);    
+    startPoint.fV.Set(vbuf);
+    startPoint.fP.Set(pbuf);
+    rt.fV.Set(vbuf);
+    rt.fP.Set(pbuf);
+    Double_t ep = at->GetP(), mc = at->GetMass();
+    rt.fBeta = ep/TMath::Sqrt(ep*ep + mc*mc);
+
+    track->AddPathMark( startPoint );    
+  }
+
+
+  if( at->GetTPCPoints(2)>80 ){
+  
+    //
+    // use AliHLTTPCCATrackParam propagator 
+    // since AliExternalTrackParam:PropagateTo()
+    // has an offset at big distances
+    //
+    
+    AliHLTTPCCATrackParam t;
+    AliHLTTPCCATrackConvertor::SetExtParam( t, trackParam );
+    
+    Double_t x0 = trackParam.GetX();
+    Double_t dx = at->GetTPCPoints(2) - x0;
+    
+    //
+    // set a reference at the half of trajectory for better drawing
+    //
+    
+    for( double dxx=dx/2; TMath::Abs(dxx)>=1.; dxx*=.9 ){
+      if( !t.TransportToX(x0+dxx, bz, .99 ) ) continue;
+      AliHLTTPCCATrackConvertor::GetExtParam( t, trackParam, trackParam.GetAlpha() ); 
+      trackParam.GetXYZ(vbuf);
+      trackParam.GetPxPyPz(pbuf);
+      TEvePathMark midPoint(TEvePathMark::kReference);
+      midPoint.fV.Set(vbuf);
+      midPoint.fP.Set(pbuf);    
+      track->AddPathMark( midPoint );
+      break;
+    }
+    
+    //
+    // Set a reference at the end of the trajectory
+    // and a "decay point", to let the event display know where the track ends
+    //
+    
+    for( ; TMath::Abs(dx)>=1.; dx*=.9 ){
+      if( !t.TransportToX(x0+dx, bz, .99 ) ) continue;
+      AliHLTTPCCATrackConvertor::GetExtParam( t, trackParam, trackParam.GetAlpha() ); 
+      trackParam.GetXYZ(vbuf);
+      trackParam.GetPxPyPz(pbuf);
+      TEvePathMark endPoint(TEvePathMark::kReference);
+      TEvePathMark decPoint(TEvePathMark::kDecay);
+      endPoint.fV.Set(vbuf);
+      endPoint.fP.Set(pbuf);
+      decPoint.fV.Set(vbuf);
+      decPoint.fP.Set(pbuf);
+      track->AddPathMark( endPoint );
+      track->AddPathMark( decPoint );
+      break;
+    }  
+  }
+
+  if (at->IsOn(AliESDtrack::kTPCrefit))
+  {
+    if ( ! innerTaken)
+    {
+      AddTrackParamToTrack(track, at->GetInnerParam());
+    }
+    AddTrackParamToTrack(track, at->GetOuterParam());
+  }
+  return track;
+}
+
+void AliHLTEveHLT::SetUpTrackPropagator(TEveTrackPropagator* trkProp, Float_t magF, Float_t maxR) {
+  //See header file for documentation
+
+  if (fTrueField) {
+    trkProp->SetMagFieldObj(new AliEveMagField);
+  
+  } else {
+    trkProp->SetMagField(magF);
+  }
+  if (fUseRkStepper) {
+    trkProp->SetStepper(TEveTrackPropagator::kRungeKutta);
+  }
+
+  trkProp->SetMaxR(maxR);
+}
+
+
+void AliHLTEveHLT::AddTrackParamToTrack(AliEveTrack* track, const AliExternalTrackParam* tp) {
+  //See header file for documentation
+
+  if (tp == 0)
+    return;
+
+  Double_t pbuf[3], vbuf[3];
+  tp->GetXYZ(vbuf);
+  tp->GetPxPyPz(pbuf);
+
+  TEvePathMark pm(TEvePathMark::kReference);
+  pm.fV.Set(vbuf);
+  pm.fP.Set(pbuf);
+  track->AddPathMark(pm);
+}
+
+
+
+TString AliHLTEveHLT::CreateTrackTitle(AliESDtrack* t) {
+  // Add additional track parameters as a path-mark to track.
+
+  TString s;
+
+  Int_t label = t->GetLabel(), index = t->GetID();
+  TString idx(index == kMinInt ? "<undef>" : Form("%d", index));
+  TString lbl(label == kMinInt ? "<undef>" : Form("%d", label));
+
+  Double_t p[3], v[3];
+  t->GetXYZ(v);
+  t->GetPxPyPz(p);
+  Double_t pt    = t->Pt();
+  Double_t ptsig = TMath::Sqrt(t->GetSigma1Pt2());
+  Double_t ptsq  = pt*pt;
+  Double_t ptm   = pt / (1.0 + pt*ptsig);
+  Double_t ptM   = pt / (1.0 - pt*ptsig);
+
+  s = Form("Index=%s, Label=%s\nChg=%d, Pdg=%d\n"
+          "pT = %.3f + %.3f - %.3f [%.3f]\n"
+           "P  = (%.3f, %.3f, %.3f)\n"
+           "V  = (%.3f, %.3f, %.3f)\n",
+          idx.Data(), lbl.Data(), t->Charge(), 0,
+          pt, ptM - pt, pt - ptm, ptsig*ptsq,
+           p[0], p[1], p[2],
+           v[0], v[1], v[2]);
+
+  Int_t   o;
+  s += "Det (in,out,refit,pid):\n";
+  o  = AliESDtrack::kITSin;
+  s += Form("ITS (%d,%d,%d,%d)  ",  t->IsOn(o), t->IsOn(o<<1), t->IsOn(o<<2), t->IsOn(o<<3));
+  o  = AliESDtrack::kTPCin;
+  s += Form("TPC(%d,%d,%d,%d)\n",   t->IsOn(o), t->IsOn(o<<1), t->IsOn(o<<2), t->IsOn(o<<3));
+  o  = AliESDtrack::kTRDin;
+  s += Form("TRD(%d,%d,%d,%d) ",    t->IsOn(o), t->IsOn(o<<1), t->IsOn(o<<2), t->IsOn(o<<3));
+  o  = AliESDtrack::kTOFin;
+  s += Form("TOF(%d,%d,%d,%d)\n",   t->IsOn(o), t->IsOn(o<<1), t->IsOn(o<<2), t->IsOn(o<<3));
+  o  = AliESDtrack::kHMPIDout;
+  s += Form("HMPID(out=%d,pid=%d)\n", t->IsOn(o), t->IsOn(o<<1));
+  s += Form("ESD pid=%d", t->IsOn(AliESDtrack::kESDpid));
+
+  if (t->IsOn(AliESDtrack::kESDpid))
+  {
+    Double_t pid[5];
+    t->GetESDpid(pid);
+    s += Form("\n[%.2f %.2f %.2f %.2f %.2f]", pid[0], pid[1], pid[2], pid[3], pid[4]);
+  }
+
+  return s;
+}
+
diff --git a/HLT/EVE/AliHLTEveHLT.h b/HLT/EVE/AliHLTEveHLT.h
new file mode 100644 (file)
index 0000000..7772593
--- /dev/null
@@ -0,0 +1,84 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  HLT Instance of Eve display processor
+// Author: Svein Lindal <slindal@fys.uio.no>
+
+#ifndef ALIHLTEVEHLT_H
+#define ALIHLTEVEHLT_H
+
+#include "AliHLTEveBase.h"
+class TEvePointSet;
+class AliESDtrack;
+class AliEveTrack;
+class TEveTrackList;
+class TEveTrackPropagator;
+class TString;
+class AliExternalTrackParam;
+
+
+
+class AliHLTEveHLT : public AliHLTEveBase {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveHLT();
+
+  /** Destructor **/
+ ~AliHLTEveHLT();
+  
+  /** Inherited from AliHLTEveBase */
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** inherited from AliHLTEveBase */
+  void UpdateElements();
+  
+  /** inherited from AliHLTEveBase */
+  void ResetElements();
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveHLT(const AliHLTEveHLT&);
+  /** assignment operator prohibited */
+  AliHLTEveHLT& operator = (const AliHLTEveHLT );
+
+  /*Create the pointset for the display */
+  void CreateTrackList();
+
+  // Make a standard track representation and put it into given container.
+  // Choose which parameters to use a track's starting point.
+  // If gkFixFailedITSExtr is TRUE (FALSE by default) and
+  // if ITS refit failed, take track parameters at inner TPC radius.
+  AliEveTrack * MakeEsdTrack(AliESDtrack *at, TEveTrackList* cont);
+
+  // Process the ESD block and call the functions necessary to fill the tracklist
+  void ProcessEsdBlock( AliHLTHOMERBlockDesc * block, TEveTrackList * cont );
+
+  //Set up the track propagator
+  void SetUpTrackPropagator(TEveTrackPropagator* trkProp, Float_t magF, Float_t maxR);
+
+  //Create a title for the track
+  TString CreateTrackTitle(AliESDtrack* t);
+
+  //Add track param to AliEveTrack
+  void AddTrackParamToTrack(AliEveTrack* track, const AliExternalTrackParam* tp);
+
+  //Process histogram block
+  void ProcessHistograms(AliHLTHOMERBlockDesc * block, TCanvas * canvas);
+
+  Bool_t fTrueField;        //Use true field?
+  Bool_t fUseIpOnFailedITS; // Use IP as origin if ITS refit fails?
+  Bool_t fUseRkStepper;    // Use Runge Kutta for something something?
+
+  TEveTrackList * fTrackList;  //Eve tracklist 
+
+
+  ClassDef(AliHLTEveHLT, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveISDD.cxx b/HLT/EVE/AliHLTEveISDD.cxx
new file mode 100644 (file)
index 0000000..cb9acb4
--- /dev/null
@@ -0,0 +1,41 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  ISDD class for the HLT EVE display
+
+#include "AliHLTEveISDD.h"
+#include "TEvePointSet.h"
+
+ClassImp(AliHLTEveISDD);
+
+AliHLTEveISDD::AliHLTEveISDD() : 
+AliHLTEveITS("ISDD")
+{
+  // Constructor.
+}
+
+AliHLTEveISDD::~AliHLTEveISDD()
+{
+  //Destructor
+}
+
+void AliHLTEveISDD::SetUpPointSet(TEvePointSet * ps) {
+  //See header file for documentation
+  ps->SetMainColor(kBlack);
+  ps->SetMarkerStyle((Style_t)kFullDotMedium);
+}
diff --git a/HLT/EVE/AliHLTEveISDD.h b/HLT/EVE/AliHLTEveISDD.h
new file mode 100644 (file)
index 0000000..ec06cd8
--- /dev/null
@@ -0,0 +1,38 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  ISDD Instance of Eve display processor
+
+#ifndef ALIHLTEVEISDD_H
+#define ALIHLTEVEISDD_H
+
+#include "AliHLTEveITS.h"
+
+
+class AliHLTEveISDD : public AliHLTEveITS {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveISDD();
+
+  /** Destructor **/
+ ~AliHLTEveISDD();
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveISDD(const AliHLTEveISDD&);
+  /** assignment operator prohibited */
+  AliHLTEveISDD& operator = (const AliHLTEveISDD );
+
+  /** Inherited from AliHLTEveITS */
+  void SetUpPointSet(TEvePointSet* ps);
+  
+  ClassDef(AliHLTEveISDD, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveISPD.cxx b/HLT/EVE/AliHLTEveISPD.cxx
new file mode 100644 (file)
index 0000000..c3d879f
--- /dev/null
@@ -0,0 +1,41 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  ISDD class for the HLT EVE display
+
+#include "AliHLTEveISPD.h"
+#include "TEvePointSet.h"
+
+ClassImp(AliHLTEveISPD)
+
+AliHLTEveISPD::AliHLTEveISPD() : 
+AliHLTEveITS("ISPD")
+{
+  // Constructor.
+}
+
+AliHLTEveISPD::~AliHLTEveISPD()
+{
+  //Destructor
+}
+
+void AliHLTEveISPD::SetUpPointSet(TEvePointSet * ps) {
+  //See header file for documentation
+  ps->SetMainColor(kBlack);
+  ps->SetMarkerStyle((Style_t)kFullDotMedium);
+}
diff --git a/HLT/EVE/AliHLTEveISPD.h b/HLT/EVE/AliHLTEveISPD.h
new file mode 100644 (file)
index 0000000..53e9dd6
--- /dev/null
@@ -0,0 +1,38 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  ISDD Instance of Eve display processor
+
+#ifndef ALIHLTEVEISPD_H
+#define ALIHLTEVEISPD_H
+
+#include "AliHLTEveITS.h"
+class TEvePointSet;
+
+class AliHLTEveISPD : public AliHLTEveITS {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveISPD();
+
+  /** Destructor **/
+ ~AliHLTEveISPD();
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveISPD(const AliHLTEveISPD&);
+  /** assignment operator prohibited */
+  AliHLTEveISPD& operator = (const AliHLTEveISPD );
+
+  /** Inherited from AliHLTEveITS */
+  void SetUpPointSet(TEvePointSet * ps);
+  
+  ClassDef(AliHLTEveISPD, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveISSD.cxx b/HLT/EVE/AliHLTEveISSD.cxx
new file mode 100644 (file)
index 0000000..eafbeaf
--- /dev/null
@@ -0,0 +1,120 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  ISSD class for the HLT EVE display
+
+#include "AliHLTEveISSD.h"
+#include "TEvePointSet.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TObjArray.h"
+
+ClassImp(AliHLTEveISSD);
+
+AliHLTEveISSD::AliHLTEveISSD() : 
+  AliHLTEveITS("ISSD"),
+  f2DCanvas(NULL),
+  f2DHistoCount(0)
+{
+  // Constructor.
+}
+
+AliHLTEveISSD::~AliHLTEveISSD()
+{
+  //Destructor
+  if(f2DCanvas)
+    delete f2DCanvas;
+  f2DCanvas = NULL;
+}
+
+void AliHLTEveISSD::SetUpPointSet(TEvePointSet * ps) {
+  //See header file for documentation
+  ps->SetMainColor(kBlue);
+  ps->SetMarkerStyle((Style_t)kFullDotMedium);
+}
+
+
+void AliHLTEveISSD::AddHistogramsToCanvas(AliHLTHOMERBlockDesc* block, TCanvas *canvas, Int_t &cdCount ) {
+  //See header file for documentation
+
+
+  if(!f2DCanvas) f2DCanvas = CreateCanvas("ISSD 2D QA", "ISSD 2D QA");
+
+
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    if(histo){
+      ++cdCount;
+      canvas->cd(cdCount);
+      histo->Draw();
+    }
+
+  } else if ( ! block->GetClassName().CompareTo("TH2F")) {
+    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());
+    if (hista) {
+      ++f2DHistoCount;
+      f2DCanvas->cd(f2DHistoCount);
+      hista->Draw("COLZ");
+    }
+  
+  } else if ( ! block->GetClassName().CompareTo("TObjArray")) {
+    TIter next((TObjArray*)(block->GetTObject()));
+    TObject *object;
+    while (( object = (TObject*) next())) {
+      TString string;
+      string = "TH1F";
+      TString string2;
+      string2 = "TH2F";
+
+      if ( !(string.CompareTo(object->ClassName())) ) {
+       TH1F* histo = reinterpret_cast<TH1F*>(object);
+       ++cdCount;
+       canvas->cd(cdCount);
+       histo->Draw();
+       
+      
+      } else if ( !(string2.CompareTo(object->ClassName()) ) ) {
+       TH2F* histo = reinterpret_cast<TH2F*>(object);
+       ++f2DHistoCount;
+       f2DCanvas->cd(f2DHistoCount);
+       histo->Draw("COLZ");
+      }
+    }
+  }
+
+  canvas->cd();  f2DCanvas->cd();
+  
+}
+
+
+void AliHLTEveISSD::UpdateElements() {
+  //See header file for documentation
+  if(fCanvas) fCanvas->Update();
+  if(f2DCanvas) f2DCanvas->Update();
+  if(fPointSet) fPointSet->ElementChanged();
+
+}
+
+void AliHLTEveISSD::ResetElements() {
+  //See header file for documentation
+  fHistoCount = 0;
+  f2DHistoCount = 0;
+  if(fPointSet) fPointSet->Reset();
+}
diff --git a/HLT/EVE/AliHLTEveISSD.h b/HLT/EVE/AliHLTEveISSD.h
new file mode 100644 (file)
index 0000000..e5ef61d
--- /dev/null
@@ -0,0 +1,53 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  ISDD Instance of Eve display processor
+
+#ifndef ALIHLTEVEISSD_H
+#define ALIHLTEVEISSD_H
+
+#include "AliHLTEveITS.h"
+class TEvePointSet;
+class TCanvas;
+
+class AliHLTEveISSD : public AliHLTEveITS {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveISSD();
+
+  /** Destructor **/
+ ~AliHLTEveISSD();
+
+  /** Inherited from AliHLTEveBase */
+  virtual void UpdateElements();
+  /** Inherited from AliHLTEveBase */
+  virtual void ResetElements();
+
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveISSD(const AliHLTEveISSD&);
+  /** assignment operator prohibited */
+  AliHLTEveISSD& operator = (const AliHLTEveISSD );
+  
+  /** Inherited from AliHLTEveITS */
+  void SetUpPointSet(TEvePointSet* ps);
+  
+  /** Inherited from AliHLTEveBase */
+  void AddHistogramsToCanvas(AliHLTHOMERBlockDesc* block, TCanvas *canvas, Int_t &cdCount );
+  
+  TCanvas * f2DCanvas;  //Canvas containing 2D QA histograms
+
+  Int_t f2DHistoCount;  //Counter tracking where to draw histogram
+
+  ClassDef(AliHLTEveISSD, 0);
+
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveITS.cxx b/HLT/EVE/AliHLTEveITS.cxx
new file mode 100644 (file)
index 0000000..9e93742
--- /dev/null
@@ -0,0 +1,129 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  base class for the ITS elements in the HLT EVE display
+
+#include "AliHLTEveITS.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "TH1F.h"
+#include "TH2F.h"
+#include "TEvePointSet.h"
+#include "ITS/AliHLTITSClusterDataFormat.h"
+#include "AliITSRecPoint.h"
+#include "TCanvas.h"
+
+ClassImp(AliHLTEveITS)
+
+AliHLTEveITS::AliHLTEveITS(TString name) : 
+AliHLTEveBase(),
+  fName(name), 
+  fPointSet(NULL)
+{
+  // Constructor.
+}
+
+AliHLTEveITS::~AliHLTEveITS()
+{
+  //Destructor
+  if(fPointSet)
+    delete fPointSet;
+  fPointSet = NULL;
+}
+
+void AliHLTEveITS::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+  if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) {
+    if(!fCanvas)  fCanvas = CreateCanvas(Form("%s QA",fName.Data()), Form("%s QA", fName.Data()));
+    AddHistogramsToCanvas( block , fCanvas, fHistoCount);
+  } 
+
+  else if ( block->GetDataType().CompareTo("CLUSTERS") == 0 ) {
+    if(!fPointSet) {
+      fPointSet = CreatePointSet(fName);
+      fEventManager->GetEveManager()->AddElement(fPointSet);
+    }
+    ProcessClusters(block, fPointSet);
+  }
+}
+
+
+
+void AliHLTEveITS::UpdateElements() {
+  //See header file for documentation
+  if(fCanvas) fCanvas->Update();
+  if(fPointSet) fPointSet->ElementChanged();
+}
+
+void AliHLTEveITS::ResetElements() {
+  //See header file for documentation
+  fHistoCount = 0;
+  if(fPointSet) fPointSet->Reset();
+}
+
+TEvePointSet * AliHLTEveITS::CreatePointSet(TString name) {
+  //See header file for documentation
+  TEvePointSet * ps = new TEvePointSet(name.Data());
+  SetUpPointSet(ps);
+  return ps;
+} 
+
+void AliHLTEveITS::SetUpPointSet(TEvePointSet * ps ) {
+  //See header file for documentation
+  ps->SetMainColor(kBlack);
+  ps->SetMarkerStyle((Style_t)kFullDotMedium);
+}
+
+void AliHLTEveITS::ProcessClusters(AliHLTHOMERBlockDesc * block, TEvePointSet * cont ) {
+  //See header file for documentation
+  AliHLTITSClusterData *cd = reinterpret_cast<AliHLTITSClusterData*> (block->GetData());
+  UChar_t *data            = reinterpret_cast<UChar_t*> (cd->fSpacePoints);
+  
+  if ( cd->fSpacePointCnt != 0 ) {
+    for (UInt_t iter = 0; iter < cd->fSpacePointCnt; ++iter, data += sizeof(AliHLTITSSpacePointData)) {
+      AliHLTITSSpacePointData *sp = reinterpret_cast<AliHLTITSSpacePointData*> (data);
+  
+      Int_t lab[4]   = {0,0,0,0};
+      Float_t hit[6] = {0,0,0,0,0,0};
+      Int_t info[3]  = {0,0,0};
+                                
+      lab[0]  = sp->fTracks[0];
+      lab[1]  = sp->fTracks[1];
+      lab[2]  = sp->fTracks[2];
+      lab[3]  = sp->fIndex;
+      hit[0]  = sp->fY;
+      hit[1]  = sp->fZ;
+      hit[2]  = sp->fSigmaY2;
+      hit[3]  = sp->fSigmaZ2;
+      hit[4]  = sp->fQ;
+      hit[5]  = sp->fSigmaYZ;
+      info[0] = sp->fNy;
+      info[1] = sp->fNz;
+      info[2] = sp->fLayer;
+      
+      Float_t xyz[3];
+      AliITSRecPoint recpoint(lab,hit,info);
+      recpoint.GetGlobalXYZ(xyz);
+
+      cont->SetNextPoint(xyz[0], xyz[1], xyz[2]);
+    }
+  }
+}
diff --git a/HLT/EVE/AliHLTEveITS.h b/HLT/EVE/AliHLTEveITS.h
new file mode 100644 (file)
index 0000000..8b70a27
--- /dev/null
@@ -0,0 +1,68 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  ITS base class for the Eve display processors
+
+
+#ifndef ALIHLTEVEITS_H
+#define ALIHLTEVEITS_H
+
+#include "AliHLTEveBase.h"
+#include "TString.h"
+class TEveElementList;
+class TEvePointSet;
+
+class AliHLTEveITS : public AliHLTEveBase {
+
+public :
+  
+  /** Constructor  **/
+  AliHLTEveITS(TString name = TString("ITS"));
+
+  /** Destructor **/
+ ~AliHLTEveITS();
+
+  /** Inherited from AliHLTEveBase */
+  virtual void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** Inherited from AliHLTEveBase */
+  virtual void UpdateElements();
+
+  /** Inherited from AliHLTEveBase */
+  virtual void ResetElements();
+
+
+protected :
+
+  /** Create new point set */
+  TEvePointSet * CreatePointSet(TString name);
+  
+  /** Process the clusters block */
+  void ProcessClusters(AliHLTHOMERBlockDesc * block, TEvePointSet * cont );
+  
+  /** Set up the look of the pointset, to be overridden in child instances (of one wishes) */
+  virtual void SetUpPointSet(TEvePointSet * ps );
+
+
+  TString fName;  //Detector (ITS, ISSD, ISPD, ISDD)
+  TEvePointSet * fPointSet; //The pointset for the display
+
+
+private :
+  
+  /** default constructor forbidden */
+  //AliHLTEveITS();
+
+  /** copy constructor prohibited */
+  AliHLTEveITS(const AliHLTEveITS&);
+  /** assignment operator prohibited */
+  AliHLTEveITS& operator = (const AliHLTEveITS );
+
+  
+  ClassDef(AliHLTEveITS, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveMuon.cxx b/HLT/EVE/AliHLTEveMuon.cxx
new file mode 100644 (file)
index 0000000..c6f50e3
--- /dev/null
@@ -0,0 +1,202 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  Muon processor for the HLT EVE display
+
+#include "AliHLTEveMuon.h"
+#include "AliHLTMUONDataBlockReader.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "TEveStraightLineSet.h"
+#include "TEvePointSet.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "AliMUONConstants.h"
+
+ClassImp(AliHLTEveMuon);
+
+AliHLTEveMuon::AliHLTEveMuon() : 
+  AliHLTEveBase(),
+  fTracks(NULL),
+  fClusters(NULL)
+{
+  // Constructor.
+}
+
+AliHLTEveMuon::~AliHLTEveMuon()
+{
+  //Destructor
+  if (fTracks)
+    delete fTracks;
+  fTracks = NULL;
+
+  if(fClusters)
+    delete fClusters;
+  fClusters = NULL;
+}
+
+
+void AliHLTEveMuon::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+    if ( (block->GetDataType().CompareTo("RECHITS") == 0) || (block->GetDataType().CompareTo("TRIGRECS") == 0) ) {
+    if(fClusters) {
+      fClusters = CreateClusters();
+      fEventManager->GetEveManager()->AddElement(fClusters);
+    }
+    ProcessClusters( block, fClusters );
+    
+  }else if(block->GetDataType().CompareTo("MANTRACK") == 0){
+    
+    if ( !fTracks ) {
+      fTracks = CreateTrackSet(); 
+      fEventManager->GetEveManager()->AddElement(fTracks);
+      gEve->AddElement(fTracks);
+    }
+    
+    ProcessTracks( block, fTracks );
+  } 
+}
+
+TEvePointSet * AliHLTEveMuon::CreateClusters() {
+  //See header file for documentation
+  TEvePointSet * ps = new TEvePointSet("MUON RecHits");
+  ps->SetMainColor(kBlue);
+  ps->SetMarkerStyle(20);
+  return ps;
+}
+
+TEveStraightLineSet * AliHLTEveMuon::CreateTrackSet() {
+  TEveStraightLineSet * ls = new TEveStraightLineSet("MUON Tracks");
+  ls->SetMainColor(kRed);
+  ls->SetLineWidth(3);
+  return ls;
+}
+
+void AliHLTEveMuon::ProcessHistogram(AliHLTHOMERBlockDesc * block ) {
+  //See header file for documentation
+  if(!fCanvas) {
+    fCanvas = CreateCanvas("MUON QA", "MUON QA");
+    fCanvas->Divide(3, 2);
+  }
+  AddHistogramsToCanvas(block, fCanvas, fHistoCount);
+}
+
+void AliHLTEveMuon::UpdateElements() {
+  //See header file for documentation
+  if(fCanvas) fCanvas->Update();
+  if(fClusters) fClusters->ResetBBox();
+  if(fTracks) fTracks->ElementChanged();
+}
+
+void AliHLTEveMuon::ResetElements(){
+  //See header file for documentation
+  fHistoCount = 0;
+  
+  if ( fClusters ) fClusters->Reset();
+  if ( fTracks ){
+    fTracks->Destroy();
+    fTracks = NULL;
+  }
+
+}
+
+void AliHLTEveMuon::ProcessClusters(AliHLTHOMERBlockDesc * block, TEvePointSet * clusters) {
+    //See header file for documentation
+  unsigned long size = block->GetSize();
+  Int_t * buffer ;
+  
+  buffer = (Int_t *)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++){
+      if(hit->fX!=0.0 && hit->fY!=0.0 && hit->fZ!=0.0)
+       clusters->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++)
+       {
+         if(hit->fX!=0.0 && hit->fY!=0.0 && hit->fZ!=0.0)
+           clusters->SetNextPoint(hit->fX,hit->fY,hit->fZ);
+         hit++;
+       }// trig chamber loop
+      trigrec++;
+    }//trig hit loop
+  }//else trigger
+  
+}
+
+void AliHLTEveMuon::ProcessTracks(AliHLTHOMERBlockDesc * block, TEveStraightLineSet * tracks) {
+  //See header file for documentation  
+  unsigned long size = block->GetSize();
+  Int_t * buffer = (Int_t *)block->GetData();
+  AliHLTMUONRecHitStruct hit1,hit2;
+  hit1.fX = hit1.fY = hit1.fZ = hit2.fX = hit2.fY = hit2.fZ = 0;
+  Int_t ch1=0, ch2=0;
+  Float_t x0=0.0,y0=0.0,z0=0.0;
+  Float_t x3=0.0,y3=0.0,z3=0.0;
+  if(block->GetDataType().CompareTo("MANTRACK") == 0){  
+    AliHLTMUONMansoTracksBlockReader mantrackblock(buffer, size);
+    const AliHLTMUONMansoTrackStruct* mtrack = mantrackblock.GetArray();
+    for(AliHLTUInt32_t ientry = 0; ientry < mantrackblock.Nentries(); ientry++){
+      const AliHLTMUONRecHitStruct* hit = &mtrack->fHit[0];
+      for(AliHLTUInt32_t ch = 0; ch < 4; ch++){
+       // cout << setw(10) << left << ch + 7 << setw(0);
+       // cout << setw(13) << left << hit->fX << setw(0);
+       // cout << setw(13) << left << hit->fY << setw(0);
+       // cout << hit->fZ << setw(0) << endl;
+       if(hit->fZ != 0.0){
+         if(ch==0 || ch==1){
+           hit1 = *hit; ch1 = ch+6;
+         }else{
+           hit2 = *hit; ch2 = ch+6;
+         }
+       }
+       hit++;
+      }// trig chamber loop
+      // printf("ch : %d, (X,Y,Z) : (%f,%f,%f)\n",ch1,hit1.fX,hit1.fY,hit1.fZ);
+      // printf("ch : %d, (X,Y,Z) : (%f,%f,%f)\n",ch2,hit2.fX,hit2.fY,hit2.fZ);
+      // meminfo();
+      z3 = AliMUONConstants::DefaultChamberZ(ch2+4);
+      y3 =  hit1.fY - (hit1.fZ-z3)*(hit1.fY - hit2.fY)/(hit1.fZ - hit2.fZ) ;
+      x3 =  hit1.fX - (hit1.fZ-z3)*(hit1.fX - hit2.fX)/(hit1.fZ - hit2.fZ) ;
+
+      z0 = AliMUONConstants::DefaultChamberZ(ch1);
+      y0 =  hit1.fY - (hit1.fZ-z0)*(hit1.fY - hit2.fY)/(hit1.fZ - hit2.fZ) ;
+      x0 =  hit1.fX - (hit1.fZ-z0)*(hit1.fX - hit2.fX)/(hit1.fZ - hit2.fZ) ;
+      
+
+      tracks->AddLine(x0,y0,z0,x3,y3,z3);
+      mtrack++;
+    }
+    //    cout<<"NofManso Tracks : "<<mantrackblock.Nentries()<<endl;
+  }
+}
diff --git a/HLT/EVE/AliHLTEveMuon.h b/HLT/EVE/AliHLTEveMuon.h
new file mode 100644 (file)
index 0000000..296691f
--- /dev/null
@@ -0,0 +1,63 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  Muon Instance of Eve display processor
+
+
+#ifndef ALIHLTEVEMUON_H
+#define ALIHLTEVEMUON_H
+
+#include "AliHLTEveBase.h"
+class AliHLTHOMERBlockDesc;
+class TEveStraightLineSet;
+class TEvePointSet;
+
+class AliHLTEveMuon : public AliHLTEveBase {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveMuon();
+
+  /** Destructor **/
+ ~AliHLTEveMuon();
+
+  /** Inherited form AliHLTEveBase */
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** inherited from AliHLTEveBase */
+  void UpdateElements();
+  
+  /** inherited from AliHLTEveBase */
+  void ResetElements();
+
+private:
+  
+  /** copy constructor prohibited */
+  AliHLTEveMuon(const AliHLTEveMuon&);
+  /** assignment operator prohibited */
+  AliHLTEveMuon& operator = (const AliHLTEveMuon &);
+
+  /** Inherited from AliHLTEveBase */
+  void ProcessHistogram(AliHLTHOMERBlockDesc * block );
+
+  /** Process block containing clusters */
+  void ProcessClusters(AliHLTHOMERBlockDesc * block, TEvePointSet * clusters);
+  /** Process block containing tracks */
+  void ProcessTracks(AliHLTHOMERBlockDesc * block, TEveStraightLineSet * tracks);
+  
+  /** create the cluster pointset*/
+  TEvePointSet * CreateClusters();
+  /** create the tracks lineset */
+  TEveStraightLineSet * CreateTrackSet();
+
+  TEveStraightLineSet * fTracks; //The track elements
+  TEvePointSet * fClusters; //The cluster elements
+
+  ClassDef(AliHLTEveMuon, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEvePhos.cxx b/HLT/EVE/AliHLTEvePhos.cxx
new file mode 100644 (file)
index 0000000..e40bfbd
--- /dev/null
@@ -0,0 +1,98 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  PHOS class for the HLT EVE display
+
+#include "AliHLTEvePhos.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "TEveBoxSet.h"
+#include "AliPHOSGeometry.h"
+#include "TVector3.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "AliHLTCaloDigitDataStruct.h"
+#include "AliHLTCaloClusterDataStruct.h"
+#include "AliHLTCaloClusterReader.h"
+#include "TEveTrans.h"
+
+ClassImp(AliHLTEvePhos)
+
+AliHLTEvePhos::AliHLTEvePhos() : 
+AliHLTEveCalo(5, "PHOS")
+{
+  // Constructor.
+}
+
+AliHLTEvePhos::~AliHLTEvePhos()
+{
+  //Destructor
+}
+
+
+TEveElementList * AliHLTEvePhos::CreateElementList() {
+  //See header file for documentation
+
+  TEveElementList * elementList  = new TEveElementList("PHOS ");
+  fBoxSet = new TEveBoxSet[fNModules];
+
+  AliPHOSGeometry * geo = AliPHOSGeometry::GetInstance("IHEP", "IHEP");
+  
+  TVector3 center;
+  Float_t angle;
+  
+  // -- Create boxsets
+  for(int im = 0; im < fNModules; im++) {
+    
+    TEveRGBAPalette* pal = new TEveRGBAPalette(0,512);
+    pal->SetLimits(-0.01, 0.5);
+    fBoxSet[im].SetTitle(Form("Clusters Module %d", im));
+    fBoxSet[im].SetName(Form("Clusters Module %d", im));
+    fBoxSet[im].SetPalette(pal);
+    fBoxSet[im].Reset(TEveBoxSet::kBT_AABox, kFALSE, 64);
+    fBoxSet[im].SetOwnIds(kTRUE);
+    
+    
+    geo->GetModuleCenter(center, "CPV", im+1);
+    angle = geo->GetPHOSAngle(im+1)*TMath::Pi()/180;
+    
+    fBoxSet[im].RefitPlex();
+    TEveTrans& t = fBoxSet[im].RefMainTrans();
+    t.SetupRotation(1, 2, angle );
+    t.SetPos(center.X(), center.Y(), center.Z());
+    
+    elementList->AddElement(&fBoxSet[im]);
+  }
+  return elementList;
+}
+
+void AliHLTEvePhos::AddDigits(UShort_t fX, UShort_t fZ, Int_t module, Float_t energy) {
+  //See header file for documentation
+  Float_t x = (fX - 32)* 2.2;
+  Float_t z = (fZ - 28) * 2.2;
+  fBoxSet[4-module].AddBox(x, 0, z, 2.2, energy*2000, 2.2);
+  fBoxSet[4-module].DigitValue(static_cast<Int_t>(energy));
+}
+
+
+void AliHLTEvePhos::AddClusters(Float_t * pos, Int_t module, Float_t energy) {
+  //See header file for documentation
+  fBoxSet[module].AddBox(pos[0], pos[1], pos[2], 2.2, energy*200, 2.2);
+  fBoxSet[module].DigitValue(static_cast<Int_t>(energy));
+}
+
diff --git a/HLT/EVE/AliHLTEvePhos.h b/HLT/EVE/AliHLTEvePhos.h
new file mode 100644 (file)
index 0000000..2b346ed
--- /dev/null
@@ -0,0 +1,44 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  PHOS Instance of Eve display processor
+
+#ifndef ALIHLTEVEPHOS_H
+#define ALIHLTEVEPHOS_H
+
+#include "AliHLTEveCalo.h"
+class TEveElementList;
+
+class AliHLTEvePhos : public AliHLTEveCalo {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEvePhos();
+
+  /** Destructor **/
+ ~AliHLTEvePhos();
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEvePhos(const AliHLTEvePhos&);
+  /** assignment operator prohibited */
+  AliHLTEvePhos& operator = (const AliHLTEvePhos );
+
+  /** inherited from AliHLTEveCalo */
+  TEveElementList * CreateElementList();
+  
+  /** inherited from AliHLTEveCalo */
+  void AddClusters(Float_t * pos, Int_t module, Float_t energy);
+
+  /** inherited from AliHLTEveCalo */
+  void AddDigits(UShort_t fX, UShort_t fZ, Int_t module, Float_t energy);
+
+  ClassDef(AliHLTEvePhos, 0);
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveTPC.cxx b/HLT/EVE/AliHLTEveTPC.cxx
new file mode 100644 (file)
index 0000000..deedb32
--- /dev/null
@@ -0,0 +1,217 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  TPC processor for the HLT EVE display
+
+#include "AliHLTEveTPC.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "AliHLTEveBase.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "TEvePointSet.h"
+#include "TColor.h"
+#include "TMath.h"
+#include "AliHLTTPCClusterDataFormat.h"
+#include "TH1F.h"
+
+ClassImp(AliHLTEveTPC)
+
+AliHLTEveTPC::AliHLTEveTPC() : 
+  AliHLTEveBase(), 
+  fEveClusters(NULL),
+  fEveColClusters(NULL),
+  fNColorBins(15), 
+  fHistCharge(NULL), 
+  fHistQMax(NULL), 
+  fHistQMaxOverCharge(NULL)
+{
+  // Constructor.
+}
+
+AliHLTEveTPC::~AliHLTEveTPC()
+{
+  //Destructor
+  if(fEveColClusters)
+    delete fEveColClusters;
+  fEveColClusters = NULL;
+
+  if(fEveClusters)
+    delete fEveClusters;
+  fEveClusters = NULL;
+
+  if(fHistQMaxOverCharge)
+    delete fHistQMaxOverCharge;
+  fHistQMaxOverCharge = NULL;
+
+  if(fHistQMax)
+    delete fHistQMax;
+  fHistQMax = NULL;
+
+  if(fHistCharge)
+    delete fHistCharge;
+  fHistCharge = NULL;
+
+}
+
+
+void AliHLTEveTPC::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+
+  if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {
+
+    if(!fEveClusters){   
+      fEveClusters = CreatePointSet();
+      //fEventManager->GetEveManager()->AddElement(fEveClusters);
+    } 
+    
+    if(!fEveColClusters){
+      fEveColClusters = CreatePointSetArray();
+      fEventManager->GetEveManager()->AddElement(fEveColClusters);
+    } 
+    
+    ProcessClusters(block, fEveClusters, fEveColClusters);
+   
+  }
+  
+//   else if ( ! block->GetDataType().CompareTo("HWCL_ALT") ) {
+//     if(!gTPCTestClusters){    
+      
+//       gTPCTestClusters = new TEvePointSet("TPC Clusters Test");
+//       //ggTPCTestClusters->ApplyVizTag("TPC Clusters");
+//       gTPCTestClusters->SetMainColor(kBlue);
+//       gTPCTestClusters->SetMarkerStyle((Style_t)kFullDotSmall);
+//       gEve->AddElement(gTPCTestClusters);
+//     }
+    
+//     processTPCClusters(block, gTPCTestClusters);
+//     gTPCTestClusters->ElementChanged();
+//   }
+  
+  
+}
+
+TEvePointSet * AliHLTEveTPC::CreatePointSet() {
+  //See header file for documentation
+
+  TEvePointSet * ps = new TEvePointSet("TPC Clusters");
+  ps->SetMainColor(kRed);
+  ps->SetMarkerStyle((Style_t)kFullDotSmall);
+  return ps;
+
+}
+
+TEvePointSetArray * AliHLTEveTPC::CreatePointSetArray(){
+  //See header file for documentation
+
+  TEvePointSetArray * cc = new TEvePointSetArray("TPC Clusters Colorized");
+  cc->SetMainColor(kRed);
+  cc->SetMarkerStyle(4); // antialiased circle
+  cc->SetMarkerSize(0.4);
+  cc->InitBins("Cluster Charge", fNColorBins, 0., fNColorBins*20.);
+  
+  const Int_t nCol = TColor::GetNumberOfColors();
+  
+  for (Int_t ii = 0; ii < fNColorBins + 1; ++ii) {
+    cc->GetBin(ii)->SetMainColor(TColor::GetColorPalette(ii * nCol / (fNColorBins+2)));
+  }
+
+  return cc;
+     
+}
+
+
+void AliHLTEveTPC::UpdateElements() {
+  //See header file for documentation
+
+  if(fCanvas) fCanvas->Update();
+  if(fEveClusters) fEveClusters->ResetBBox();
+  // if(fEveColClusters){
+  //  for (Int_t ib = 0; ib <= fNColorBins + 1; ++ib) {
+  //    fEveColClusters->GetBin(ib)->ResetBBox();
+  //  }
+  // }
+
+}
+
+void AliHLTEveTPC::ResetElements(){
+  //See header file for documentation
+
+  if(fEveClusters) fEveClusters->Reset();
+  if(fEveColClusters){
+    for (Int_t ib = 0; ib <= fNColorBins + 1; ++ib) {
+      fEveColClusters->GetBin(ib)->Reset();
+    }
+  }
+
+}
+
+Int_t AliHLTEveTPC::ProcessClusters( AliHLTHOMERBlockDesc * block, TEvePointSet * cont, TEvePointSetArray * contCol ){
+  //See header file for documentation
+
+
+  if (!fCanvas) {
+    fCanvas = CreateCanvas("TPC QA", "TPC QA");
+    fCanvas->Divide(2, 2);
+    fHistCharge = new TH1F("ClusterCharge","ClusterCharge",100,0,500);
+    fHistQMax = new TH1F("QMax","QMax",50,0,250);
+    fHistQMaxOverCharge = new TH1F("QMaxOverCharge","QMaxOverCharge",50,0,1);
+  }
+
+
+  Int_t   slice = block->GetSubDetector();
+  Float_t phi   = ( slice + 0.5 ) * TMath::Pi() / 9.0;  
+  Float_t cos   = TMath::Cos( phi );
+  Float_t sin   = TMath::Sin( phi );
+  
+  AliHLTTPCClusterData *cd = reinterpret_cast<AliHLTTPCClusterData*> (block->GetData());
+  UChar_t *data            = reinterpret_cast<UChar_t*> (cd->fSpacePoints);
+
+  if ( cd->fSpacePointCnt != 0 ) {
+    for (UInt_t iter = 0; iter < cd->fSpacePointCnt; ++iter, data += sizeof(AliHLTTPCSpacePointData)) {
+      AliHLTTPCSpacePointData *sp = reinterpret_cast<AliHLTTPCSpacePointData*> (data);
+      cont->SetNextPoint(cos*sp->fX - sin*sp->fY, sin*sp->fX + cos*sp->fY, sp->fZ);
+      if (contCol)
+       contCol->Fill(cos*sp->fX - sin*sp->fY, sin*sp->fX + cos*sp->fY, sp->fZ, sp->fCharge);
+
+      fHistCharge->Fill(sp->fCharge);
+      fHistQMax->Fill(sp->fQMax);
+      fHistQMaxOverCharge->Fill(((Float_t)sp->fQMax)/((Float_t)sp->fCharge));
+    }
+  }
+
+  Int_t icd = 1;
+  fCanvas->cd(icd++);
+  fHistCharge->Draw();
+  fCanvas->cd(icd++);
+  fHistQMax->Draw();
+  fCanvas->cd(icd++);
+  fHistQMaxOverCharge->Draw();
+  fCanvas->cd();
+
+  cont->ElementChanged();
+  contCol->ElementChanged();
+    
+  return 0;  
+
+
+}
+
+
diff --git a/HLT/EVE/AliHLTEveTPC.h b/HLT/EVE/AliHLTEveTPC.h
new file mode 100644 (file)
index 0000000..dee112f
--- /dev/null
@@ -0,0 +1,62 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  TPC Instance of Eve display processor
+
+#ifndef ALIHLTEVETPC_H
+#define ALIHLTEVETPC_H
+
+#include "AliHLTEveBase.h"
+class TEvePointSetArray;
+class TEvePointSet;
+class TH1F;
+
+class AliHLTEveTPC : public AliHLTEveBase {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveTPC();
+
+  /** Destructor **/
+ ~AliHLTEveTPC();
+  
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** inherited from AliHLTEveBase */
+  void UpdateElements();
+  
+  /** inherited from AliHLTEveBase */
+  void ResetElements();
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveTPC(const AliHLTEveTPC&);
+  /** assignment operator prohibited */
+  AliHLTEveTPC& operator = (const AliHLTEveTPC );
+
+  /** Create point set for clusters */
+  TEvePointSet * CreatePointSet();
+  /** Create point set array for colour coded clusters */
+  TEvePointSetArray * CreatePointSetArray();
+
+  /** Proces clusters block */
+  Int_t ProcessClusters( AliHLTHOMERBlockDesc * block, TEvePointSet * cont, TEvePointSetArray * contCol );
+
+  TEvePointSet * fEveClusters;          //Clusters pointset
+  TEvePointSetArray * fEveColClusters;  //Color coded clusters pointset
+  const Int_t fNColorBins;             //Number of colorbins for the colored clusters
+
+  TH1F * fHistCharge;                  //Histo
+  TH1F * fHistQMax;                    //Histo
+  TH1F * fHistQMaxOverCharge;          //Histo
+
+  ClassDef(AliHLTEveTPC, 0);
+
+};
+
+#endif
diff --git a/HLT/EVE/AliHLTEveTRD.cxx b/HLT/EVE/AliHLTEveTRD.cxx
new file mode 100644 (file)
index 0000000..b198b30
--- /dev/null
@@ -0,0 +1,199 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ *                                                                        *
+ * Primary Authors: Svein Lindal <slindal@fys.uio.no   >                  *
+ *                  for The ALICE HLT Project.                            *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/// @file   AliHLTEvePhos.cxx
+/// @author Svein Lindal <slindal@fys.uio.no>
+/// @brief  TPC processor for the HLT EVE display
+
+#include "AliHLTEveTRD.h"
+#include "AliHLTHOMERBlockDesc.h"
+#include "TCanvas.h"
+#include "AliHLTEveBase.h"
+#include "AliEveHOMERManager.h"
+#include "TEveManager.h"
+#include "TEvePointSet.h"
+#include "TColor.h"
+#include "TMath.h"
+#include "TH1F.h"
+#include "AliHLTTRDCluster.h"
+#include "AliTRDcluster.h"
+
+ClassImp(AliHLTEveTRD)
+
+AliHLTEveTRD::AliHLTEveTRD() : 
+  AliHLTEveBase(), 
+  fEveClusters(NULL),
+  fEveColClusters(NULL),
+  fNColorBins(15)
+{
+  // Constructor.
+
+}
+
+AliHLTEveTRD::~AliHLTEveTRD()
+{
+  //Destructor, not implemented
+  if(fEveColClusters)
+    delete fEveColClusters;
+  fEveColClusters = NULL;
+  
+  if(fEveClusters)
+    delete fEveClusters;
+  fEveClusters = NULL;
+}
+
+
+void AliHLTEveTRD::ProcessBlock(AliHLTHOMERBlockDesc * block) {
+  //See header file for documentation
+
+  if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {
+    
+    if(!fEveColClusters){
+      fEveColClusters = CreatePointSetArray();
+      fEventManager->GetEveManager()->AddElement(fEveColClusters);
+    } 
+    
+    ProcessClusters(block, fEveClusters, fEveColClusters);
+   
+  } else if ( ! block->GetDataType().CompareTo("ROOTHIST") ) {
+  
+    if(!fCanvas) fCanvas = CreateCanvas("TRD QA", "TRD QA");
+    fCanvas->Divide(3, 2);
+    AddHistogramsToCanvas(block, fCanvas, fHistoCount);
+                  
+  }
+  
+}
+
+
+void AliHLTEveTRD::AddHistogramsToCanvas(AliHLTHOMERBlockDesc* block, TCanvas * canvas, Int_t &cdCount ) {
+  //See header file for documentation
+  if ( ! block->GetClassName().CompareTo("TH1F")) {
+    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());
+    ++cdCount;
+  
+    TVirtualPad* pad = canvas->cd(cdCount);
+    histo->Draw();
+    pad->SetGridy();
+    pad->SetGridx();
+
+    if ( ! strcmp(histo->GetName(), "nscls") ) {
+      histo->GetXaxis()->SetRangeUser(0.,15.);
+    }
+
+    if ( ! strcmp(histo->GetName(),"sclsdist") ||
+        ! strcmp(histo->GetName(),"evSize") )
+      pad->SetLogy();
+  }
+
+}
+
+
+
+TEvePointSet * AliHLTEveTRD::CreatePointSet() {
+  //See header file for documentation
+  TEvePointSet * ps = new TEvePointSet("TRD Clusters");
+  ps->SetMainColor(kBlue);
+  ps->SetMarkerStyle((Style_t)kFullDotSmall);
+  return ps;
+
+}
+
+TEvePointSetArray * AliHLTEveTRD::CreatePointSetArray(){
+  //See header file for documentation
+  TEvePointSetArray * cc = new TEvePointSetArray("TRD Clusters Colorized");
+  cc->SetMainColor(kRed);
+  cc->SetMarkerStyle(4); // antialiased circle
+  cc->SetMarkerSize(0.4);
+  cc->InitBins("Cluster Charge", fNColorBins, 0., fNColorBins*100.);
+  
+  const Int_t nCol = TColor::GetNumberOfColors();
+  for (Int_t ii = 0; ii < fNColorBins + 1; ++ii) {
+    cc->GetBin(ii)->SetMainColor(TColor::GetColorPalette(ii * nCol / (fNColorBins+2)));
+  }
+
+  return cc;
+     
+}
+
+
+void AliHLTEveTRD::UpdateElements() {
+  //See header file for documentation
+  if(fCanvas) fCanvas->Update();
+  if(fEveClusters) fEveClusters->ResetBBox();
+
+  //   for (Int_t ib = 0; ib <= fNColorBins + 1; ++ib) {
+  //     fEveColClusters->GetBin(ib)->ResetBBox();
+  //   }
+
+}
+
+void AliHLTEveTRD::ResetElements(){
+  //See header file for documentation
+  if(fEveClusters) fEveClusters->Reset();
+  if(fEveColClusters){
+    for (Int_t ib = 0; ib <= fNColorBins + 1; ++ib) {
+      fEveColClusters->GetBin(ib)->Reset();
+    }
+  }
+
+}
+
+Int_t AliHLTEveTRD::ProcessClusters( AliHLTHOMERBlockDesc * block, TEvePointSet * cont, TEvePointSetArray * contCol ){
+  //See header file for documentation
+  
+  Int_t iResult = 0;
+
+  Int_t sm = block->GetSubDetector();
+  if ( sm == 6 ) sm = 7;
+  
+  Float_t phi   = ( sm + 0.5 ) * TMath::Pi() / 9.0;  
+  Float_t cos   = TMath::Cos( phi );
+  Float_t sin   = TMath::Sin( phi );
+  
+  Byte_t* ptrData = reinterpret_cast<Byte_t*>(block->GetData());
+  UInt_t ptrSize = block->GetSize();
+
+  for (UInt_t size = 0; size+sizeof(AliHLTTRDCluster) <= ptrSize; size+=sizeof(AliHLTTRDCluster) ) {
+    AliHLTTRDCluster *cluster = reinterpret_cast<AliHLTTRDCluster*>(&(ptrData[size]));
+   
+    AliTRDcluster *trdCluster = new AliTRDcluster;
+    cluster->ExportTRDCluster( trdCluster );
+   
+    contCol->Fill(cos*trdCluster->GetX() - sin*trdCluster->GetY(), 
+                  sin*trdCluster->GetX() + cos*trdCluster->GetY(), 
+                  trdCluster->GetZ(),
+                  trdCluster->GetQ() );    
+     
+    cont->SetNextPoint(cos*trdCluster->GetX() - sin*trdCluster->GetY(), 
+                      sin*trdCluster->GetX() + cos*trdCluster->GetY(), trdCluster->GetZ());
+  }
+  
+  return iResult;
+
+
+
+
+
+  return 0;  
+
+
+}
+
+
diff --git a/HLT/EVE/AliHLTEveTRD.h b/HLT/EVE/AliHLTEveTRD.h
new file mode 100644 (file)
index 0000000..f2d4e9a
--- /dev/null
@@ -0,0 +1,60 @@
+/* This file is property of and copyright by the ALICE HLT Project        *
+ * ALICE Experiment at CERN, All rights reserved.                         *
+ * See cxx source for full Copyright notice                               */
+
+/// @file   AliHLTEveCalo.h
+/// @author Svein Lindal
+/// @brief  TRD Instance of Eve display processor
+
+#ifndef ALIHLTEVETRD_H
+#define ALIHLTEVETRD_H
+
+#include "AliHLTEveBase.h"
+class TEvePointSetArray;
+class TEvePointSet;
+class TH1F;
+
+class AliHLTEveTRD : public AliHLTEveBase {
+
+public:
+  
+  /** Constructor  **/
+  AliHLTEveTRD();
+
+  /** Destructor **/
+ ~AliHLTEveTRD();
+  
+  void ProcessBlock(AliHLTHOMERBlockDesc * block);
+
+  /** inherited from AliHLTEveBase */
+  void UpdateElements();
+  
+  /** inherited from AliHLTEveBase */
+  void ResetElements();
+
+private:
+
+  /** copy constructor prohibited */
+  AliHLTEveTRD(const AliHLTEveTRD&);
+  /** assignment operator prohibited */
+  AliHLTEveTRD& operator = (const AliHLTEveTRD );
+
+  /** Create clusters pointset */
+  TEvePointSet * CreatePointSet();
+  /** Create point set array for colour coded clusters */
+  TEvePointSetArray * CreatePointSetArray();
+
+  /** Proces clusters block */
+  Int_t ProcessClusters( AliHLTHOMERBlockDesc * block, TEvePointSet * cont, TEvePointSetArray * contCol );
+
+  /** Inherited from AliHLTEveBase */
+  void AddHistogramsToCanvas(AliHLTHOMERBlockDesc* block, TCanvas * canvas, Int_t &cdCount );
+
+  TEvePointSet * fEveClusters;         //clusters pointset
+  TEvePointSetArray * fEveColClusters; //Color coded clusters pointset
+  const Int_t fNColorBins;    //Number of colorbins for the colored clusters
+
+  ClassDef(AliHLTEveTRD, 0);
+};
+
+#endif
diff --git a/HLT/EVE/ChangeLog b/HLT/EVE/ChangeLog
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/HLT/EVE/Makefile.am b/HLT/EVE/Makefile.am
new file mode 100644 (file)
index 0000000..2ecb1e8
--- /dev/null
@@ -0,0 +1,136 @@
+# $Id$
+# Makefile template for the Alice HLT sample library
+
+# This files defines the autotools-based build system of the
+# libAliHLTSample library. All lines starting with a '#' are comments.
+# Note: Source files definitions must be made in libAliHLTSample.pkg
+# For further information refer to the README.
+
+MODULE                                 = AliHLTSample
+
+EXTRA_DIST                     = tutorial.c
+
+# include the pkg definition which actually contains the source
+# file definitions
+MODDIR                         = $(top_srcdir)
+PKGDEF                         = $(MODDIR)/libAliHLTSample.pkg
+include $(top_srcdir)/libAliHLTSample.pkg
+
+
+# library definition
+# The lib_LTLIBRARIES variable is a fixed variable of the autotools build
+# system. All libraries defined by the Makefile template have to be added
+# here. Since we aim for separated directories for different libraries
+# there will be only one library.
+lib_LTLIBRARIES                        =  libAliHLTSample.la
+
+# version info for the library
+# The libtool program is used to created the library, a version number can
+# be specified by using the -version-info flag. This flag accepts an argument
+# of the form current[:revision[:age]].
+# If either revision or age are omitted, they default to 0. Also note that
+# age must be less than or equal to the current interface number. Here are a
+# set of rules to help you update your library version information:
+#
+#   1. Start with version information of 0:0:0 for each libtool library.
+#   2. Update the version information only immediately before a public release
+#      of your software. More frequent updates are unnecessary, and only
+#      guarantee that the current interface number gets larger faster.
+#   3. If the library source code has changed at all since the last update,
+#      then increment revision (c:r:a becomes c:r+1:a).
+#   4. If any interfaces have been added, removed, or changed since the last
+#      update, increment current, and set revision to 0.
+#   5. If any interfaces have been added since the last public release, then
+#      increment age.
+#   6. If any interfaces have been removed since the last public release, then
+#      set age to 0. 
+LIBRARY_VERSION                        = '1:0:0'
+
+# library sources
+# The source files are specified in libAliHLTSample.pkg
+libAliHLTSample_la_SOURCES     =  $(MODULE_SRCS)
+
+# library headers
+# The header files are specified in libAliHLTSample.pkg
+noinst_HEADERS                 =  $(MODULE_HDRS)
+
+# compilation flags of the library
+# This is the place to add further include directories if you are
+# using external modules. The AliRoot/STEER and ROOT directories
+# are the default include directories.
+# Include paths within the HLT modules are automatically taken from the
+# EINCLUDE variable of the pkg definition
+# other AliRoot dependencies might need to added
+AM_CPPFLAGS                    = -DMODULE=$(MODULE) \
+                                 @HLTBASE_CPPFLAGS@ \
+                                 @ALIROOT_CPPFLAGS@ \
+                                 @ROOTCFLAGS@ \
+                                 $(foreach i, $(EINCLUDE),  \
+                                       $(shell echo $(i) | sed -e "/HLT\//!d" -e "s|HLT/|-I$(top_srcdir)/|")) \
+                                 $(foreach i, $(EINCLUDE),  \
+                                       $(shell echo $(i) | sed -e "/HLT\//d" -e "s|^|-I$(ALICE_ROOT)/|"))
+
+# linking flags of the library
+# This is the place to add further libraries if you are
+# using external modules. The AliRoot, ROOT and HLT base libraries
+# are added by default.
+# Also the version of the library 
+libAliHLTSample_la_LDFLAGS     = -L@ROOTLIBDIR@ \
+                                 @ROOTLIBS@ \
+                                 @HLTBASE_LDFLAGS@ \
+                                 @ALIROOT_LDFLAGS@ \
+                                 @ALIROOT_LIBS@ \
+                                 -version-info $(LIBRARY_VERSION)
+
+# automatic generation of data and time of library build
+COMPILE_INFO                   =  AliHLTSampleCompileInfo.cxx
+
+# set the file name for the generated root dictionary
+DICTCPP                                =  AliHLTSample-DICT.cxx
+nodist_libAliHLTSample_la_SOURCES= $(COMPILE_INFO) \
+                                  $(DICTCPP)
+
+CLEANFILES                     = $(COMPILE_INFO)
+
+###############################################################################
+#
+# do not change anything below this line
+#
+DICTDEF                                =  $(MODULE)-LinkDef.h
+DICTFILES                      =  $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTDEF)
+DICTHEADERS                    =  $(CLASS_HDRS)
+
+CLEANFILES                     += $(DICTFILES)
+
+# the rootcint buffer for macros is limited to 1024 characters
+# we have to filter out some of the defines
+DEFFILTER                      = -DPACKAGE* -DHAVE_STDLIB_H=1* -DHAVE_STRING_H=1* -DHAVE_MEMORY_H=1* -DHAVE_STRINGS_H=1* -DHAVE_INTTYPES_H=1* -DHAVE_STDINT_H=1* -DHAVE_UNISTD_H=1* -DHAVE_DLFCN_H=1* -DHAVE_NOT_*
+
+
+$(DICTCPP:.cxx=.h): $(DICTCPP)
+       if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi 
+
+$(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF)
+       if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) \
+        `for i in $(DEFS);do case $$i in $(foreach def, $(DEFFILTER), $(def) |) -DVERSION*);; *) echo -n " $$i";; esac; done` \
+        $(foreach i, $(DICTINCLUDE), $(i)) \
+        $^ ; fi
+
+$(DICTDEF): Makefile.am $(PKGDEF)
+       @echo '//automatically generated ROOT DICT definition' > $@
+       @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
+       @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@
+       @echo '#ifdef __CINT__' >> $@
+       @echo '#pragma link off all globals;' >> $@
+       @echo '#pragma link off all classes;' >> $@
+       @echo '#pragma link off all functions;' >> $@
+       @$(foreach i, $(DICTHEADERS), \
+          echo "#pragma link C++ class `echo $(i) | sed -e "s|.*/||g" -e "s|\.h.*||"`;" >> $@ ;)
+       @echo '#endif' >> $@
+
+$(COMPILE_INFO): $(libAliHLTSample_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am
+       @echo '//automatically generated compilation info' > $@
+       @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
+       @echo '//add changes in Makefile.am' >> $@
+       @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@
+       @echo '{date=__DATE__; time=__TIME__; return;}' >> $@
diff --git a/HLT/EVE/NEWS b/HLT/EVE/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/HLT/EVE/README b/HLT/EVE/README
new file mode 100644 (file)
index 0000000..6f56c62
--- /dev/null
@@ -0,0 +1,243 @@
+This README describes the procedure to create a customized component 
+library for the ALICE HLT.
+
+Please send corrections/suggestions/bugreports to
+Matthias.Richter@ift.uib.no
+
+Part A describes a library embedded into the ALICE HLT build system
+Part B gives a  recipe for using this package stand-alone
+
+Note: You can not mix the two alternatives since this would confuse aototools. 
+Our suggestions: If you are developing anyway with the AliRoot HLT module 
+choose alternative A. If you don't use the HLT module explicitly choose 
+alternative B.
+
+If you have downloaded the 'alice-hlt-sample' package and want to build and 
+modify it, go directly to Part B.
+
+===============================================================================
+=====                                                                     =====
+=====                Part A: The embedded case                            =====
+=====                                                                     =====
+===============================================================================
+
+This describes how to create a new component library embedded into the
+ALICE HLT build system. We asume that you have a version of the AliRoot
+HLT module installed. The top level directory of the package is referred
+as 'topdir' from now on.
+
+1. Choose a name for your library and the sub-folder: 
+   e.g. 'libAliHLTTest' in folder 'Test'
+2. Go to the topdir:
+$ cd <topdir>
+
+3. Copy the SampleLib folder as new 'Test' folder
+$ cp -a SampleLib Test
+
+4. Copy libAliHLTSample.pkg to libAliHLTTest.pkg
+$ cp libAliHLTSample.pkg libAliHLTTest.pkg
+
+5. Change dir to the new folder
+$ cd Test
+
+6. Open 'Makefile.am' with an editor
+   This is the Makefile template for the autotools build system. In particular
+   one defines the library to be built to the lib_LTLIBRARIES variable. 
+   Furthermore, source and header files have to be specified, but in our case
+   this is done in the 'lib***.pkg file. By using such a file the library can
+   later easily be added to AliRoot.
+6.1. replace all strings 'AliHLTSample' with 'AliHLTTest'
+
+7. Now, you can think about implementing a new component. The packge contains
+   three example components:
+   - AliHLTDummyComponent: a real component which copies data from the input
+     to the output
+   - AliHLTSampleComponent1/2: two dummy components which just demonstrate 
+     how several components can be implemented in one library
+   Each of the components has a header file '<component>.h' and a source code
+   file '<component>.cxx'
+7.1 Take the DummyComponent, copy the two files (to your component name):
+$ cp AliHLTDummyComponent.h MyTestComponent.h
+$ cp AliHLTDummyComponent.cxx MyTestComponent.cxx
+7.2 Implement the required methods. A tutorial will be added to this package
+   soon. A comprehensive online tutorial is available at
+   http://www.kip.uni-heidelberg.de/wiki/HLT
+
+8. Once you are finnished with the first code development, you have to add
+   the new component files to the build system. Open 'libAliHLTTest.pkg' in
+   the package topdir
+8.1. Add all your source files to the SRCS variable, remove the files from
+     the libAliHLTSample
+8.2. Add all header files of classes which should be added to the ROOT
+     dictionary to the CLASS_HDRS variable, remove the files from the
+     libAliHLTSample
+8.3. All other header files must be added to the HDRS variable, including the
+     content of the CLASS_HEADERS
+
+9. Now we just have to add our new library to the build system. 
+9.1 Open Makefile.am in the topdir and add 'Test' to the list of SUBDIRS
+9.2 Open configure.ac in the topdir and add 'Test/Makefile' to the list of
+    files to be created: AC_CONFIG_FILES at the end of configure.ac
+
+10.Make sure that all files are saved. Now follow the instruction from the
+   README in the topdir. In principle its enough to go to your build directory
+   and simply type
+$ make
+$ make install
+
+
+
+===============================================================================
+=====                                                                     =====
+=====                Part B: Stand-alone package                          =====
+=====                                                                     =====
+===============================================================================
+
+TOC
+===
+1. Overview
+2. Requirements
+3. Setting up a version retrieved from CVS
+4. Modifying a distributed package
+5. Installation
+6. Code development
+7. Documentation
+8. Reporting bugs/Asking for support
+9. Committing to the AliRoot CVS
+
+1. Overview
+===========
+This package provides a compilation of shared libraries of the ALICE
+HLT project and is intended for stand-alone compilation, i.e. not as part 
+of the AliRoot compilation. 
+
+
+2. Requirements
+===============
+At this point you should have downloaded and unpacked a package with name
+alice-hlt-sample.tar.gz. If not, please download it from
+http://www.kip.uni-heidelberg.de/ti/HLT/software/download/alice-hlt-sample.tar.gz
+The following description refers to that package.
+
+The package needs both ROOT and AliRoot. Both must be set up in the
+usual way (ROOTSYS, ALICE_ROOT, library locations evtl. specified in
+LD_LIBRARY_PATH, ...). The package also needs the ALICE HLT component
+framework. This is part of AliRoot from version v4-05-Release on. You can
+also download the package from
+http://www.kip.uni-heidelberg.de/wiki/HLT
+
+To set up a version retrieved from CVS, autoconf 2.57, automake 1.6
+,and libtool 1.4 or higher versions are required. Thats the versions
+which come with the Scientific Linux CERN 3. The same applies if
+you want to change the Makefiles.
+
+If your GNU build tools are too old, ask the maintainers for a distributed
+package.  
+
+3. Setting up a version retrieved from CVS
+==========================================
+Skip this section if you have started from the tar ball.
+
+A version checked out from CVS requires a few steps to set up the Makefiles.
+Go to the directory and run
+autoreconf -i -f
+
+Then continue with the package configuration described in the 'Installation'
+section.
+
+4. Modifying a distributed package
+==================================
+If you are going the modify a distributed package you might need to re-make 
+the GNU build system by running
+ autoreconf -f -i
+
+Please notify the authors about bug fixes/corrections/extensions you made if
+you consider them worth to be merged into the project.
+
+Then continue with the package configuration described in the 'Installation'
+section.
+
+5. Installation
+===============
+Package build relies on the GNU triplet configure, make and make install.
+In order to keep the development directory clean, it is recommended to
+use a separate build directory. Please read the full section before you
+start. The build is in priciple done like
+
+  mkdir build
+  cd build
+  ../configure
+  make
+  make install
+
+You should redirect the output of the make into a file.
+The default install directory is set to the current directory ($PWD). To
+override the default directory use the option --prefix=<dir>. More information
+can be obtained from the configure script by running it with option --help.
+All binary libraries will be installed under <prefix>/lib. 
+If the directory is equal to $ALICE_ROOT, the libraries will be installed under 
+<prefix>/lib/tgt_<arch> as used for AliRoot. This is a custom extension in
+order to adapt to the specific AliRoot installation directories.
+
+You might need to specify the installation path of the ALICE HLT component
+framework during packge configuration. This can be done by the option
+--with-hltbase.
+Please follow correctly the installation procedure of the framework package.
+
+Note: You can have several build directories with different configure options,
+(e.g. AliRoot versions) but using the same source code. 
+
+If you need further information on the GNU build system, execute from the 
+top directory:
+./configure --help | less
+
+6. Code Development
+===================
+Once you are finnished with the build of the package, you can think about
+changing the code. The packge contains three example components:
+- AliHLTDummyComponent: a real component which copies data from the input
+  to the output
+- AliHLTSampleComponent1/2: two dummy components which just demonstrate 
+  how several components can be implemented in one library
+Each of the components has aheader file '<component>.h' and a source code
+file '<component>.cxx
+
+Leave your build directory and go back to the top directory where you can find 
+the source code as well as the Makefile template Makefile.am. 
+1. Choose a new name of your library (the tutorial uses AliHLTTest)
+
+2. Copy libAliHLTSample.pkg to libAliHLTTest.pkg
+> cp libAliHLTSample.pkg libAliHLTTest.pkg
+
+3. follow the instructions 6 to 8 of Part A (embedded case).
+
+When you are done with this, you can build the library by typing 'make' in your
+build directory, and install it by make install.
+
+7. Documentation
+================
+NOTE: DOXYGEN GENERATED DOCUMENTATION WILL BE ADDED SOON !!!
+Documentation is generated from the source code at compile time if 
+doxygen is installed on the machine. From the build directory, open
+doc/html/index.html with a web browser.
+
+A wiki with detailed information is set up at
+http://www.kip.uni-heidelberg.de/wiki/HLT
+
+8. Reporting bugs/Asking for support
+====================================
+Please include the following information into your request:
+- config.log from your build directory
+- output of the make process. Note: Redirect BOTH the stdout and stderr
+  channel to a log file. Redirection depends on the shell you are using:
+    bash: make 2>&1 | tee make.log 
+    csh: make |& tee make.log
+  The 'tee' command just duplicates the output.
+- history of the commands you are using for compilation
+  history > history.log
+
+9. Committing to the AliRoot CVS
+================================
+At some point you might want to add the library to the AliRoot HLT module.
+Please contact Matthias.Richter@ift.uib.no and send a stable version as a
+tar archive.
diff --git a/HLT/EVE/configure.ac b/HLT/EVE/configure.ac
new file mode 100644 (file)
index 0000000..4f9d4fe
--- /dev/null
@@ -0,0 +1,256 @@
+dnl -*- mode: autoconf -*- 
+dnl
+dnl $Id$
+dnl template for the configuration script for the Alice HLT 
+dnl analysis tutorial and example library
+dnl 
+dnl ------------------------------------------------------------------
+AC_INIT([Alice High Level Trigger EVE library] , [0.1], [slindal@fys.uio.no], alice-hlt-eve)
+
+dnl ------------------------------------------------------------------
+AC_CANONICAL_SYSTEM
+AC_PREFIX_DEFAULT(${PWD})
+AC_CONFIG_SRCDIR(AliHLTDummyComponent.cxx)
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+
+AC_DEBUG
+AC_OPTIMIZATION
+AM_CONDITIONAL(STANDALONE_SAMPLELIB, test 1)
+
+dnl ------------------------------------------------------------------
+dnl
+dnl Check for ROOT
+dnl
+ROOT_PATH(, [have_root=1], [AC_ERROR([Stop! The HLT package needs ROOT.])])
+AM_CONDITIONAL(HAVE_ROOT, test "x$have_root" = "x1" )
+AC_SUBST([ROOTSYS])
+
+dnl test for additional required root libraries
+  # we check for the libSTEER library which is linked to
+  # - the ROOT libs libGeom libMinuit libVMC libEG
+  # - the AliRoot libESD libRAWData (libRAWDatarec from v4-04-Rev-07)
+  # - ROOT libCint needs also libdl
+  # - from Nov 1 2006 TTreeFormula is needed by AliTagAnalysis and requires
+  #   libTreePlayer.so
+  # - from Jan 07 libESD also depends on libXMLIO
+LIBS='-ldl'
+if test "x$have_root" = "x1"; then
+  save_CPPFLAGS=$CPPFLAGS
+  save_LDFLAGS=$LDFLAGS
+  save_LIBS=$LIBS
+  
+  ROOT_CHECKLIBS='Geom Minuit EG VMC TreePlayer XMLIO'
+  for CHECKLIB in $ROOT_CHECKLIBS ; do
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR}"
+    LIBS="$save_LIBS $ROOTLIBS $ADD_ROOTLIBS"
+    AC_CHECK_LIB([$CHECKLIB],[_init], [ADD_ROOTLIBS="$ADD_ROOTLIBS -l$CHECKLIB"])
+  done
+  
+  CPPFLAGS=$save_CPPFLAGS
+  LDFLAGS=$save_LDFLAGS
+  LIBS=$save_LIBS
+fi
+
+CPPFLAGS="$CPPFLAGS ${ROOTCFLAGS}"
+
+dnl ------------------------------------------------------------------
+dnl check for AliRoot features
+AC_LANG_PUSH(C++)
+have_aliroot=no
+AC_ARG_WITH(aliroot,[  --with-aliroot    top of the AliRoot installation],
+                   [test -d $with_aliroot && ALICE_ROOT=$with_aliroot],
+                   [])
+
+if test "x$ALICE_ROOT" != "x" && test -d $ALICE_ROOT ; then
+  dnl ------------------------------------------------------------------
+  dnl Try to estimate the system architecture
+  case $host_os:$host_cpu in
+  linux*:x86_64*)      alice_target='linuxx8664gcc'            ;;
+  linux*)              alice_target='linux'                    ;;
+  *)                   alice_target='unknown'                  ;;
+  esac
+  if test "x$alice_target" = "xunknown" ; then
+    if test -z $ALICE_TARGET ; then
+    AC_MSG_ERROR([Can not estimate system architecture.
+    To avoid the problem, set the ALICE_TARGET variable appropriately.
+    Please send the following information to Matthias.Richter@ift.uib.no:
+       ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])
+    else
+    AC_MSG_NOTICE([Unknown system architecture.
+    Please send the following information to Matthias.Richter@ift.uib.no:
+       ${PACKAGE}: no AliRoot target definition for os=$host_os and cpu=$host_cpu ])  
+    fi
+  else
+    if test "x$ALICE_TARGET" != "x" && test "x$ALICE_TARGET" != "x$alice_target" ; then
+    AC_MSG_WARN([The ALICE_TARGET variable does not match your current system
+    overriding $ALICE_TARGET by $alice_target])
+    fi
+    ALICE_TARGET=$alice_target
+  fi
+  ALIROOTLIBDIR=${ALICE_ROOT}/lib/tgt_${ALICE_TARGET}
+  ALIROOTINCDIR=${ALICE_ROOT}/include
+  test -d ${ALIROOTLIBDIR} || AC_MSG_WARN([can not find AliRoot library directory $ALIROOTLIBDIR])
+  test -d ${ALIROOTINCDIR} || AC_MSG_WARN([can not find AliRoot include directory $ALIROOTINCDIR])
+fi
+
+AC_MSG_CHECKING([for AliRoot])
+if test "x$ALICE_ROOT" != "x" \
+   && test -d ${ALIROOTLIBDIR} \
+   && test -d ${ALIROOTINCDIR}; then
+  have_aliroot=$ALICE_ROOT
+else
+  ALIROOTLIBDIR=
+  ALIROOTINCDIR=
+fi
+AC_MSG_RESULT([$have_aliroot])
+
+if test ! "x$have_aliroot" = "xno" ; then
+  ALIROOT_CPPFLAGS="-I${ALIROOTINCDIR} -I${ALICE_ROOT}/RAW"
+  ALIROOT_LDFLAGS="-L${ALIROOTLIBDIR}"
+  ALIROOT_LIBS="-lESD $ADD_ROOTLIBS"
+  save_CPPFLAGS=$CPPFLAGS
+  save_LDFLAGS=$LDFLAGS
+  save_LIBS=$LIBS
+  CPPFLAGS="$save_CPPFLAGS $ALIROOT_CPPFLAGS"
+  LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS"
+  
+  # check for certain AliRoot libraries/files/features
+  # CBD library is present since AliRoot version v4-05-00 (02.06.2006)
+  LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
+  CHECKLIB=CDB
+  AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
+
+  # splitted RAW libraries since AliRoot version v4-04-Rev-07 (09.08.2006)
+  have_alirawdata=no
+  LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
+  CHECKLIB=RAWDatabase
+  AC_CHECK_LIB([$CHECKLIB],[_init],
+       [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
+        LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
+        CHECKLIB=RAWDatarec
+        AC_CHECK_LIB([$CHECKLIB],[_init],
+               [ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"
+               AC_DEFINE(HAVE_ALIRAWDATA)
+               have_alirawdata=$CHECKLIB])],
+       [# second pass with -RAWData
+        CHECKLIB="-lRAWData"
+        LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS $CHECKLIB -lSTEER"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <AliRawReaderMemory.h>
+                                      #include <AliRawReaderFile.h>
+                                      #include <AliRawReaderDate.h>
+                                      #include <AliRawReaderRoot.h>], 
+                                     [AliRawReaderMemory mreader;
+                                      AliRawReaderFile freader;
+                                      AliRawReaderDate dreader(NULL,0);
+                                      AliRawReaderRoot rreader(NULL,0);])],
+                                     [AC_DEFINE(HAVE_ALIRAWDATA)
+                                      ALIROOT_LIBS="$ALIROOT_LIBS $CHECKLIB"
+                                      have_alirawdata=$CHECKLIB], 
+                                     [have_alirawdata=no])
+       ]) dnl AC_CHECK_LIB RAWDatabase
+  AC_MSG_CHECKING(for AliRawReader classes in RAWData libraries)
+  AC_MSG_RESULT($have_alirawdata)
+
+  LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
+  CHECKLIB=STEER
+  AC_CHECK_LIB([$CHECKLIB],[_init],[ALIROOT_LIBS="$ALIROOT_LIBS -l$CHECKLIB"])
+
+  if test "x$have_aliroot" = "xno" ; then
+    ALIROOT_CPPFLAGS=
+    ALIROOT_LDFLAGS=
+    ALIROOT_LIBS=
+  fi
+  CPPFLAGS=$save_CPPFLAGS
+  LDFLAGS=$save_LDFLAGS
+  LIBS=$save_LIBS
+fi
+
+dnl ------------------------------------------------------------------
+dnl check for the HLT component framework
+AC_MSG_CHECKING([for HLT component framework in ])
+AC_ARG_WITH(hltbase, [  --with-hltbase   installation path of the HLT component framework],
+                    [],
+                    [test -n $have_aliroot && with_hltbase=$have_aliroot ])
+if test -z $with_hltbase || ! test -d $with_hltbase ; then
+  with_hltbase=no
+fi
+AC_MSG_RESULT([$with_hltbase])
+if test "x$with_hltbase" = "xno" || test "x$with_hltbase" = "x$ALICE_ROOT" ; then
+  HLTBASE_CPPFLAGS=-I${ALICE_ROOT}/HLT/BASE
+  HLTBASE_LDFLAGS=
+else
+  HLTBASE_CPPFLAGS=-I${with_hltbase}/include/alice-hlt
+  HLTBASE_LDFLAGS=-L${with_hltbase}/lib
+fi
+
+  save_CPPFLAGS=$CPPFLAGS
+  save_LDFLAGS=$LDFLAGS
+  save_LIBS=$LIBS
+  CPPFLAGS="$save_CPPFLAGS $HLTBASE_CPPFLAGS -L${ALIROOTLIBDIR}"
+  LDFLAGS="$save_LDFLAGS -L${ROOTLIBDIR} $ALIROOT_LDFLAGS $HLTBASE_LDFLAGS"
+  LIBS="$save_LIBS $ROOTLIBS $ALIROOT_LIBS"
+  AC_CHECK_HEADER([AliHLTComponent.h])
+  AC_CHECK_HEADER([AliHLTLogging.h])
+  CHECKLIB=HLTbase
+  AC_CHECK_LIB([$CHECKLIB],[_init],
+              [have_hltbase=yes
+               HLTBASE_LDFLAGS="$HLTBASE_LDFLAGS -l$CHECKLIB"])
+
+  test "x$have_hltbase" = "xyes" || \
+     AC_ERROR([Stop! The package needs the HLT component framework.
+      Use  --with-hltbase option to point to the HLT component framework
+      installation])
+
+  CPPFLAGS=$save_CPPFLAGS
+  LDFLAGS=$save_LDFLAGS
+  LIBS=$save_LIBS
+
+AC_LANG_POP(C++)
+AC_SUBST([ALIROOT_CPPFLAGS])
+AC_SUBST([ALIROOT_LDFLAGS])
+AC_SUBST([ALIROOTLIBDIR])
+AC_SUBST([ALIROOT_LIBS])
+AC_SUBST([HLTBASE_CPPFLAGS])
+AC_SUBST([HLTBASE_LDFLAGS])
+
+dnl ------------------------------------------------------------------
+dnl
+dnl Documentation
+dnl
+AC_ARG_VAR(DOXYGEN, The Documentation Generator)
+AC_PATH_PROG(PERL, perl)
+AC_PATH_PROG(DOXYGEN, doxygen)
+AM_CONDITIONAL(HAVE_DOXYGEN, test ! "x$DOXYGEN" = "x")
+HAVE_DOT=NO
+DOT_PATH=
+AC_PATH_PROG(DOT, dot)
+if ! test "x$DOT" = "x" ; then
+   HAVE_DOT=YES
+   DOT_PATH=`dirname $DOT`
+fi
+AC_SUBST([HAVE_DOT])
+AC_SUBST([DOT_PATH])
+
+dnl ------------------------------------------------------------------
+dnl inatallation directory for libraries
+dnl 
+if test "x$prefix" != "xNONE" && test $ALICE_ROOT = $prefix ; then
+libdir=\${exec_prefix}/lib/tgt_$ALICE_TARGET
+AC_MSG_NOTICE([libdir set to $libdir])
+fi
+dnl ------------------------------------------------------------------
+AC_CONFIG_FILES([Makefile])
+
+
+AC_OUTPUT
+dnl
+dnl EOF
+dnl
+
+dnl AC_CONFIG_FILES([Makefile 
+dnl             doc/Makefile
+dnl             doc/doxygen.conf])
diff --git a/HLT/EVE/tutorial.c b/HLT/EVE/tutorial.c
new file mode 100644 (file)
index 0000000..10a11aa
--- /dev/null
@@ -0,0 +1,416 @@
+/************************************************************************
+**
+** ALICE HLT project
+** Copyright (c) 2005
+**
+** This file is property of and copyright by the Experimental Nuclear 
+** Physics Group, Dep. of Physics and Technology
+** University of Bergen, Norway, 2004
+** This file has been written by Matthias Richter,
+** Matthias.Richter@ift.uib.no
+**
+** Permission to use, copy, modify and distribute this software and its  
+** documentation strictly for non-commercial purposes is hereby granted  
+** without fee, provided that the above copyright notice appears in all  
+** copies and that both the copyright notice and this permission notice  
+** appear in the supporting documentation. The authors make no claims    
+** about the suitability of this software for any purpose. It is         
+** provided "as is" without express or implied warranty.                 
+**
+*************************************************************************/
+
+/** @file   tutorial.c
+    @author Matthias Richter
+    @date   
+    @brief  HLT examples and tutorial. */
+
+/** 
+@defgroup alihlt_tutorial HLT examples and tutorial
+
+The HLT analysis components can be run either in the AliRoot
+framework (simulation and/or reconstruction) or the HLT online
+framework.
+
+We think of the HLT as a 'black box' with data input and output. In
+addition there is access to calibration data from OCDB (or the local
+HLT copy HCDB). All components can only work on the data they get as
+input. As the different detector algorithms/components will run in 
+separate processes and even on different machines, no data exchange
+is possible via global data structures and variables.
+
+HLT chains in the AliRoot framework are described by means of
+AliHLTConfiguration.
+
+-# @ref tut_hltsystem
+   -# @ref tut_load_libraries
+   -# @ref tut_dummy_chain
+   -# @ref tut_tpc_sector
+-# @ref tut_simulation
+-# @ref tut_reconstruction
+   -# @ref tut_module_agent
+   -# @ref tut_reconstruction_sample
+   -# @ref tut_reconstruction_custom
+-# @ref tut_alirawreaderhlt
+-# @ref tut_macros 
+
+<br>
+<hr width="75%">
+<br>
+@section tut_hltsystem Running Components in the HLT System
+
+@subsection tut_load_libraries Library setup
+Component libraries must be loader via the AliHLTComponentHandler
+or AliHLTSystem::LoadComponentLibraries. You can run the following
+macro from the AliRoot promt.
+<pre>
+{
+  AliHLTSystem gHLT;
+  gHLT.LoadComponentLibraries("libAliHLTUtil.so");
+}
+</pre>
+
+<br>
+@subsection tut_dummy_chain Example: Running a dummy chain
+The simplest chain consists of a publisher component, a processor
+and a data sink. The AliHLTDummyComponent is a sample component
+which just copies a fraction of the input data to the output.
+You can run the following macro from the AliRoot promt.
+<pre>
+{
+  AliHLTSystem gHLT;
+  gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTSample.so");
+  // The AliHLTFilePublisher (component Id \em 'FilePublisher' provides
+  // the given file (see AliHLTFilePublisher for more options) to the
+  // subsequent components in the chain.
+  AliHLTConfiguration publisher("fp1", "FilePublisher", NULL, "-datatype 'DUMMYDAT' 'SMPL' -datafile some-data.dat");
+
+  // The AliHLTDummyComponent (Id \em 'Dummy') just forwards a certain
+  // fraction of the input to the output or just repeats the input data
+  // if percentage > 100
+  AliHLTConfiguration copy("cp", "Dummy", "fp1", "output_percentage 80");
+
+  // The AliHLTFileWriter (Id 'FileWriter') is a data sink. It writes
+  // all incoming data blocks to files. Several options available.
+  AliHLTConfiguration sink1("sink1", "FileWriter", "cp", NULL);
+
+  // here you specify the top most configuration of the chain. The
+  // configuration depends on all the parents. The task lisy is build
+  // according to that.
+  gHLT.BuildTaskList("sink1");
+  gHLT.Run();
+}
+</pre>
+@note You have to specify a real file name instead of \em some-data.dat
+
+<br>
+@subsection tut_tpc_sector Example: One sector of the TPC
+This example builds an analysis chain for TPC sector 0. It works on 
+simulated data and assumes the ddl files to be present in the current
+directory.
+<pre>
+{
+  AliHLTSystem gHLT;
+  // load the component library
+  gHLT.LoadComponentLibraries("libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so");
+
+  // data source components
+  AliHLTConfiguration fp0("fp0", "FilePublisher", NULL, "-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x00000000 "
+                                                        "-datafile TPC_768.ddl");
+  AliHLTConfiguration fp1("fp1", "FilePublisher", NULL, "-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x00000101 "
+                                                        "-datafile TPC_769.ddl");
+  AliHLTConfiguration fp2("fp2", "FilePublisher", NULL, "-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x00000202 "
+                                                        "-datafile TPC_840.ddl");
+  AliHLTConfiguration fp3("fp3", "FilePublisher", NULL, "-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x00000303 "
+                                                        "-datafile TPC_841.ddl");
+  AliHLTConfiguration fp4("fp4", "FilePublisher", NULL, "-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x00000404 "
+                                                        "-datafile TPC_842.ddl");
+  AliHLTConfiguration fp5("fp5", "FilePublisher", NULL, "-datatype 'DDL_RAW ' 'TPC ' -dataspec 0x00000505 "
+                                                        "-datafile TPC_843.ddl");
+
+  // cluster finders
+  AliHLTConfiguration cf0("cf0", "TPCClusterFinderPacked", "fp0", "pp-run rawreadermode 4 timebins 446");
+  AliHLTConfiguration cf1("cf1", "TPCClusterFinderPacked", "fp1", "pp-run rawreadermode 4 timebins 446");
+  AliHLTConfiguration cf2("cf2", "TPCClusterFinderPacked", "fp2", "pp-run rawreadermode 4 timebins 446");
+  AliHLTConfiguration cf3("cf3", "TPCClusterFinderPacked", "fp3", "pp-run rawreadermode 4 timebins 446");
+  AliHLTConfiguration cf4("cf4", "TPCClusterFinderPacked", "fp4", "pp-run rawreadermode 4 timebins 446");
+  AliHLTConfiguration cf5("cf5", "TPCClusterFinderPacked", "fp5", "pp-run rawreadermode 4 timebins 446");
+
+  // tracker
+  AliHLTConfiguration tracker("tracker", "TPCSliceTracker", "cf0 cf1 cf2 cf3 cf4 cf5", "-pp-run -bfield 0.5");
+
+  // the data sink component
+  AliHLTConfiguration writer("writer", "TPCEsdWriter", "tracker", "-datafile AliHLTTPCESDs.root");
+
+  gHLT.BuildTaskList("writer");
+  gHLT.Run();
+}
+</pre>
+
+<br>
+<hr width="75%">
+<br>
+
+@section tut_reconstruction AliRoot reconstruction
+The integration into the AliRoot reconstruction works via the
+@ref AliHLTReconstructor plugin. The intention is to run HLT analysis
+chains in AliRoot in the same way as in the online framework, i.e.
+the full components are run also from the offline framework rather
+than just the algorithm hooked on by a special interface class.
+By this one achieves the highest possible compatibility.
+
+Regarding HLT, all analysis is supposed to run on-line on the HLT farm.
+Thus, only the processing of the HLTOUT data is necessary during the
+default reconstruction. However, it is possible to run HLT chains embedded
+into AliReconstruction mainly for the purpose of debugging and the
+development cycle.
+
+The AliRoot reconstruction consists mainly of three steps which
+are executed on an event by event basis:
+-# event reconstruction: this is usually the place for digit/raw
+data conversion to clusters/space points. HLT chains can be executed
+in the event reconstruction for raw data. HLT Reconstruction from
+digit data is not supported.
+-# tracking: the complete reconstruction on an event by event
+basis.
+-# ESD filling: the reconstructed event is written to the ESD. The
+HLTOUT is processed in this step. All output data blocks produced by
+during the HLT reconstruction are added to the HLTOUT collection
+and are treated as they would have come from the detector.
+
+Note: The AliRoot reconstruction scheme has been changed in Sep 2007
+(revision 20822). Formerly, a stage "LocalEventReconstruction" of
+AliReconstruction was looping over all events and running the event
+reconstruction in one go.
+
+The actual HLT chains to be run and the HLTOUT handlers to be applied depend
+on the HLT library modules which are loaded to the system. There is a
+default collection of libraries defined in AliHLTSystem::fgkHLTDefaultLibs.
+The default libraries are loaded if nothing else is specified. The libraries
+implement \em agents (AliHLTModuleAgent childs) describing the properties
+of a module.
+
+A specific library can be chosen like (provided you have a simulated
+event in the current directory):
+<pre>
+{
+  AliReconstruction rec;                 // the reconstruction instance
+  rec.SetInput("raw.root");              // choose some raw data
+  rec.SetRunLocalReconstruction("HLT");  // run local rec only for HLT 
+  rec.SetRunTracking("");                // switch off tracking
+  rec.SetFillESD("HLT");                 // 
+  rec.SetOption("HLT", "libAliHLTSample.so loglevel=0x7c");
+  rec.Run();
+}
+</pre>
+Please note the specification of raw data input. HLT reconstruction can
+only run on raw data, either real or simulated.
+
+HLT reconstruction on simulated digit data must be run embedded into
+@ref tut_simulation.
+
+@subsection tut_module_agent The Module Agent
+Each component library has to implement a module agent in order to be
+hooked up to the AliRoot reconstruction or simulation. The agent defines
+the features of the libraries and the configurations to be run during the
+different steps of the reconstruction. The agent 
+- can register all components of the library. This is an 
+  alternative to the component registration via global objects (see 
+  @ref alihltcomponent-handling).
+- registers HLT configurations (see @ref AliHLTConfiguration)
+- specifies the configurations to be run
+- specifies additional component libraries required to run the
+  configurations.
+- provides a preprocessor (see AliHLTModulePreprocessor /
+                          AliHLTPreprocessor)
+- provides handlers and handler descriptions for HLTOUT data blocks.
+
+Finally, one global object of the module agent has to be specified in
+the source code. All registration and integration into the HLT system
+is carried out automatically.
+
+@see 
+    @ref AliHLTModuleAgent for the interface description <br>
+    @ref AliHLTAgentSample for a sample implementation
+
+@subsection tut_reconstruction_sample The sample library
+The libAliHLTSample library provides examples how to implement the
+library agent (@ref AliHLTAgentSample), how to add configurations and
+define HLT chains for reconstruction. 
+
+The sample library is not part of the default libraries loaded by the
+HLT steering during reconstruction. The example can be run by the
+following macro macro above.
+
+The agent defines the following chains:
+-# a simple data copying consisting of a
+   - @ref AliHLTFilePublisher  publishes some data generated before in /tmp
+   - @ref AliHLTDummyComponent copies a fraction of the incoming data
+   - @ref AliHLTFileWriter     writes the data input to a file
+-# digit publishing from the TPCloader <br>
+   This chain illustrates how data can be published from the AliRunLoader
+   in order to be processed by another component (not in the sample chain).
+   Finally, the @ref AliHLTSampleOfflineSinkComponent is component which is
+   the backend and has again the AliRoot structures.
+   - @ref AliHLTLoaderPublisherComponent
+   - @ref AliHLTSampleOfflineSinkComponent
+
+In the same way any other component library can be integrated into the
+AliRoot reconstruction.
+
+@subsection tut_reconstruction_custom Running a custom HLT chain
+The default configurations from the library modules can be overridden by
+custom configurations by means of options specified to AliReconstruction.
+- <tt>config=\em macro</tt><br> a configuration macro. The macro is a normal
+  ROOT macro defining HLT component configurations by means of
+  AliHLTConfiguration
+- <tt>chains=\em chains</tt><br> a comma separated list of chains to be run.
+  A chain is defined by the topmost configuration.
+
+\b Note: The file publisher needs a file to read, either you replace
+\em some-data.dat with the path of an existing file or just create a
+dummy file in the current working directory. Futhermore, there has to be at
+least one simulated event since AliReconstruction relies on a couple of files
+in the folder.
+<pre>
+{
+  AliReconstruction rec;                 // the reconstruction instance
+  rec.SetInput("./");                    // to be independent of galice.root
+  rec.SetLoadAlignFromCDB(kFALSE);
+  rec.SetFillTriggerESD(kFALSE);
+  rec.SetRunQA(kFALSE);
+  rec.SetRunVertexFinder(kFALSE);
+  rec.SetRunLocalReconstruction("HLT");  // run local rec only for HLT 
+  rec.SetRunTracking("");                // switch off tracking
+  rec.SetFillESD("HLT");                 // 
+  rec.SetOption("HLT", "libAliHLTSample.so libAliHLTUtil.so "
+                       "config=$ALICE_ROOT/HLT/exa/conf-sample.C "
+                       "chains=sink");
+  //rec.SetEventRange(0,0);
+  rec.Run();
+}
+</pre>
+
+@see
+- conf-sample.C
+
+<br>
+<hr width="75%">
+<br>
+
+@section tut_simulation AliRoot simulation
+In order to simulate the behavior of HLT analysis chains and to
+include this functionality, HLT reconstruction can be embedded
+into AliRoot simulation. As a matter of fact, HLT always reconstructs
+data, <em><b>HLT simulation</b></em> means <em><b>HLT reconstruction
+embedded into AliRoot</b></em>.
+
+The HLT simulation is run at the last step of the AliSimulation, the
+setup to be run depends on the available plugins as described in section
+@ref tut_reconstruction. The options for the HLT simulation can be set
+with the <tt>AliSimulation::SetRunHLT</tt> function.
+<pre>
+  AliSimulation sim;
+  ...
+  sim.SetRunHLT("libAliHLTSample.so loglevel=0x7c");
+</pre>
+
+Options:
+- <tt>config=\em macro</tt><br> a configuration macro. The macro is a normal
+  ROOT macro defining HLT component configurations by means of
+  AliHLTConfiguration
+- <tt>chains=\em chains</tt><br> a comma separated list of chains to be run.
+  A chain is defined by the topmost configuration.
+- <tt>rawfile=\em chains</tt><br> provide a raw reader to the HLT simulation.
+  Some chains work solely on raw data. The data needs to be simulated before
+  and a RawReader is created internally to provide the data to the source
+  components.
+- <tt>loglevel=\em 0x7c</tt><br> default loglevel is 0x79, only Warnings and
+  higher are printed. 0x7c also makes the Info messages visible.
+
+@see
+  - sim-hlt-rawddl.C for example
+
+
+<br>
+<hr width="75%">
+<br>
+
+@section tut_alirawreaderhlt Replacing reconstruction input by data from the HLT
+The HLTOUT data can contain data blocks which obey exactly the raw DDL 
+format of a detector. E.g. selective readout components or loss-less
+compression algorithms allow to provide a sub sample of the original data.
+All data from the HLT is transferred via the 10 HLT DDL links, a redirection
+mechanism is necessary to replace the original detector input by the data
+from HLTOUT. The replacements works by means of the AliRawReaderHLT and
+needs the following modules:
+-# Implementation of an AliHLTOUTHandlerEquId child class<br>
+   A handler of this type is necessary to determine the equipment Id of a
+   data block from the data type and specification.
+<pre>
+  class AliHLTSampleRawDataHandler : public AliHLTOUTHandlerEquId {
+  public:
+    // ... constructors and destructor
+    &nbsp;
+    // overloaded AliHLTOUTHandlerEquId::ProcessData(AliHLTOUT*)
+    int ProcessData(AliHLTOUT* pData);
+  };
+</pre>
+  Alternatively the AliHLTOUTHandlerEquId can be used directly. It implements
+  a default processing.
+-# Adjust module agent
+   The module agent needs to provide the handler and the description of the
+   handler and has to implement the following functions: 
+<pre>
+   // see AliHLTAgentSample::GetHandlerDescription()
+   int GetHandlerDescription(AliHLTComponentDataType,
+                             AliHLTUInt32_t,
+                             AliHLTOUTHandlerDesc&) const;
+&nbsp;   
+   // see AliHLTAgentSample::GetOutputHandler()
+   AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType,
+                                      AliHLTUInt32_t);
+   &nbsp;   
+   // see AliHLTAgentSample::DeleteOutputHandler()
+   int DeleteOutputHandler(AliHLTOUTHandler*);
+</pre>
+-# Set the HLT input
+   The AliReconstruction class handles the redirection transparently by
+   use of the AliRawReaderHLT.
+<pre>
+   AliReconstruction rec;
+   // ....
+   rec.SetUseHLTData("ITSSDD");
+</pre>
+-# Run
+   Run the reconstruction as normal
+
+@see
+   - AliHLTReconstructor
+   - AliRawReaderHLT
+   - rec-from-hltout.C
+
+<br>
+<hr width="75%">
+<br>
+
+@section tut_macros Example macros
+ */
+
+
+/* note pad
+
+Making a new module/library
+
+Automatic ROOT dictionary generation:
+The automatic ROOT dictionary generation relies on the rule, that the main class
+of a header file has the same name as the file (except the prefix).
+
+Troubleshooting:
+Error: link requested for unknown class <class name> <library>-LinkDef.h:<line no>
+most likely there is no class <class name> defined in the header file <class name>.h*
+
+ */
+#error Not for compilation
+//
+// EOF
+//
index a47bc25d41931440bd3265d32982d9a1400a0d50..d4b605bf3e12e5bd4bfba9e329a2a284141313f5 100644 (file)
@@ -1,5 +1,5 @@
 //-*- Mode: C++ -*-
-// $Id: AliHLTPHOSConstant.h -1   $
+// $Id$
 
 /**************************************************************************
  * This file is property of and copyright by the Experimental Nuclear     *
index f8ea04035bcb7f762af63de288860d6720025f09..65506c302bb899857aaf1823aa4ba1273b2e96bf 100644 (file)
@@ -1,5 +1,5 @@
 //-*- Mode: C++ -*-
-// $Id: AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h 31490 2009-03-15 16:27:11Z odjuvsla $
+// $Id$
 
 #ifndef ALIHLTPHOSRCUCELLACCUMULATEDENERGYDATASTRUCT_H
 #define ALIHLTPHOSRCUCELLACCUMULATEDENERGYDATASTRUCT_H
diff --git a/HLT/libAliHLTEve.pkg b/HLT/libAliHLTEve.pkg
new file mode 100644 (file)
index 0000000..e9bd849
--- /dev/null
@@ -0,0 +1,71 @@
+#-*- Mode: Makefile -*-
+# $Id$
+
+# This files defines the source and header files for the
+# libAliHLTEve library and additional flags for the compilation
+# and linking process. For further information refer to the 
+# README.
+
+# class header files, the link definition for the root dictionary
+# will be created from the names of the header files
+CLASS_HDRS:=   AliHLTEveBase.h \
+               AliHLTEveCalo.h \
+               AliHLTEvePhos.h \
+               AliHLTEveEmcal.h \
+               AliHLTEveTPC.h \
+               AliHLTEveHLT.h \
+               AliHLTEveITS.h \
+               AliHLTEveISSD.h \
+               AliHLTEveISPD.h \
+               AliHLTEveISDD.h \
+               AliHLTEveTRD.h \
+               AliHLTEveMuon.h \
+               AliHLTEveAny.h
+
+
+# library sources, generated from the class headers
+MODULE_SRCS=   $(CLASS_HDRS:.h=.cxx)
+
+# library headers
+# in most cases you might have already added all the header files to
+# the CLASS_HDRS variable. So we just use the content of this. You
+# can simply add more header files which don't contain classes with
+# ROOT dictionary support
+MODULE_HDRS:=  $(CLASS_HDRS)
+
+# The LinkDef file required by the ROOT dictionary generation can be
+# generated automatically. For the all header files specified in
+# CLASS_HDRS an entry will be generated
+# pragma link C++ class <class-name>+;
+#
+# If the default behavior is not enough, you can provide a custom
+# *LinkDef.h to the MODULE_DHDR variable. Leave MODULE_DHDR empty to
+# enable automatic generation. 
+MODULE_DHDR:=
+
+EINCLUDE := HLT/BASE HLT/shuttle HLT/EVE EVE/EveHLT EVE/EveBase \
+           HLT/BASE/util HLT/BASE/HOMER  HLT/TPCLib \
+           ITS PHOS TRIGGER VZERO EMCAL \
+           STEER TRD HLT/TRD  \
+           HLT/MUON MUON 
+
+
+LIBRARY_DEP := -lHLTbase -lCDB -lSTEERBase -AliHLTTPC -lMUONbase -lAliHLTMUON
+
+###############################################################################
+#
+# do not change anything below this line
+#
+include $(MODDIR)/hlt.conf
+
+SRCS:=$(patsubst %,EVE/%,$(MODULE_SRCS))
+CINTHDRS:=$(patsubst %,EVE/%,$(CLASS_HDRS))
+HDRS:=$(patsubst %,EVE/%,$(MODULE_HDRS))
+DHDR:=$(patsubst %,EVE/%,$(MODULE_DHDR))
+CINTAUTOLINK:= $(shell test "x$(MODULE_DHDR)" = "x" && echo 1)
+
+EDEFINE      := ${HLTDEFS}
+PACKCXXFLAGS := $(filter-out -ansi,$(filter-out -pedantic-errors, $(CXXFLAGS)))
+PACKCFLAGS   := $(filter-out -ansi, $(filter-out -pedantic-errors, $(CFLAGS)))
+PACKDCXXFLAGS:= $(filter-out -pedantic-errors, $(CXXFLAGS))
+PACKSOFLAGS  := $(HLTSOFLAGS)