BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSSurvey.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 BDSSURVEY_H
19#define BDSSURVEY_H
20
21#include "globals.hh" // geant4 types / globals
22
23#include <fstream>
24#include <vector>
25
26class BDSBeamline;
29
38{
39public:
40 explicit BDSSurvey(const G4String& filename);
41 BDSSurvey() = delete;
42 BDSSurvey(const BDSSurvey&) = delete;
43 BDSSurvey& operator=(const BDSSurvey&) = delete;
44 ~BDSSurvey();
45
47 void Write(BDSBeamlineElement* beamlineElement);
48
50 void Write(BDSBeamline* beamline);
51
52private:
54 void WriteHeader();
55
57 std::ofstream survey;
58
63
65 std::vector<G4String> magnetKeys;
66
67 const int gp;
68};
69
70#endif
A class that holds a fully constructed BDSAcceleratorComponent as well as any information relevant to...
A vector of BDSBeamlineElement instances - a beamline.
Efficient storage of magnet strengths.
A class of functions to output Geant4/Mokka/BDSIM parameters for the beamline.
Definition BDSSurvey.hh:38
const int gp
General precision - number of characters / item.
Definition BDSSurvey.hh:67
BDSMagnetStrength const * nullStrength
Definition BDSSurvey.hh:62
std::ofstream survey
Output file stream.
Definition BDSSurvey.hh:57
std::vector< G4String > magnetKeys
Cache of all the possible magnet strength parameters.
Definition BDSSurvey.hh:65
void WriteHeader()
Write header.
Definition BDSSurvey.cc:54
void Write(BDSBeamlineElement *beamlineElement)
write line
Definition BDSSurvey.cc:109