BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSMySQLTable.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 BDSMYSQLTABLE_H
19#define BDSMYSQLTABLE_H
20
21#include "globals.hh"
22#include <vector>
23
25
33{
34public:
35 explicit BDSMySQLTable (G4String aTableName);
37
38 void AddVariable(G4String aVarName, G4String aType);
39
40 inline G4String GetName() const {return itsTableName;}
41 inline G4int GetNVariables() const {return itsNVariables;}
42
43 BDSMySQLVariable* GetVariable(G4String aVarName);
44 BDSMySQLVariable* GetVariable(G4int aVarN);
45
46 void Print();
47
48private:
49 G4int itsNVariables;
50 G4String itsTableName;
51 std::vector<BDSMySQLVariable*> itsVar;
52
53 //A list of valid variable types (STRING, DOUBLE, INTEGER...)
54 void SetValidVarTypes();
55 std::vector<G4String> _validVarTypes;
56 //To check is a var type is valid...
57 G4bool isValidVarType(G4String);
58};
59
60#endif
Representation of a mysql table.
A variable representation for mysql loader.