BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
EventDisplay.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef EVENTDISPLAY_H
19#define EVENTDISPLAY_H
20
21#include "Rtypes.h" // for classdef
22
23#include "DataLoader.hh"
24#include "Event.hh"
25#include "TChain.h"
26
34{
35public:
38
40 static EventDisplay* Instance(TString geoFileName,
41 TString dataFileName);
42
43 virtual ~EventDisplay();
44
46 void LoadModel(int iMod);
47
49 void LoadOptions(int iOpt);
50
52 void LoadData(int iEvt);
53
55 void ClearEvent();
56
58 void Draw();
59
61 void DrawModel();
62
64 void DrawElossHits();
65
67 void DrawTunnelHits();
68
70 void DrawSamplers();
71
73 void DrawTrajectories();
74
75private:
78
80 EventDisplay(TString geoFileNameIn,
81 TString dataFileNameIn);
82
84 void LoadGeometry();
85
86 TString geoFileName = "";
87 TString dataFileName = "";
88
89 DataLoader *dataLoader = nullptr;
90 Event *event = nullptr;
91 TChain *eventTree = nullptr;
92 Options *options = nullptr;
93 TChain *optionsTree = nullptr;
94 Model *model = nullptr;
95 TChain *modelTree = nullptr;
96
99
100 ClassDef(EventDisplay,1);
101};
102
103#endif
Loader for a ROOT file using classes used to generate the file.
Definition DataLoader.hh:46
Event viewer using ROOT EVE framework.
EventDisplay()
Private default constructor as singleton pattern.
void LoadData(int iEvt)
Load an entry in the event tree.
void DrawModel()
Draw the geometry.
static EventDisplay * Instance()
Singleton accessor.
void LoadGeometry()
Load the geometry from gdml file.
void DrawTrajectories()
Draw loaded trajectories.
void LoadModel(int iMod)
Load an entry from the model tree.
void ClearEvent()
Clear a currently displayed event.
void DrawSamplers()
Draw hits on a sampler plane.
void LoadOptions(int iOpt)
Load an entry from the options tree.
void DrawElossHits()
Draw energy loss deposits.
static EventDisplay * instance
Singleton instance.
void Draw()
Draw all things loaded at this point.
void DrawTunnelHits()
Draw tunnel energy deposits.
Event loader.
Definition Event.hh:49
Model loader.
Definition Model.hh:35
Options loader.
Definition Options.hh:35