]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveHLT/AliEveHLTEventManager.cxx
fix coding violation
[u/mrichter/AliRoot.git] / EVE / EveHLT / AliEveHLTEventManager.cxx
index 490d2820a772c062b49a58c41d6492895db5a652..8037174606fcfb863bd3c273701120b0202c1382 100644 (file)
@@ -16,6 +16,7 @@
 #include "AliHLTEveISDD.h"
 #include "AliHLTEveTRD.h"
 #include "AliHLTEveMuon.h"
+#include "AliHLTEveMultCorr.h"
 #include "AliHLTEveAny.h"
 
 #include "AliEveHLTEventManager.h"
@@ -24,7 +25,6 @@
 
 #include "TList.h"
 #include "TTimer.h"
-
 #include "TThread.h"
 
 ClassImp(AliEveHLTEventManager);
@@ -50,12 +50,13 @@ AliEveHLTEventManager::AliEveHLTEventManager() :
   fISDDElement(NULL),
   fTRDElement(NULL),
   fMuonElement(NULL),
+  fMultCorrElement(NULL),
   fAnyElement(NULL),
   fEventLoopStarted(kFALSE),
   fCenterProjectionsAtPrimaryVertex(kFALSE),
   fShowBarrel(kTRUE),
   fShowMuon(kFALSE), 
