Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4GlobalMagFieldMessenger.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: G4GlobalMagFieldMessenger.hh 66536 2012-12-19 14:32:36Z ihrivnac $
27 //
28 // class G4GlobalMagFieldMessenger
29 //
30 // Class description:
31 //
32 // Global uniform magnetic field messenger class.
33 //
34 // It defines UI commands:
35 // - /globalField/setValue vx vy vz unit
36 // - /globalField/verbose level
37 //
38 // It creates/deletes the global uniform magnetic field and
39 // activates/inactivates it according to the set field value.
40 // The field value can be changed either interactively via
41 // the UI command or via SetFieldValue() function.
42 
43 // Author: Ivana Hrivnacova, 28/08/2013 (ivana@ipno.in2p3.fr)
44 // --------------------------------------------------------------------
45 #ifndef G4GlobalMagFieldMessenger_hh
46 #define G4GlobalMagFieldMessenger_hh 1
47 
48 #include "globals.hh"
49 #include "G4UImessenger.hh"
50 
51 class G4UniformMagField;
52 class G4UIdirectory;
55 
57 {
58  public: // with description
59 
62 
63  virtual void SetNewValue(G4UIcommand*, G4String);
64 
65  void SetFieldValue(const G4ThreeVector& value);
67 
68  inline void SetVerboseLevel(G4int verboseLevel);
69  inline G4int GetVerboseLevel() const;
70 
71  private:
72 
73  void SetField(const G4ThreeVector& value, const G4String& inFunction);
74 
75  G4UniformMagField* fMagField;
76  G4int fVerboseLevel;
77 
78  G4UIdirectory* fDirectory;
79  G4UIcmdWith3VectorAndUnit* fSetValueCmd;
80  G4UIcmdWithAnInteger* fSetVerboseCmd;
81 };
82 
83 // inline functions
84 
86 { fVerboseLevel = verboseLevel; }
87 
89 { return fVerboseLevel; }
90 
91 #endif
void SetVerboseLevel(G4int verboseLevel)
CLHEP::Hep3Vector G4ThreeVector
G4GlobalMagFieldMessenger(const G4ThreeVector &value=G4ThreeVector())
int G4int
Definition: G4Types.hh:78
virtual void SetNewValue(G4UIcommand *, G4String)
void SetFieldValue(const G4ThreeVector &value)
G4ThreeVector GetFieldValue() const
const XML_Char int const XML_Char * value