]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/alice-macros/lego.C
recover the detector tag int and not the string from the AOD particle
[u/mrichter/AliRoot.git] / EVE / alice-macros / lego.C
1 // Author: Stefano Carrazza 2010
2
3 /**************************************************************************
4  * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
5  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
6  * full copyright notice.                                                 *
7  **************************************************************************/
8  
9 #if !defined(__CINT__) || defined(__MAKECINT__)
10 #include <TEveElement.h>
11
12 #include <AliEveEventManager.h>
13 #include <AliEveLego.h>
14 #endif
15
16 AliEveLego* lego(){
17
18    AliEveEventManager *mng = AliEveEventManager::GetMaster();
19    AliEveLego *lego = dynamic_cast<AliEveLego*>(mng->FindGlobal("LegoHisto2D"));
20
21    if ( lego == 0) {
22       lego = new AliEveLego();
23       mng->InsertGlobal("LegoHisto2D",lego);
24    } else {
25       lego->Update();
26    } 
27
28    return lego;
29 }