BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSMessenger.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 BDSMESSENGER_H
20#define BDSMESSENGER_H
21
22#include <string>
23
24#include "globals.hh"
25#include "G4UImessenger.hh"
26
28class G4UIcmdWithAString;
29class G4UIcmdWithoutParameter;
30class G4UIcommand;
31class G4UIdirectory;
32
39class BDSMessenger: public G4UImessenger
40{
41public:
43 virtual ~BDSMessenger();
44
45 void SetNewValue(G4UIcommand* command, G4String newValue);
46 void BeamLineList();
47 std::string BDSBeamlineElementToString(G4int iElement);
48 void ElementNameSearch(std::string name);
49 void GoToElement(const std::string& value);
50 void ElementTypeSearch(std::string type);
51 void SamplerList();
52 void ViewSamplers();
53 std::string BDSSamplerToString(G4int iSampler);
54 std::string BDSSamplerToString(std::string samplerName);
55 void ListQueries();
56
57protected:
58 G4UIdirectory* bdsDirectory;
59 G4UIdirectory* bdsBeamlineDirectory;
60 G4UIcmdWithoutParameter* beamlineListCmd;
61 G4UIcmdWithAString* elementNameSearchCmd;
62 BDSUIcmdStringInt* elementGoToCmd;
63 G4UIdirectory* bdsSamplersDirectory;
64 G4UIcmdWithoutParameter* samplerListCmd;
65 G4UIcmdWithoutParameter* samplerViewCmd;
66 G4UIcmdWithoutParameter* queryListCmd;
67};
68
69#endif
User interface commands.
Definition: BDSMessenger.hh:40
UI command with string, then optional integer argument.