Merge branch 'multipleThreads'
[u/mrichter/AliRoot.git] / EVE / hlt-macros / od.C
index 138c214fcae48f118eb23ea47e4450805fe7ceb8..a5d0639568be48989ddee45163bc1bda0b6e4bac 100644 (file)
@@ -29,7 +29,7 @@
 #include "TEveManager.h"\r
 \r
 #include "AliEveHOMERManager.h"\r
-\r
+#include "AliEveHLTEventManager.h"\r
 #include "geom_gentle_hlt.C"\r
 \r
 //***************************************************************\r
@@ -74,89 +74,12 @@ Bool_t gShowMUONRhoZ = kTRUE;
 Bool_t gShowTRD      = kFALSE;\r
 \r
 \r
-// -----------------------------------------------------------------\r
-// --                         Members                            --\r
-// -----------------------------------------------------------------\r
-\r
-// -- Timer for automatic event loop\r
-TTimer                                    eventTimer;\r
-TTimer                                    eventTimerFast;\r
-\r
 // -- HOMERManager\r
 AliEveHOMERManager*                       gHomerManager      = 0;\r
+AliEveHLTEventManager*                       geventManager      = 0;\r
 \r
 // -- Geometry Manager \r
 TGeoManager*                              gGeoManager        = 0;\r
-AliPHOSGeometry*                          gPHOSGeom          = 0;\r
-\r
-// -- Cluster members\r
-TEvePointSet*                             gSPDClusters       = 0;\r
-TEvePointSet*                             gSSDClusters       = 0;\r
-TEvePointSet*                             gSDDClusters       = 0;\r
-TEvePointSet*                             gTRDClusters       = 0;\r
-TEvePointSetArray*                        gTRDColClusters    = 0;\r
-TEvePointSet*                             gTPCClusters       = 0;\r
-TEvePointSet*                             gTPCTestClusters       = 0;\r
-TEvePointSetArray*                        gTPCColClusters    = 0;\r
-TEveBoxSet*                               gPHOSBoxSet[5]     = {0, 0, 0, 0, 0}; \r
-TEveBoxSet*                               gEMCALBoxSet[13]   = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\r
-TEvePointSet*                             gMUONClusters      = 0;\r
-TEveStraightLineSet*                      gMUONTracks        = 0;\r
-\r
-// -- Text output members\r
-TEveText*                                 gHLTText           = 0;\r
-\r
-// -- Tracks members\r
-TEveTrackList*                            gTPCTrack          = 0;\r
-\r
-// -- Canvas for histograms\r
-TCanvas*                                  gTRDCanvas         = 0;\r
-TCanvas*                                  gTPCCanvas         = 0;\r
-TCanvas*                                  gTPCClustCanvas          = 0;\r
-TCanvas*                                  gTRDCalibCanvas    = 0;\r
-TCanvas*                                  gTRDEORCanvas      = 0;\r
-TCanvas*                                  gPrimVertexCanvas  = 0;\r
-TCanvas*                                  gSPDVertexCanvas   = 0;\r
-TCanvas*                                  gITSCanvas         = 0;\r
-TCanvas*                                  gSSDCanvas0        = 0;\r
-TCanvas*                                  gSSDCanvas1        = 0;\r
-TCanvas*                                  gV0Canvas          = 0;\r
-TCanvas*                                  gPHOSCanvas          = NULL;\r
-TCanvas*                                  gEMCALCanvas          = 0;\r
-\r
-// -- vertex --\r
-Int_t                                     gSPDVertexHistoCount  = 0;\r
-\r
-\r
-\r
-// -- TRD --\r
-Int_t                                     gTRDHistoCount     = 0;\r
-Int_t                                     gTRDEvents         = 0;\r
-Int_t                                     gTRDBins           = 12;\r
-\r
-// -- TPC --\r
-Int_t                                     gTPCBins           = 15;\r
-TH1F*                                     gTPCCharge         = 0;\r
-TH1F*                                     gTPCQMax           = 0;\r
-TH1F*                                     gTPCQMaxOverCharge = 0;\r
-\r
-TH1F*                                     gTPCPt        = 0; // KK\r
-TH1F*                                     gTPCEta       = 0; \r
-TH1F*                                     gTPCPsi       = 0; \r
-TH1F*                                     gTPCnClusters = 0; \r
-TH1F*                                     gTPCMult      = 0;\r
-\r
-// -- PHOS --\r
-TEveElementList*                          gPHOSElementList   = 0;\r
-Int_t                                     gPHOSHistoCount    =0;\r
-// -- EMCAL\r
-TEveElementList*                          gEMCALElementList  = 0;\r
-TGeoNode*                                 gEMCALNode         = 0;\r
-Int_t                                     gEMCALHistoCount    =0;\r
-\r
-// --- Flag if eventloop is running\r
-Bool_t                                    gEventLoopStarted = kFALSE;\r
-\r
 \r
 \r
 //Container for gGeoManager till it is broken\r
