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) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef EVENTDISPLAY_H
20#define EVENTDISPLAY_H
21
22#include "Rtypes.h" // for classdef
23
24#include "DataLoader.hh"
25#include "Event.hh"
26#include "TChain.h"
27
35{
36public:
39
41 static EventDisplay* Instance(TString geoFileName,
42 TString dataFileName);
43
44 virtual ~EventDisplay();
45
47 void LoadModel(int iMod);
48
50 void LoadOptions(int iOpt);
51
53 void LoadData(int iEvt);
54
56 void ClearEvent();
57
59 void Draw();
60
62 void DrawModel();
63
65 void DrawElossHits();
66
68 void DrawTunnelHits();
69
71 void DrawSamplers();
72
74 void DrawTrajectories();
75
76private:
79
81 EventDisplay(TString geoFileNameIn,
82 TString dataFileNameIn);
83
85 void LoadGeometry();
86
87 TString geoFileName = "";
88 TString dataFileName = "";
89
90 DataLoader *dataLoader = nullptr;
91 Event *event = nullptr;
92 TChain *eventTree = nullptr;
93 Options *options = nullptr;
94 TChain *optionsTree = nullptr;
95 Model *model = nullptr;
96 TChain *modelTree = nullptr;
97
100
101 ClassDef(EventDisplay,1);
102};
103
104#endif
Loader for a ROOT file using classes used to generate the file.
Definition: DataLoader.hh:46
Event viewer using ROOT EVE framework.
Definition: EventDisplay.hh:35
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.
Definition: EventDisplay.cc:92
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.
Definition: EventDisplay.hh:99
void Draw()
Draw all things loaded at this point.
void DrawTunnelHits()
Draw tunnel energy deposits.
Event loader.
Definition: Event.hh:50
Model loader.
Definition: Model.hh:36
Options loader.
Definition: Options.hh:36