-  fRunNumber(-1),
+  fRunNumber(666),
   fEventId(-1)
 {
   // see header file for class documentation
@@ -119,6 +120,10 @@ void AliEveHLTEventManager::DestroyDetectorElements(){
   if(fMuonElement)
     delete fMuonElement;
   fMuonElement = NULL;
+
+  if(fMultCorrElement)
+    delete fMultCorrElement;
+  fMultCorrElement = NULL;
  
   if(fAnyElement)
     delete fAnyElement;
@@ -146,6 +151,7 @@ Int_t AliEveHLTEventManager::ProcessEvent(AliESDEvent * event) {
 
   gEve->DisableRedraw();
 
+  event->GetStdContent();
   // -- Set EventID in Window Title  
   TString winTitle("Eve Main Window");
   SetRunNumber(event->GetRunNumber());
@@ -154,11 +160,6 @@ Int_t AliEveHLTEventManager::ProcessEvent(AliESDEvent * event) {
   winTitle += Form("-- Event ID : 0x%016lX ", GetEventId() );
   GetEveManager()->GetBrowser()->SetWindowName(winTitle);
 
-
-  
-  cout << "reset()"<<endl;
-  
-  cout << "process()"<<endl;
   if(!fHLTElement) {
     fHLTElement = new AliHLTEveHLT();
     fHLTElement->SetEventManager(this);
@@ -171,8 +172,8 @@ Int_t AliEveHLTEventManager::ProcessEvent(AliESDEvent * event) {
   
   if(!fEmcalElement) CreateEmcalElement();
   fEmcalElement->ProcessEvent(event);
-
-  gEve->Redraw3D(0, 1);
+  
+  gEve->FullRedraw3D(0, 1);
   gEve->EnableRedraw();
 
   return 0;
@@ -191,6 +192,7 @@ Int_t AliEveHLTEventManager::ProcessEvent(TList * blockList) {
     return -1;
   }
  
+  gEve->DisableRedraw();
 
   AliHLTHOMERBlockDesc * block = NULL;
   TIter next(blockList);
@@ -243,6 +245,12 @@ void AliEveHLTEventManager::ProcessBlock(AliHLTHOMERBlockDesc * block) {
        if(event) {
          ProcessEvent(event);
        }
+      
+      } else if(!(block->GetDataType().CompareTo("ROOTTOBJ"))) {
+
+       if(!fMultCorrElement) CreateMultCorrElement();
+       fMultCorrElement->ProcessBlock(block);
+      
       } else {
        fHLTElement->ProcessBlock(block);
       }
@@ -275,6 +283,15 @@ void AliEveHLTEventManager::ProcessBlock(AliHLTHOMERBlockDesc * block) {
     
     else if ( ! block->GetDetector().CompareTo("MUON") ) {
       //Do Nothing
+      if(!block->GetDataType().CompareTo("ROOTHIST")) {
+       if(!fMuonElement) {
+         fMuonElement = new AliHLTEveMuon();
+         fMuonElement->SetEventManager(this);
+         gEve->AddElement(fMuonElement);
+       }
+       fMuonElement->ProcessBlock(block);
+      }
+    
     } else {
       if(!fAnyElement) {
        fAnyElement = new AliHLTEveAny();
@@ -341,9 +358,13 @@ void AliEveHLTEventManager::ResetDisplay () {
 void AliEveHLTEventManager::PrintScreens() {
 //   //See header file for documentation
 
-  fEveManager->GetDefaultGLViewer()->SavePicture(Form("%d_0x%016lX_3D.gif", fRunNumber, GetEventId()));
-  fRhoZViewer->GetGLViewer()->SavePicture(Form("%d_0x%016lX_RhoZ.gif", fRunNumber, GetEventId()));
-  fRPhiViewer->GetGLViewer()->SavePicture(Form("%d_0x%016lX_RPhi.gif", fRunNumber, GetEventId()));
+  Float_t scale = 4.f;
+  //Int_t width = 4000;
+  //Int_t height = 2000;
+
+  fEveManager->GetDefaultGLViewer()->SavePictureScale(Form("run_%d_0x%016lX_3D.gif", fRunNumber, GetEventId()), scale);
+  fRhoZViewer->GetGLViewer()->SavePictureScale(Form("run_%d_0x%016lX_RhoZ.gif", fRunNumber, GetEventId()), scale);
+  fRPhiViewer->GetGLViewer()->SavePictureScale(Form("run_%d_0x%016lX_RPhi.gif", fRunNumber, GetEventId()), scale);
   return;
 }
 
@@ -399,6 +420,7 @@ void AliEveHLTEventManager::StopLoop() {
 
 void  AliEveHLTEventManager::UpdateDisplay() {
   //See header file for documentation
+  cout << "AliHLTEventManager::UpdateDisplay(); " <<endl;
   if(fPhosElement) fPhosElement->UpdateElements();
   if(fEmcalElement) fEmcalElement->UpdateElements();
   if(fTPCElement) fTPCElement->UpdateElements();
@@ -410,6 +432,7 @@ void  AliEveHLTEventManager::UpdateDisplay() {
   if(fTRDElement) fTRDElement->UpdateElements();
   if(fAnyElement) fAnyElement->UpdateElements();
   if(fMuonElement) fMuonElement->UpdateElements();
+  if(fMultCorrElement) fMultCorrElement->UpdateElements();
 
 
   //==============================================================================
@@ -443,14 +466,10 @@ void  AliEveHLTEventManager::UpdateDisplay() {
 
 void AliEveHLTEventManager::SaveEveryThing() {
 
+  //Print the screens
   PrintScreens();
-
+  //Save block lists to file
   GetEventBuffer()->WriteToFile(GetRunNumber());
-  //Save everything to file
-  //fEventBuffer->SaveBlockList();
-  //fEventBuffer->SaveAsyncBlockList();
-
-
 }
 
 
@@ -461,6 +480,12 @@ void AliEveHLTEventManager::CreatePhosElement() {
   gEve->AddElement(fPhosElement);
 }
 
+void AliEveHLTEventManager::CreateMultCorrElement() {
+  fMultCorrElement = new AliHLTEveMultCorr("MultCorr");
+  fMultCorrElement->SetEventManager(this);
+  gEve->AddElement(fMultCorrElement);
+}
+
 void AliEveHLTEventManager::CreateEmcalElement() {
   fEmcalElement = new AliHLTEveEmcal();
   fEmcalElement->SetEventManager(this);