BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSOutputLoader.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 BDSOUTPUTLOADER_H
20#define BDSOUTPUTLOADER_H
21
22#include "globals.hh" // geant4 types / globals
23
24namespace GMAD {
25 class Beam;
26 class BeamBase;
27 class Options;
28 class OptionsBase;
29}
30
34class TFile;
35class TTree;
36
44{
45public:
46 explicit BDSOutputLoader(const G4String& filePath);
47 virtual ~BDSOutputLoader();
48
49 inline G4int DataVersion() const {return dataVersion;}
50 GMAD::OptionsBase OptionsBaseClass();
52
53 GMAD::BeamBase BeamBaseClass();
55
56 G4String SeedState(G4int eventNumber = 0);
57
58protected:
59 TFile* file;
60 G4int dataVersion;
61 G4bool badFilePath;
62 G4bool rootEventFile;
63
64 BDSOutputROOTEventBeam* localBeam;
65 BDSOutputROOTEventOptions* localOptions;
66 BDSOutputROOTEventInfo* localEventSummary;
67
68 TTree* beamTree;
69 TTree* optionsTree;
70 TTree* eventTree;
71
72private:
73 BDSOutputLoader() = delete;
74 BDSOutputLoader(const BDSOutputLoader&) = delete;
75 BDSOutputLoader& operator=(const BDSOutputLoader&) = delete;
76};
77
78#endif
Loader of ROOT Event output for recreating events.
Class to store all beam options for a BDSIM run.
Information pertaining to an individual event.
Class to store all options for a BDSIM run.
Beam loader.
Definition: Beam.hh:37
Options for a beam distribution.
Definition: beamBase.h:35
Beam class.
Definition: beam.h:44
Basic options class independent of Geant4.
Definition: optionsBase.h:36
Options class.
Definition: options.h:44
Options loader.
Definition: Options.hh:36
Parser namespace for GMAD language. Combination of Geant4 and MAD.