@@ -200,6 +123,7 @@ void od ( Bool_t showBarrel = kTRUE, Bool_t showMuon = kFALSE ) {
 \r
   // -- Initialize Eve\r
   // -------------------\r
+  cout << "Initializing the EVE viewer"<<endl;\r
   initializeEveViewer( showBarrel, showMuon );\r
 \r
   // -- Reset gGeoManager to the original pointer\r
@@ -212,47 +136,54 @@ void od ( Bool_t showBarrel = kTRUE, Bool_t showMuon = kFALSE ) {
 \r
   // -- Create new hM object\r
   // -------------------------\r
-  gHomerManager = new AliEveHOMERManager();\r
-  gHomerManager->SetRetryCount(1000,15);\r
-  gHomerManager->SetEveManager(gEve);\r
-  gHomerManager->SetGeoManager(gGeoManager);\r
-  gHomerManager->SetRPhiManager(gRPhiMgr);\r
-  gHomerManager->SetRPhiEventScene(gRPhiEventScene);\r
-  gHomerManager->SetRPhiViewer(gRPhiView);\r
-  gHomerManager->SetRhoZManager(gRhoZMgr);\r
-  gHomerManager->SetRhoZEventScene(gRhoZEventScene);\r
-  gHomerManager->SetRhoZViewer(gRhoZView);\r
-  gHomerManager->SetBarrelFlag(showBarrel);\r
-  gHomerManager->SetMuonFlag(showMuon);\r
-\r
-  Int_t iResult = gHomerManager->Initialize();\r
-  if (iResult) { \r
-    printf("Error Initializing AliHLTHOMERManager, quitting");\r
-    return; \r
-  }\r
+\r
+  cout << "Creating the Event Manager"<<endl;\r
+  gEventManager = new AliEveHLTEventManagerHomer();\r
+  gEventManager->SetEveManager(gEve);\r
+  gEventManager->SetGeoManager(gGeoManager);\r
+  gEventManager->SetRPhiManager(gRPhiMgr);\r
+  gEventManager->SetRPhiEventScene(gRPhiEventScene);\r
+  gEventManager->SetRPhiViewer(gRPhiView);\r
+  gEventManager->SetRhoZManager(gRhoZMgr);\r
+  gEventManager->SetRhoZEventScene(gRhoZEventScene);\r
+  gEventManager->SetRhoZViewer(gRhoZView);\r
\r
+  //gEventManager->SetBarrelFlag(showBarrel);\r
+  //gEventManager->SetMuonFlag(showMuon);\r
+\r
+  // Int_t iResult = gHomerManager->Initialize();\r
+  // if (iResult) { \r
+  //   printf("Error Initializing AliHLTHOMERManager, quitting");\r
+  //   return; \r
+  // }\r
+  \r
+  // gEventManager->SetHomerManager(gHomerManager);\r
 \r
   // -- Add hM to EveTree\r
   // ----------------------\r
-  gEve->AddToListTree(gHomerManager, kTRUE);\r
+  //gEve->AddToListTree(gHomerManager, kTRUE);\r
+  gEve->AddToListTree(gEventManager, kTRUE);\r
 \r
   // -- Create SourceList\r
   // ----------------------\r
-  iResult = gHomerManager->CreateEveSourcesListLoop();\r
-  if (iResult) {\r
-    printf ("Couldn't find active services. Giving up. \n");\r
-    return;\r
-  } \r
-\r
-\r
-  if ( showBarrel ) {\r
-    gHomerManager->ConnectEVEtoHOMER("TPC" );\r
-  } else if ( MUONMode ) {\r
-    gHomerManager->ConnectEVEtoHOMER("MUON");\r
-  } else if( TRDMode ) {\r
-    gHomerManager->ConnectEVEtoHOMER("TRD");  \r
-  } else {\r
-    cout<<" No detectors selected, nothing will be displayed"<<endl;\r
-  }    \r
+  // iResult = gHomerManager->CreateEveSourcesListLoop();\r
+  // if (iResult) {\r
+  //   printf ("Couldn't find active services. Giving up. \n");\r
+  //   return;\r
+  // } \r
+\r
+\r
+  // if ( showBarrel ) {\r
+  //   gHomerManager->ConnectEVEtoHOMER("TPC" );\r
+  // } else if ( MUONMode ) {\r
+  //   gHomerManager->ConnectEVEtoHOMER("MUON");\r
+  // } else if( TRDMode ) {\r
+  //   gHomerManager->ConnectEVEtoHOMER("TRD");  \r
+  // } else {\r
+  //   cout<<" No detectors selected, nothing will be displayed"<<endl;\r
+  // } \r
+  // THIS LINE DOES NOT WORK. PLEASE USE ANOTHER LINE!\r
+\r
 \r
   gGeoManager = fGeoManager;\r
   \r
@@ -428,7 +359,6 @@ Int_t initializeEveViewer( Bool_t showBarrel, Bool_t showMuon ) {
 \r
 \r
   gStyle->SetPalette(1, 0);\r
-\r
   gStyle->SetOptFit(1);\r
 \r
 \r
@@ -436,423 +366,6 @@ Int_t initializeEveViewer( Bool_t showBarrel, Bool_t showMuon ) {
   return 0;\r
 }\r
 \r
-// -----------------------------------------------------------------\r
-void nextEvent() {\r
-\r
-  if ( gHomerManager->NextEvent() ) {\r
-    if (gEventLoopStarted) {\r
-      cout << "HomerManager failed getting next event, trying to reconnect" << endl;\r
-\r
-      gHomerManager->DisconnectHOMER();\r
-      gHomerManager->ConnectEVEtoHOMER();\r
-      nextEvent();\r
-   \r
-    } else {\r
-      return;\r
-    }\r
-  }\r
-\r
-  //  processEvent();\r
-}\r
-\r
-\r
-\r
-// -----------------------------------------------------------------\r
-\r
-\r
-Int_t updateDisplay() {\r
-\r
-  Int_t iResult = 0;\r
-\r
-  \r
-    \r
-  //==============================================================================\r
-  // -- Set EventID in Window Title  \r
-  // -- Update Objects\r
-  //==============================================================================\r
-\r
-  TString winTitle("Eve Main Window -- Event ID : ");\r
-  winTitle += Form("0x%016X ", gHomerManager->GetEventID() );\r
-  gEve->GetBrowser()->SetWindowName(winTitle);\r
-\r
-  //==============================================================================\r
-  // -- Set Projections\r
-  //==============================================================================\r
-\r
-  // XXX Primary vertex ... to be retrieved from the ESD\r
-  Double_t x[3] = { 0, 0, 0 };\r
-  \r
-  TEveElement* top = gEve->GetCurrentEvent();\r
-  \r
-  if (gRPhiMgr && top) {\r
-    gRPhiEventScene->DestroyElements();\r
-    if (gCenterProjectionsAtPrimaryVertex)\r
-      gRPhiMgr->SetCenter(x[0], x[1], x[2]);\r
-    gRPhiMgr->ImportElements(top, gRPhiEventScene);\r
-  }\r
-  \r
-  if (gRhoZMgr && top) {\r
-    gRhoZEventScene->DestroyElements();\r
-    if (gCenterProjectionsAtPrimaryVertex)\r
-      gRhoZMgr->SetCenter(x[0], x[1], x[2]);\r
-    gRhoZMgr->ImportElements(top, gRhoZEventScene);\r
-  }\r
-\r
-  //==============================================================================\r
-\r
-  gEve->Redraw3D(0,1); // (0, 1)\r
-  gEve->EnableRedraw(); \r
-\r
-  return iResult;\r
-\r
-}\r
-\r
-\r
-\r
-\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processROOTTOBJ(AliHLTHOMERBlockDesc* block, TEveText* /*et*/) {\r
-  \r
-  // -- AliHLTGlobalTriggerDecision\r
-  if ( ! block->GetClassName().CompareTo("AliHLTGlobalTriggerDecision") ) {\r
-\r
-    AliHLTGlobalTriggerDecision *trig = dynamic_cast<AliHLTGlobalTriggerDecision*>( block->GetTObject());\r
-    trig->Print(); \r
-    \r
-    // et->SetText("balle");;\r
-\r
-    // TEveText* tt = new TEveText("Trigger: Class is known ;-) ");\r
-    // gEve->AddElement(tt);\r
-\r
-  }\r
-  else {\r
-    printf(" Unknown root object %s",block->GetClassName().Data() );\r
-  }\r
-\r
-  return 0;\r
-}\r
-\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processMUONClusters(AliHLTHOMERBlockDesc* block) {\r
-  \r
-  Int_t iResult = 0;\r
-  \r
-  unsigned long size = block->GetSize();\r
-  Int_t * buffer ;\r
-\r
-  buffer = (Int_t *)block->GetData();\r
-//   cout<<"block size : "<<size<<", buffer : "<<buffer<<", DataType : "<<block->GetDataType()<<endl;\r
-\r
-// //   for(int idata=0;idata<int(size);idata++)\r
-// //     printf("\tbuffer[%d] : %d\n",idata,buffer[idata]);\r
-  \r
-  \r
-  \r
-  if(block->GetDataType().CompareTo("RECHITS") == 0){\r
-\r
-    AliHLTMUONRecHitsBlockReader trackblock((char*)buffer, size);\r
-    const AliHLTMUONRecHitStruct* hit = trackblock.GetArray();\r
-    \r
-    for(AliHLTUInt32_t ientry = 0; ientry < trackblock.Nentries(); ientry++){\r
-//       cout << setw(13) << left << hit->fX << setw(0);\r
-//       cout << setw(13) << left << hit->fY << setw(0);\r
-//       cout << hit->fZ << setw(0) << endl;\r
-      if(hit->fX!=0.0 && hit->fY!=0.0 && hit->fZ!=0.0)\r
-       gMUONClusters->SetNextPoint(hit->fX,hit->fY,hit->fZ);\r
-      hit++;\r
-      \r
-    }// track hit loop\r
-  }\r
-\r
-  else{// if rechits\r
-    //     if(!strcmp((BlockType(ULong64_t(reader->GetBlockDataType(i)))).Data(),"TRIGRECS")){\r
-  \r
-    AliHLTMUONTriggerRecordsBlockReader trigblock(buffer, size);\r
-    const AliHLTMUONTriggerRecordStruct* trigrec = trigblock.GetArray();\r
-    for(AliHLTUInt32_t ientry = 0; ientry < trigblock.Nentries(); ientry++){\r
-      \r
-      const AliHLTMUONRecHitStruct* hit = &trigrec->fHit[0];\r
-      for(AliHLTUInt32_t ch = 0; ch < 4; ch++)\r
-       {\r
-//       cout << setw(10) << left << ch + 11 << setw(0);\r
-//       cout << setw(13) << left << hit->fX << setw(0);\r
-//       cout << setw(13) << left << hit->fY << setw(0);\r
-//       cout << hit->fZ << setw(0) << endl;\r
-         if(hit->fX!=0.0 && hit->fY!=0.0 && hit->fZ!=0.0)\r
-           gMUONClusters->SetNextPoint(hit->fX,hit->fY,hit->fZ);\r
-         hit++;\r
-       }// trig chamber loop\r
-      trigrec++;\r
-    }//trig hit loop\r
-  }//else trigger\r
-\r
-  return iResult;\r
-}\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processMUONTracks(AliHLTHOMERBlockDesc* block) {\r
-  \r
-  Int_t iResult = 0;\r
-  \r
-  unsigned long size = block->GetSize();\r
-  Int_t * buffer = (Int_t *)block->GetData();\r
-  AliHLTMUONRecHitStruct hit1,hit2;\r
-  hit1.fX = hit1.fY = hit1.fZ = hit2.fX = hit2.fY = hit2.fZ = 0;\r
-  Int_t ch1=0, ch2=0;\r
-  Float_t x0=0.0,y0=0.0,z0=0.0;\r
-  Float_t x3=0.0,y3=0.0,z3=0.0;\r
-  if(block->GetDataType().CompareTo("MANTRACK") == 0){  \r
-    AliHLTMUONMansoTracksBlockReader mantrackblock(buffer, size);\r
-    const AliHLTMUONMansoTrackStruct* mtrack = mantrackblock.GetArray();\r
-    for(AliHLTUInt32_t ientry = 0; ientry < mantrackblock.Nentries(); ientry++){\r
-      const AliHLTMUONRecHitStruct* hit = &mtrack->fHit[0];\r
-      for(AliHLTUInt32_t ch = 0; ch < 4; ch++){\r
-       // cout << setw(10) << left << ch + 7 << setw(0);\r
-       // cout << setw(13) << left << hit->fX << setw(0);\r
-       // cout << setw(13) << left << hit->fY << setw(0);\r
-       // cout << hit->fZ << setw(0) << endl;\r
-       if(hit->fZ != 0.0){\r
-         if(ch==0 || ch==1){\r
-           hit1 = *hit; ch1 = ch+6;\r
-         }else{\r
-           hit2 = *hit; ch2 = ch+6;\r
-         }\r
-       }\r
-       hit++;\r
-      }// trig chamber loop\r
-      // printf("ch : %d, (X,Y,Z) : (%f,%f,%f)\n",ch1,hit1.fX,hit1.fY,hit1.fZ);\r
-      // printf("ch : %d, (X,Y,Z) : (%f,%f,%f)\n",ch2,hit2.fX,hit2.fY,hit2.fZ);\r
-      // meminfo();\r
-      z3 = AliMUONConstants::DefaultChamberZ(ch2+4);\r
-      y3 =  hit1.fY - (hit1.fZ-z3)*(hit1.fY - hit2.fY)/(hit1.fZ - hit2.fZ) ;\r
-      x3 =  hit1.fX - (hit1.fZ-z3)*(hit1.fX - hit2.fX)/(hit1.fZ - hit2.fZ) ;\r
-\r
-      z0 = AliMUONConstants::DefaultChamberZ(ch1);\r
-      y0 =  hit1.fY - (hit1.fZ-z0)*(hit1.fY - hit2.fY)/(hit1.fZ - hit2.fZ) ;\r
-      x0 =  hit1.fX - (hit1.fZ-z0)*(hit1.fX - hit2.fX)/(hit1.fZ - hit2.fZ) ;\r
-      \r
-\r
-      gMUONTracks->AddLine(x0,y0,z0,x3,y3,z3);\r
-      mtrack++;\r
-    }\r
-    cout<<"NofManso Tracks : "<<mantrackblock.Nentries()<<endl;\r
-  }\r
-  \r
-  return iResult;\r
-\r
-}\r
-\r
\r
-// -----------------------------------------------------------------\r
-Int_t processTRDClusters(AliHLTHOMERBlockDesc* block, TEvePointSet *cont, TEvePointSetArray *contCol) {\r
-  \r
-  Int_t iResult = 0;\r
-\r
-  Int_t sm = block->GetSubDetector();\r
-  if ( sm == 6 ) sm = 7;\r
-  \r
-  Float_t phi   = ( sm + 0.5 ) * TMath::Pi() / 9.0;  \r
-  Float_t cos   = TMath::Cos( phi );\r
-  Float_t sin   = TMath::Sin( phi );\r
-  \r
-  Byte_t* ptrData = reinterpret_cast<Byte_t*>(block->GetData());\r
-  UInt_t ptrSize = block->GetSize();\r
-\r
-  for (UInt_t size = 0; size+sizeof(AliHLTTRDCluster) <= ptrSize; size+=sizeof(AliHLTTRDCluster) ) {\r
-    AliHLTTRDCluster *cluster = reinterpret_cast<AliHLTTRDCluster*>(&(ptrData[size]));\r
-   \r
-    AliTRDcluster *trdCluster = new AliTRDcluster;\r
-    cluster->ExportTRDCluster( trdCluster );\r
-   \r
-    contCol->Fill(cos*trdCluster->GetX() - sin*trdCluster->GetY(), \r
-                  sin*trdCluster->GetX() + cos*trdCluster->GetY(), \r
-                  trdCluster->GetZ(),\r
-                  trdCluster->GetQ() );    \r
-     \r
-    cont->SetNextPoint(cos*trdCluster->GetX() - sin*trdCluster->GetY(), \r
-                      sin*trdCluster->GetX() + cos*trdCluster->GetY(), trdCluster->GetZ());\r
-  }\r
-  \r
-  return iResult;\r
-}\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processTRDHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {\r
-\r
-  Int_t iResult = 0;\r
-\r
-  if ( ! block->GetClassName().CompareTo("TH1F")) {\r
-    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());\r
-    ++gTRDHistoCount;\r
-  \r
-    TVirtualPad* pad = canvas->cd(gTRDHistoCount);\r
-    histo->Draw();\r
-    pad->SetGridy();\r
-    pad->SetGridx();\r
-\r
-    if ( ! strcmp(histo->GetName(), "nscls") ) {\r
-      gTRDEvents = static_cast<Int_t>(histo->GetEntries());\r
-        histo->GetXaxis()->SetRangeUser(0.,15.);\r
-    }\r
-\r
-    if ( ! strcmp(histo->GetName(),"sclsdist") ||\r
-        ! strcmp(histo->GetName(),"evSize") )\r
-      pad->SetLogy();\r
-  }\r
-\r
-  gTRDCanvas->Update();\r
-\r
-  return iResult;\r
-}\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processPrimVertexHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {\r
-\r
-  Int_t iResult = 0;\r
-\r
-  if ( ! block->GetClassName().CompareTo("TH1F")) {\r
-    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());\r
-    if( histo ){\r
-      TString name(histo->GetName());\r
-      if( !name.CompareTo("primVertexZ") ){\r
-       canvas->cd(2);\r
-       histo->Draw();\r
-      }else if( !name.CompareTo("primVertexX") ){\r
-       canvas->cd(3);\r
-       histo->Draw();\r
-      }else if( !name.CompareTo("primVertexY") ){\r
-       canvas->cd(4);\r
-       histo->Draw();\r
-      }\r
-    }\r
-  }  else if ( ! block->GetClassName().CompareTo("TH2F")) {\r
-    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());\r
-    if (hista ){\r
-       TString name(hista->GetName());\r
-       if( !name.CompareTo("primVertexXY")) {      \r
-        canvas->cd(1);\r
-        hista->Draw();\r
-       }\r
-    }\r
-  }\r
-  canvas->cd();\r
-\r
-  return iResult;\r
-}\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processSPDVertexHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {\r
-\r
-  Int_t iResult = 0;\r
-\r
-  if ( ! block->GetClassName().CompareTo("TH1F")) {\r
-    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());\r
-    ++gSPDVertexHistoCount;\r
-  \r
-    canvas->cd(gSPDVertexHistoCount);\r
-    histo->Draw();\r
-\r
-  }  \r
-  else if ( ! block->GetClassName().CompareTo("TH2F")) {\r
-    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());\r
-    if (hista) {\r
-      ++gSPDVertexHistoCount;\r
-  \r
-      canvas->cd(gSPDVertexHistoCount);\r
-      hista->Draw();\r
-    }\r
-  }\r
-  canvas->cd();\r
-\r
-  return iResult;\r
-}\r
-\r
-// -----------------------------------------------------------------\r
-Int_t processV0Histograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {\r
-\r
-  cout << "Processing to see if it's V0 histogram, !!!!!!!!!"<<endl;\r
-\r
-  Int_t iResult = 0;\r
-  bool update = 0;\r
-  if ( ! block->GetClassName().CompareTo("TH1F")) {\r
-    TH1F* histo = reinterpret_cast<TH1F*>(block->GetTObject());\r
-    if( histo ){\r
-      TString name(histo->GetName());\r
-      if( !name.CompareTo("hKShort") ){\r
-       canvas->cd(1);\r
-       histo->Draw();\r
-       update = 1;\r
-      }else if( !name.CompareTo("hLambda") ){\r
-       canvas->cd(3);\r
-       histo->Draw();\r
-       update = 1;\r
-      }\r
-    }\r
-  }  else if ( ! block->GetClassName().CompareTo("TH2F")) {\r
-    TH2F *hista = reinterpret_cast<TH2F*>(block->GetTObject());\r
-    if (hista ){\r
-       TString name(hista->GetName());\r
-       if( !name.CompareTo("hAP")) {      \r
-        canvas->cd(2);\r
-        hista->Draw();\r
-        update = 1;\r
-       }\r
-       else if( !name.CompareTo("hGammaXY")) {      \r
-        canvas->cd(4);\r
-        hista->Draw();\r
-        update = 1;\r
-       }\r
-    }\r
-  }\r
-  if( update ){\r
-    canvas->cd();\r
-    canvas->Update();\r
-  }\r
-  return iResult;\r
-}\r
-\r
-\r
-\r
-//*****************************************************************************\r
-Int_t processTRDCalibHistograms(AliHLTHOMERBlockDesc* block, TCanvas * canvas) {\r
-  Int_t iResult = 0;\r
-\r
-  TObjArray *HistArray=(TObjArray*)block->GetTObject();\r
-  Int_t nCalibHistos=HistArray->GetEntriesFast();\r
-  for(Int_t CalibHistoCount=0;CalibHistoCount<nCalibHistos;CalibHistoCount++){\r
-    canvas->cd(CalibHistoCount+1);\r
-    \r
-    if(HistArray->At(CalibHistoCount)->InheritsFrom("TH2S")){\r
-        TH2S *histCalib=(TH2S*)(HistArray->At(CalibHistoCount));\r
-        histCalib->Draw("colz");\r
-       }\r
-     else if(HistArray->At(CalibHistoCount)->InheritsFrom("TH2")){\r
-      //TH2D *histCalib=dynamic_cast<TH2D*>(HistArray->At(CalibHistoCount));\r
-      TH2D *histCalib=(TH2D*)(HistArray->At(CalibHistoCount));\r
-      histCalib->Draw("lego2");\r
-    }\r
-    else if(HistArray->At(CalibHistoCount)->InheritsFrom("TH1")){\r
-      //TH1D *histCalib=dynamic_cast<TH1D*>(HistArray->At(CalibHistoCount));\r
-      TH1D *histCalib=(TH1D*)(HistArray->At(CalibHistoCount));\r
-      histCalib->Draw();\r
-    }\r
-    else if(HistArray->At(CalibHistoCount)->InheritsFrom("AliTRDCalibraVdriftLinearFit")){\r
-      //TH2S *histCalib = ((dynamic_cast<AliTRDCalibraVdriftLinearFit*>(HistArray->At(CalibHistoCount)))->GetLinearFitterHisto(10,kTRUE));\r
-      TH2S *histCalib =(TH2S*)(((AliTRDCalibraVdriftLinearFit*)HistArray->At(CalibHistoCount))->GetLinearFitterHisto(10,kTRUE));\r
-\r
-      histCalib->Draw();\r
-    }\r
-    \r
-   \r
-  }\r
-  \r
-  gTRDCalibCanvas->Update();\r
-\r
- return iResult;\r
-}\r
-\r
 //****************************************************************************\r
 void writeToFile(){\r
 \r
@@ -872,85 +385,5 @@ void writeToFile(){
 }\r
 \r
 \r
-// -----------------------------------------------------------------\r
-void loopEvent() {\r
-  eventTimer.SetCommand("nextEvent()");\r
-  eventTimer.Start(3000);\r
-}\r
-\r
-// -----------------------------------------------------------------\r
-void stopLoopEvent() {\r
-  eventTimer.Stop();\r
-}\r
-\r
-\r
-\r
-\r
-Int_t processTRDBlock (AliHLTHOMERBlockDesc * block) {\r
-\r
-   Int_t iResult = 0;\r
-\r
-  if ( ! block->GetDataType().CompareTo("CLUSTERS") ) {\r
-     \r
-    if(!gTRDClusters){\r
-      gTRDClusters = new TEvePointSet("TRD Clusters");\r
-      gTRDClusters->SetMainColor(kBlue);\r
-      gTRDClusters->SetMarkerStyle((Style_t)kFullDotSmall);\r
-      //gEve->AddElement(gTRDClusters);\r
-    } \r
-\r
-    if(!gTRDColClusters){\r
-      gTRDColClusters = new TEvePointSetArray("TRD Clusters Colorized");\r
-      gTRDColClusters->SetMainColor(kRed);\r
-      gTRDColClusters->SetMarkerStyle(4); // antialiased circle\r
-      //         gTRDColClusters->SetMarkerStyle((Style_t)kFullDotSmall);\r
-      gTRDColClusters->SetMarkerSize(0.4);\r
-      gTRDColClusters->InitBins("Cluster Charge", gTRDBins, 0., gTRDBins*100.);\r
-\r
-      //TColor::SetPalette(1, 0); // Spectrum palette\r
-      const Int_t nCol = TColor::GetNumberOfColors();\r
-      for (Int_t ii = 0; ii < gTRDBins+1; ++ii)\r
-       gTRDColClusters->GetBin(ii)->SetMainColor(TColor::GetColorPalette(ii * nCol / (gTRDBins+2)));\r
-         \r
-      gEve->AddElement(gTRDColClusters);\r
-    } \r
-\r
-    iResult = processTRDClusters( block, gTRDClusters, gTRDColClusters );\r
-    //gTRDClusters->ElementChanged();\r
-    gTRDColClusters->ElementChanged();\r
-  }\r
-\r
-  // -- Process TRD Histograms\r
-  else if ( block->GetDataType().CompareTo("ROOTHIST") == 0 ) {\r
-    if(!gTRDCanvas) {\r
-      gTRDCanvas = createCanvas("TRD", "TRD");\r
-      gTRDCanvas->Divide(3,2);\r
-    }\r
-    iResult = processTRDHistograms( block, gTRDCanvas );     \r
-  }\r
-\r
-  else if(block->GetDataType().CompareTo("CALIBRAH")==0){\r
-     \r
-    if(!gTRDCalibCanvas){\r
-      gTRDCalibCanvas = createCanvas("TRD Calib", "TRD Calib");\r
-      gTRDCalibCanvas->Divide(2,2);\r
-    }\r
-     \r
-    iResult=processTRDCalibHistograms(block,gTRDCalibCanvas);\r
-  }\r
-\r
-  else if(block->GetDataType().CompareTo("CALIBEOR")==0){\r
-     \r
-    if(!gTRDEORCanvas){\r
-      gTRDEORCanvas = createCanvas("TRD QA", "TRD QA");\r
-      gTRDEORCanvas->Divide(3,2);       \r
-    }\r
-  \r
-    iResult=processTRDCalibHistograms(block,gTRDEORCanvas);\r
-  }\r
-  return iResult;\r
-}\r
-\r
-\r
 \r
         \r