FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairGeoTracksDraw.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  * FairGeoTracksDraw.cxx
10  *
11  * Created on: 23 kwi 2020
12  * Author: Daniel Wielanek
13  * E-mail: daniel.wielanek@gmail.com
14  * Warsaw University of Technology, Faculty of Physics
15  */
16 
17 #include "FairGeoTracksDraw.h"
18 
19 #include "FairEveGeoTracks.h"
20 #include "FairEventManager.h"
21 
22 #include <TEveManager.h>
23 #include <TEveSelection.h>
24 
26  : FairTask(name)
27  , fEventManager(nullptr)
28  , fVisualizer(nullptr)
29 {}
30 
31 void FairGeoTracksDraw::Exec(Option_t* option) { fVisualizer->Repaint(); }
32 
34 {
35  fEventManager = FairEventManager::Instance();
36  fVisualizer = new FairEveGeoTracks();
37  fVisualizer->SetRnrChildren(1);
38  gEve->AddElement(fVisualizer, FairEventManager::Instance());
39  gEve->GetSelection()->SetPickToSelect(TEveSelection::kPS_PableCompound);
40  gEve->GetHighlight()->SetPickToSelect(TEveSelection::kPS_PableCompound);
41  gEve->Redraw3D(kFALSE);
42  return fVisualizer->Init();
43 }
44 
virtual InitStatus Init()
InitStatus
Definition: FairTask.h:33
FairGeoTracksDraw(const char *name="MC tracks")
virtual void Exec(Option_t *option)
virtual InitStatus Init()
static FairEventManager * Instance()