FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairRecoTracksDraw.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 /*
9  * FairRecoTracksDraw.cxx
10  *
11  * Created on: 27 sie 2020
12  * Author: Daniel Wielanek
13  * E-mail: daniel.wielanek@gmail.com
14  * Warsaw University of Technology, Faculty of Physics
15  */
16 
17 #include "FairRecoTracksDraw.h"
18 
20 #include "FairEventManager.h"
21 
22 #include <RtypesCore.h>
23 #include <TEveManager.h>
24 #include <TEveSelection.h>
25 
27  : FairTask(name)
28  , fEventManager(nullptr)
29  , fVisualizer(nullptr)
30 {}
31 
32 void FairRecoTracksDraw::Exec(Option_t* option) { fVisualizer->Repaint(); }
33 
35 {
36  fEventManager = FairEventManager::Instance();
37  fVisualizer = new FairEveRecoTracksExample();
38  fVisualizer->SetRnrChildren(1);
39  gEve->AddElement(fVisualizer, FairEventManager::Instance());
40  gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound);
41  gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound);
42  gEve->Redraw3D(kFALSE);
43  return fVisualizer->Init();
44 }
45 
virtual void Exec(Option_t *option)
InitStatus
Definition: FairTask.h:33
FairRecoTracksDraw(const char *name="reconstructed tracks")
static FairEventManager * Instance()
virtual InitStatus Init()