BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSOutputLoader.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 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 inline unsigned long long int NOriginalEvents() const {return nOriginalEvents;}
51 GMAD::OptionsBase OptionsBaseClass();
53
54 GMAD::BeamBase BeamBaseClass();
56
58 G4String SeedState(G4int eventNumber = 0);
59
60protected:
61 TFile* file;
62 G4int dataVersion;
63 unsigned long long int nOriginalEvents;
64 G4bool badFilePath;
65 G4bool rootEventFile;
66
67 BDSOutputROOTEventBeam* localBeam;
68 BDSOutputROOTEventOptions* localOptions;
69 BDSOutputROOTEventInfo* localEventSummary;
70
71 TTree* beamTree;
72 TTree* optionsTree;
73 TTree* eventTree;
74
75private:
76 BDSOutputLoader() = delete;
77 BDSOutputLoader(const BDSOutputLoader&) = delete;
78 BDSOutputLoader& operator=(const BDSOutputLoader&) = delete;
79};
80
81#endif
Loader of ROOT Event output for recreating events.
unsigned long long int nOriginalEvents
Cache of variable from header.
G4String SeedState(G4int eventNumber=0)
Access the seed state for a given event index in the file (0 counting).
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.