Import Geant4 11.3.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2024-06-28 13:08:51 +02:00
parent f7b23877ed
commit e58e650b32
5232 changed files with 239416 additions and 244360 deletions
@@ -35,6 +35,9 @@
#include <cctype>
class G4UIparameter;
class G4UIcommand;
namespace G4UIparsing
{
// Convert G4String to value of type T
@@ -308,6 +311,13 @@ inline G4int CompareDouble(G4double arg1, G4int op, G4double arg2, G4int& errCod
return result;
}
// --------------------------------------------------------------------
// Return true if parameter is within range expression value
G4bool RangeCheck(const G4UIparameter& p, const char* value);
// Return true if command's parameters are within range expression value
G4bool RangeCheck(const G4UIcommand& p, const char* value);
} // namespace G4UIparsing
#endif
@@ -23,54 +23,54 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// G4ProfilerMessenger
// G4UItokenNum
//
// Class description
// Description:
//
// This class is the messenger of the class which maintain the profiling
// controls (located in global/management/include/G4Profiler.hh).
// In general, it forwards to the argument parser provided by timemory.
// Namespace with enumerator of tokens
// Author: J.Madsen, 12 November 2020
// Author: Makoto Asai, 1998
// --------------------------------------------------------------------
#ifndef G4ProfilerMessenger_hh
#define G4ProfilerMessenger_hh 1
#ifndef G4UItokenNum_hh
#define G4UItokenNum_hh 1
#include "G4Profiler.hh"
#include "G4UImessenger.hh"
#include "globals.hh"
class G4UIdirectory;
class G4UIcmdWithAString;
class G4UIcmdWithABool;
class G4ProfilerMessenger : public G4UImessenger
namespace G4UItokenNum
{
public:
G4ProfilerMessenger();
~G4ProfilerMessenger() override;
G4ProfilerMessenger(const G4ProfilerMessenger&) = delete;
G4ProfilerMessenger& operator=(const G4ProfilerMessenger&) = delete;
G4ProfilerMessenger(G4ProfilerMessenger&&) = default;
G4ProfilerMessenger& operator=(G4ProfilerMessenger&&) = default;
void SetNewValue(G4UIcommand*, G4String) override;
private:
using stringcmd_pair = std::pair<G4UIcmdWithAString*, std::string>;
using boolcmd_pair = std::pair<G4UIcmdWithABool*, std::string>;
using directory_array = std::array<G4UIdirectory*, G4ProfileType::TypeEnd>;
using stringcmd_array = std::array<stringcmd_pair, G4ProfileType::TypeEnd>;
using boolcmd_array = std::array<boolcmd_pair, G4ProfileType::TypeEnd>;
using boolcmd_vector = std::vector<boolcmd_pair>;
G4UIdirectory* profileDirectory;
G4UIdirectory* profileOutputDirectory;
directory_array profileTypeDirs;
boolcmd_array profileEnableCmds;
boolcmd_vector profileGeneralCmds;
stringcmd_array profileCompCmds;
enum tokenNum
{
NONE = 0,
IDENTIFIER = 257,
CONSTINT = 258,
CONSTDOUBLE = 259,
CONSTCHAR = 260,
CONSTSTRING = 261,
GT = 262,
GE = 263,
LT = 264,
LE = 265,
EQ = 266,
NE = 267,
// LOGICALNOT = 268,
CONSTLONG = 268,
LOGICALOR = 269,
LOGICALAND = 270,
SCAREAMER = 33,
LPAREN = 40,
PLUS = 43,
MINUS = 45
};
struct yystype
{
tokenNum type{tokenNum::NONE};
G4double D{0.0};
G4int I{0};
G4long L{0};
char C{' '};
G4String S;
};
} // namespace G4UItokenNum
#endif