Project
Loading...
Searching...
No Matches
MultiView.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
17
18#ifndef ALICE_O2_EVENTVISUALISATION_VIEW_MULTIVIEW_H
19#define ALICE_O2_EVENTVISUALISATION_VIEW_MULTIVIEW_H
20
21#include <TGLAnnotation.h>
22#include <TGLViewer.h>
23#include <TEveGeoShape.h>
24#include <TEveScene.h>
25#include <TEveViewer.h>
26
27#include <vector>
28
29namespace o2
30{
31namespace event_visualisation
32{
33
40
42{
43 public:
50
65
67 static MultiView* getInstance();
68
70 inline TEveViewer* getView(EViews view) { return mViews[view]; }
72 inline TEveScene* getScene(EScenes scene) { return mScenes[scene]; }
74 inline TEveProjectionManager* getProjection(EProjections projection) { return mProjections[projection]; }
75
78 TEveGeoShape* getDetectorGeometry(const std::string& detectorName);
79
85 void drawGeometryForDetector(std::string detectorName, bool threeD = true, bool rPhi = true, bool zy = true);
87 void registerGeometry(TEveGeoShape* geom, bool threeD = true, bool rPhi = true, bool zy = true);
90
92 void registerElements(TEveElementList* elements[], TEveElementList* phiElements[]);
93
95 void registerElement(TEveElement* event);
96 void registerEvent(TEveElement* event) { return registerElement(event); }
97
99 TGLAnnotation* getAnnotationTop() { return mAnnotationTop.get(); }
100 TGLAnnotation* getAnnotationBottom() { return mAnnotationBottom.get(); }
101
103 void destroyAllEvents(); // override;
104 void redraw3D();
105
106 private:
108 MultiView();
110 ~MultiView();
111
112 static MultiView* sInstance;
113
114 TEveViewer* mViews[NumberOfViews];
115 TEveScene* mScenes[NumberOfScenes];
116 TEveProjectionManager* mProjections[NumberOfProjections];
117 std::vector<TEveGeoShape*> mDetectors;
118 std::unique_ptr<TGLAnnotation> mAnnotationTop;
119 std::unique_ptr<TGLAnnotation> mAnnotationBottom;
120
121 std::string mSceneNames[NumberOfScenes];
122 std::string mSceneDescriptions[NumberOfScenes];
123
125 void setupMultiview();
127 EScenes getSceneOfProjection(EProjections projection);
128};
129
130} // namespace event_visualisation
131} // namespace o2
132
133#endif // ALICE_O2_EVENTVISUALISATION_VIEW_MULTIVIEW_H
@ SceneZYEvent
Z-Y scene of event.
Definition MultiView.h:57
@ SceneZYGeom
Z-Y scene of geometry.
Definition MultiView.h:55
@ SceneRphiGeom
R-Phi scene of geometry.
Definition MultiView.h:54
@ SceneRphiEvent
R-Phi scene of event.
Definition MultiView.h:56
@ NumberOfScenes
Total number of scenes.
Definition MultiView.h:58
@ Scene3dGeom
3D scene of geometry
Definition MultiView.h:52
@ Scene3dEvent
3D scene of event
Definition MultiView.h:53
static MultiView * getInstance()
Returns an instance of the MultiView.
void drawGeometryForDetector(std::string detectorName, bool threeD=true, bool rPhi=true, bool zy=true)
void registerElements(TEveElementList *elements[], TEveElementList *phiElements[])
Registers an elements to be drawn.
TEveViewer * getView(EViews view)
Returns pointer to specific view.
Definition MultiView.h:70
TGLAnnotation * getAnnotationTop()
Get annotation pointer.
Definition MultiView.h:99
@ NumberOfViews
Total number of views.
Definition MultiView.h:48
void destroyAllEvents()
Removes all shapes representing current event.
@ NumberOfProjections
Total number of projections.
Definition MultiView.h:63
@ ProjectionRphi
R-Phi projection.
Definition MultiView.h:61
TEveProjectionManager * getProjection(EProjections projection)
Returns pointer to specific projection manager.
Definition MultiView.h:74
TEveGeoShape * getDetectorGeometry(const std::string &detectorName)
void registerElement(TEveElement *event)
Registers an element to be drawn.
void registerEvent(TEveElement *event)
Definition MultiView.h:96
TGLAnnotation * getAnnotationBottom()
Definition MultiView.h:100
TEveScene * getScene(EScenes scene)
Returns pointer to specific scene.
Definition MultiView.h:72
void registerGeometry(TEveGeoShape *geom, bool threeD=true, bool rPhi=true, bool zy=true)
Registers geometry to be drawn in appropriate views.
void destroyAllGeometries()
Removes all geometries.
struct _cl_event * event
Definition glcorearb.h:2982
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...