Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
+14 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.60 2005/05/19 16:11:53 asaim Exp $
$Id: History,v 1.65 2005/11/09 10:12:31 gcosmo Exp $
-------------------------------------------------------------------
=========================================================
@@ -17,6 +17,19 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
November 9, 2005 Gabriele Cosmo (intercoms-V07-01-03)
- Removed inclusion of <strstream> from G4UImessenger.hh.
- The tag coworks with: run-V07-01-05, radioactive_decay-V07-01-00.
October 26, 2005 Koichi Murakami (intercoms-V07-01-02)
- Migration from strstream to sstream
October 20, 2005, Joseph Perl (intercoms-V07-01-01)
- Tag to co-work with vis-V07-01-05.
October 17, 2005 Jane Tinslay
- intercoms->graphics_reps migration for G4VGraphicsScene and G4VVisManager
May 19, 2005, M.Asai (intercoms-V07-00-02)
- G4UIbatch is modified so that it now aborts the execution of the macro file
(and any other parent macro files which issued this macro file) if a coomand
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIaliasList.hh,v 1.5 2003/06/16 16:55:30 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UIaliasList_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIbatch.hh,v 1.8 2005/05/19 16:11:53 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// $id$
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWith3Vector.hh,v 1.6 2004/05/16 18:42:29 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWith3VectorAndUnit.hh,v 1.7 2004/05/16 20:42:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithABool.hh,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithADouble.hh,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithADoubleAndUnit.hh,v 1.7 2004/05/16 20:42:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithAString.hh,v 1.4 2001/07/11 10:01:12 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithAnInteger.hh,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithoutParameter.hh,v 1.4 2001/07/11 10:01:13 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcommand.hh,v 1.14 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcommandStatus.hh,v 1.4 2001/10/04 23:15:27 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UIcommandStatus_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcommandTree.hh,v 1.14 2003/06/16 16:55:33 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UIcommandTree_h
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcontrolMessenger.hh,v 1.10 2002/05/15 06:51:31 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UIcontrolMessenger_h
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIdirectory.hh,v 1.4 2001/07/11 10:01:14 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UImanager.hh,v 1.20 2003/06/16 16:55:34 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UImanager_h
+2 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UImessenger.hh,v 1.6 2001/10/11 13:29:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UImessenger.hh,v 1.8 2005/11/09 10:09:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#ifndef G4UImessenger_h
+2 -5
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UIparameter.hh,v 1.7 2003/06/16 16:55:35 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIparameter.hh,v 1.8 2005/10/26 06:09:15 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ---------------------------------------------------------------------
@@ -31,9 +31,6 @@
#define G4UIparameter_h 1
#include "globals.hh"
#include <strstream>
#include "G4UItokenNum.hh"
// class description:
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIsession.hh,v 1.4 2001/07/11 10:01:14 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// $id$
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UItokenNum.hh,v 1.7 2003/06/07 16:40:48 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// G4UItokenNum.hh
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UnitsMessenger.hh,v 1.4 2001/07/11 10:01:15 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// class description
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VFlavoredParallelWorld.hh,v 1.3 2001/07/11 10:01:15 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Abstract interface for GEANT4 Flavored Parallel World.
@@ -22,7 +22,7 @@
//
//
// $Id: G4VGlobalFastSimulationManager.hh,v 1.4 2002/11/20 14:46:00 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Abstract interface for GEANT4 Global Fast Simulation Manager.
@@ -1,145 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VGraphicsScene.hh,v 1.12 2005/05/03 17:34:44 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// John Allison 19th July 1996
//
// Class Description:
// Abstract interface class for a graphics scene handler.
// It is a minimal scene handler for the GEANT4 kernel.
// See G4VSceneHandler for a fuller description. G4VSceneHandler is
// the full abstract interface to graphics systems.
#ifndef G4VGRAPHICSSCENE_HH
#define G4VGRAPHICSSCENE_HH
class G4VisAttributes;
class G4VSolid;
class G4Box;
class G4Cons;
class G4Tubs;
class G4Trd;
class G4Trap;
class G4Sphere;
class G4Para;
class G4Torus;
class G4PhysicalVolumeModel;
class G4Polycone;
class G4Polyhedra;
class G4VTrajectory;
class G4VHit;
class G4Polyline;
class G4Scale;
class G4Text;
class G4Circle;
class G4Square;
class G4Polymarker;
class G4Polyhedron;
class G4NURBS;
#include "G4Transform3D.hh"
class G4VGraphicsScene {
public: // With description
///////////////////////////////////////////////////////////////////
// Methods for adding solids to the scene handler. They
// must always be called in the triplet PreAddSolid, AddSolid and
// PostAddSolid. The transformation and visualization attributes
// must be set by the call to PreAddSolid. A possible default
// implementation is to request the solid to provide a G4Polyhedron
// or similar primitive - see, for example, G4VSceneHandler in the
// Visualization Category.
virtual void PreAddSolid (const G4Transform3D& objectTransformation,
const G4VisAttributes& visAttribs) = 0;
// objectTransformation is the transformation in the world
// coordinate system of the object about to be added, and
// visAttribs is its visualization attributes.
virtual void PostAddSolid () = 0;
virtual void AddSolid (const G4Box&) = 0;
virtual void AddSolid (const G4Cons&) = 0;
virtual void AddSolid (const G4Tubs&) = 0;
virtual void AddSolid (const G4Trd&) = 0;
virtual void AddSolid (const G4Trap&) = 0;
virtual void AddSolid (const G4Sphere&) = 0;
virtual void AddSolid (const G4Para&) = 0;
virtual void AddSolid (const G4Torus&) = 0;
virtual void AddSolid (const G4Polycone&) = 0;
virtual void AddSolid (const G4Polyhedra&) = 0;
virtual void AddSolid (const G4VSolid&) = 0; // For solids not above.
///////////////////////////////////////////////////////////////////
// Methods for adding "compound" GEANT4 objects to the scene
// handler. These methods may either (a) invoke "user code" that
// uses the "user interface", G4VVisManager (see, for example,
// G4VSceneHandler in the Visualization Category, which for
// trajectories uses G4VTrajectory::DrawTrajectory, via
// G4TrajectoriesModel in the Modeling Category) or (b) invoke
// AddPrimitives below (between calls to Begin/EndPrimitives) or (c)
// use graphics-system-specific code or (d) any combination of the
// above.
virtual void AddCompound (const G4VTrajectory&) = 0;
virtual void AddCompound (const G4VHit&) = 0;
///////////////////////////////////////////////////////////////////
// Methods for adding graphics primitives to the scene handler. A
// sequence of calls to AddPrimitive must be sandwiched between
// calls to BeginPrimitives and EndPrimitives. A sequence is any
// number of calls the have the same transformation.
virtual void BeginPrimitives
(const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
// objectTransformation is the transformation in the world
// coordinate system of the object about to be added.
virtual void EndPrimitives () = 0;
virtual void AddPrimitive (const G4Polyline&) = 0;
virtual void AddPrimitive (const G4Scale&) = 0;
virtual void AddPrimitive (const G4Text&) = 0;
virtual void AddPrimitive (const G4Circle&) = 0;
virtual void AddPrimitive (const G4Square&) = 0;
virtual void AddPrimitive (const G4Polymarker&) = 0;
virtual void AddPrimitive (const G4Polyhedron&) = 0;
virtual void AddPrimitive (const G4NURBS&) = 0;
///////////////////////////////////////////////////////////////////
// Special functions for particular models.
virtual void EstablishSpecials (G4PhysicalVolumeModel&) {}
// Used to establish any special relationships between scene and
// this particular type of model - non-pure, i.e., no requirement to
// implement. See G4PhysicalVolumeModel.hh for details.
virtual void DecommissionSpecials (G4PhysicalVolumeModel&) {}
// Used to reverse the effect of EstablishSpecials, if required.
};
#endif
-169
View File
@@ -1,169 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VVisManager.hh,v 1.10 2005/05/03 17:32:18 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// John Allison 19/Oct/1996.
//
// Class Description:
//
// G4VVisManager is an abstract interface for the GEANT4 Visualization Manager.
// The inheritance hierarchy is:
// G4VVisManager <- G4VisManager <- G4VisExecutive
//
// You may also write your own vis manager in place of G4VisExecutive.
//
// See example/novice/N02 to see how and when to instantiate
// G4VisExecutive (or your own vis manager). You should *not* access
// it directly; instead you should obtain a pointer as follows:
//
// G4VVisManager* pVVMan = G4VVisManager::GetConcreteInstance ();
//
// This ensures your code will link even if G4VisExecutive is not
// instantiated or even if not provided in a library. Please protect
// your code by testing the pointer, for example, by:
//
// if (pVVMan) pVVMan -> Draw (polyline);
//
// The Draw functions draw only "transient" objects. This is useful
// for debugging, e.g., drawing the step in your UserSteppingAction,
// since G4Steps are not kept.
//
// Note: "permanent" objects, i.e., objects which are always
// available, such as detector geometry components, or available in an
// event after tracking has finished, such as hits, digitisations and
// trajectories, can be drawn in a transient way if you wish but it is
// usually possible to draw them in a permanent way with /vis/
// commands. The advantage is that permanent objects can be redrawn,
// e.g., when you change view or viewer; transient objects get
// forgotten. Also, it is possible to write a G4VUserVisAction class
// and register it to "promote" your Draw messages to "permanent" -
// see documentation.
//
// Note that the G4Transform3D argument refers to the transformation
// of the *object*, not the transformation of the coordinate syste.
//
// Note also that where a G4VisAttributes argument is specified, it
// overrides any attributes belonging to the object itself.
#ifndef G4VVISMANAGER_HH
#define G4VVISMANAGER_HH
#include "G4Transform3D.hh"
#include "G4ThreeVector.hh" // Just a typedef Hep3Vector.
#include "G4RotationMatrix.hh" // Just a typedef HepRotation.
class G4Polyline;
class G4Text;
class G4Circle;
class G4Scale;
class G4Square;
class G4Polymarker;
class G4Polyhedron;
class G4NURBS;
class G4VSolid;
class G4VHit;
class G4VTrajectory;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4VisAttributes;
class G4VVisManager {
public: // With description
static G4VVisManager* GetConcreteInstance ();
// Returns pointer to actual visualization manager if a view is
// available for drawing, else returns null. Always check value.
public:
virtual ~G4VVisManager ();
public: // With description
///////////////////////////////////////////////////////////////////////
// Draw methods for Geant4 Visualization Primitives, useful
// for representing hits, digis, etc.
virtual void Draw (const G4Circle&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4NURBS&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4Polyhedron&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4Polyline&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4Polymarker&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4Scale&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4Square&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4Text&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
///////////////////////////////////////////////////////////////////////
// Draw methods for Geant4 Objects as if they were Visualization
// Primitives. Note that the visualization attributes needed in
// some cases override any visualization attributes that are
// associated with the object itself - thus you can, for example,
// change the colour of a physical volume.
virtual void Draw (const G4VHit&) = 0;
virtual void Draw (const G4VTrajectory&, G4int i_mode = 0) = 0;
// i_mode is a parameter that can be used to control the drawing of
// the trajectory. See, e.g., G4VTrajectory::DrawTrajectory.
virtual void Draw (const G4LogicalVolume&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4VPhysicalVolume&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
virtual void Draw (const G4VSolid&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity) = 0;
//////////////////////////////////////////////////////////////////////
// Other methods...
virtual void GeometryHasChanged () = 0;
// This is used by the run manager to notify a change of geometry.
protected:
static void SetConcreteInstance (G4VVisManager*);
static G4VVisManager* fpConcreteInstance; // Pointer to real G4VisManager.
};
#endif
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIaliasList.cc,v 1.5 2002/04/26 22:03:35 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIaliasList.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIbatch.cc,v 1.13 2005/05/19 16:40:45 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIbatch.hh"
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWith3Vector.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWith3Vector.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWith3Vector.hh"
#include <strstream>
G4UIcmdWith3Vector::G4UIcmdWith3Vector
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -21,15 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWith3VectorAndUnit.cc,v 1.7 2004/05/16 20:42:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWith3VectorAndUnit.cc,v 1.8 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWith3VectorAndUnit.hh"
#include "G4Tokenizer.hh"
#include "G4UnitsTable.hh"
#include <strstream>
#include <sstream>
G4UIcmdWith3VectorAndUnit::G4UIcmdWith3VectorAndUnit
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -57,7 +57,7 @@ G4ThreeVector G4UIcmdWith3VectorAndUnit::GetNew3VectorRawValue(const char* param
G4double vy;
G4double vz;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vx >> vy >> vz >> unts;
return G4ThreeVector(vx,vy,vz);
}
@@ -68,7 +68,7 @@ G4double G4UIcmdWith3VectorAndUnit::GetNewUnitValue(const char* paramString)
G4double vy;
G4double vz;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vx >> vy >> vz >> unts;
G4String unt = unts;
return ValueOf(unt);
@@ -80,11 +80,11 @@ G4String G4UIcmdWith3VectorAndUnit::ConvertToStringWithBestUnit(G4ThreeVector ve
G4String canList = unitParam->GetParameterCandidates();
G4Tokenizer candidateTokenizer(canList);
G4String aToken = candidateTokenizer();
char strg[120];
std::ostrstream os(strg,120);
os << G4BestUnit(vec,CategoryOf(aToken)) << '\0';
G4String st = strg;
std::ostringstream os;
os << G4BestUnit(vec,CategoryOf(aToken));
G4String st = os.str();
return st;
}
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithABool.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithABool.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithABool.hh"
#include <strstream>
G4UIcmdWithABool::G4UIcmdWithABool
(const char * theCommandPath,G4UImessenger * theMessenger)
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithADouble.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithADouble.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithADouble.hh"
#include <strstream>
G4UIcmdWithADouble::G4UIcmdWithADouble
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -21,15 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithADoubleAndUnit.cc,v 1.7 2004/05/16 20:42:37 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithADoubleAndUnit.cc,v 1.8 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithADoubleAndUnit.hh"
#include "G4Tokenizer.hh"
#include "G4UnitsTable.hh"
#include <strstream>
#include <sstream>
G4UIcmdWithADoubleAndUnit::G4UIcmdWithADoubleAndUnit
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -52,7 +52,7 @@ G4double G4UIcmdWithADoubleAndUnit::GetNewDoubleRawValue(const char* paramString
G4double vl;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vl >> unts;
return vl;
@@ -63,7 +63,7 @@ G4double G4UIcmdWithADoubleAndUnit::GetNewUnitValue(const char* paramString)
G4double vl;
char unts[30];
std::istrstream is((char*)paramString);
std::istringstream is(paramString);
is >> vl >> unts;
G4String unt = unts;
@@ -76,11 +76,10 @@ G4String G4UIcmdWithADoubleAndUnit::ConvertToStringWithBestUnit(G4double val)
G4String canList = unitParam->GetParameterCandidates();
G4Tokenizer candidateTokenizer(canList);
G4String aToken = candidateTokenizer();
char strg[60];
std::ostrstream os(strg,60);
os << G4BestUnit(val,CategoryOf(aToken)) << '\0';
std::ostringstream os;
os << G4BestUnit(val,CategoryOf(aToken));
G4String st = strg;
G4String st = os.str();
return st;
}
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithAString.cc,v 1.4 2003/06/16 16:55:41 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithAString.cc,v 1.5 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithAString.hh"
#include <strstream>
G4UIcmdWithAString::G4UIcmdWithAString
(const char * theCommandPath,G4UImessenger * theMessenger)
+2 -3
View File
@@ -21,13 +21,12 @@
// ********************************************************************
//
//
// $Id: G4UIcmdWithAnInteger.cc,v 1.6 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcmdWithAnInteger.cc,v 1.7 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
#include "G4UIcmdWithAnInteger.hh"
#include <strstream>
G4UIcmdWithAnInteger::G4UIcmdWithAnInteger
(const char * theCommandPath,G4UImessenger * theMessenger)
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcmdWithoutParameter.cc,v 1.3 2001/07/11 10:01:16 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+26 -31
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UIcommand.cc,v 1.23 2004/05/16 18:42:30 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIcommand.cc,v 1.24 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -34,6 +34,7 @@
#include "G4UnitsTable.hh"
#include "G4Tokenizer.hh"
#include "G4ios.hh"
#include <sstream>
G4UIcommand::G4UIcommand()
:messenger(0),token(IDENTIFIER),paramERR(0)
@@ -351,19 +352,17 @@ G4String G4UIcommand::ConvertToString(G4bool boolVal)
G4String G4UIcommand::ConvertToString(G4int intValue)
{
char st[20];
std::ostrstream os(st,20);
os << intValue << '\0';
G4String vl = st;
std::ostringstream os;
os << intValue;
G4String vl = os.str();
return vl;
}
G4String G4UIcommand::ConvertToString(G4double doubleValue)
{
char st[40];
std::ostrstream os(st,40);
os << doubleValue << '\0';
G4String vl = st;
std::ostringstream os;
os << doubleValue;
G4String vl = os.str();
return vl;
}
@@ -372,19 +371,17 @@ G4String G4UIcommand::ConvertToString(G4double doubleValue,const char* unitName)
G4String unt = unitName;
G4double uv = ValueOf(unitName);
char st[60];
std::ostrstream os(st,60);
os << doubleValue/uv << " " << unitName << '\0';
G4String vl = st;
std::ostringstream os;
os << doubleValue/uv << " " << unitName;
G4String vl = os.str();
return vl;
}
G4String G4UIcommand::ConvertToString(G4ThreeVector vec)
{
char st[100];
std::ostrstream os(st,100);
os << vec.x() << " " << vec.y() << " " << vec.z() << '\0';
G4String vl = st;
std::ostringstream os;
os << vec.x() << " " << vec.y() << " " << vec.z();
G4String vl = os.str();
return vl;
}
@@ -393,11 +390,10 @@ G4String G4UIcommand::ConvertToString(G4ThreeVector vec,const char* unitName)
G4String unt = unitName;
G4double uv = ValueOf(unitName);
char st[120];
std::ostrstream os(st,120);
std::ostringstream os;
os << vec.x()/uv << " " << vec.y()/uv << " " << vec.z()/uv
<< " " << unitName << '\0';
G4String vl = st;
<< " " << unitName;
G4String vl = os.str();
return vl;
}
@@ -414,7 +410,7 @@ G4bool G4UIcommand::ConvertToBool(const char* st)
G4int G4UIcommand::ConvertToInt(const char* st)
{
G4int vl;
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vl;
return vl;
}
@@ -422,7 +418,7 @@ G4int G4UIcommand::ConvertToInt(const char* st)
G4double G4UIcommand::ConvertToDouble(const char* st)
{
G4double vl;
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vl;
return vl;
}
@@ -432,7 +428,7 @@ G4double G4UIcommand::ConvertToDimensionedDouble(const char* st)
G4double vl;
char unts[30];
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vl >> unts;
G4String unt = unts;
@@ -444,7 +440,7 @@ G4ThreeVector G4UIcommand::ConvertTo3Vector(const char* st)
G4double vx;
G4double vy;
G4double vz;
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vx >> vy >> vz;
return G4ThreeVector(vx,vy,vz);
}
@@ -455,7 +451,7 @@ G4ThreeVector G4UIcommand::ConvertToDimensioned3Vector(const char* st)
G4double vy;
G4double vz;
char unts[30];
std::istrstream is((char*)st);
std::istringstream is(st);
is >> vx >> vy >> vz >> unts;
G4String unt = unts;
G4double uv = ValueOf(unt);
@@ -467,7 +463,6 @@ G4ThreeVector G4UIcommand::ConvertToDimensioned3Vector(const char* st)
#include <ctype.h> // isalpha(), toupper()
#include <strstream>
//#include "checkNewValue_debug.icc"
//#define DEBUG 1
@@ -489,7 +484,7 @@ TypeCheck(const char * t)
{
G4String aNewValue;
char type;
std::istrstream is((char*)t);
std::istringstream is(t);
for (unsigned i=0; i< parameter.size(); i++) {
is >> aNewValue;
type = toupper(parameter[i]->GetParameterType());
@@ -623,7 +618,7 @@ RangeCheck(const char* t) {
yystype result;
char type;
bp = 0; // reset buffer pointer for G4UIpGetc()
std::istrstream is((char*)t);
std::istringstream is(t);
for (unsigned i=0; i< parameter.size(); i++) {
type= toupper(parameter[i]->GetParameterType());
switch ( type ) {
@@ -1050,7 +1045,7 @@ Yylex() // reads input and returns token number, KR486
c=='e' || c=='E' || c=='+' || c=='-');
G4UIpUngetc(c);
const char* t = buf;
std::istrstream is((char*)t);
std::istringstream is(t);
if ( IsInt(buf.data(),20) ) {
is >> yylval.I;
return CONSTINT;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcommandTree.cc,v 1.12 2003/06/16 16:55:44 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIcommandTree.hh"
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIcontrolMessenger.cc,v 1.9 2002/05/15 06:51:32 asaim Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
#include <stdlib.h>
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIdirectory.cc,v 1.3 2001/07/11 10:01:16 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
+11 -12
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4UImanager.cc,v 1.29 2003/06/16 16:55:45 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UImanager.cc,v 1.30 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ---------------------------------------------------------------------
@@ -40,7 +40,7 @@
#include "G4UIaliasList.hh"
#include "G4Tokenizer.hh"
#include <strstream>
#include <sstream>
G4UImanager * G4UImanager::fUImanager = 0;
@@ -161,7 +161,7 @@ const char * aParameterName, G4bool reGet)
GetCurrentStringValue( aCommand, aParameterName, reGet );
G4int value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -173,7 +173,7 @@ G4int parameterNumber, G4bool reGet)
GetCurrentStringValue( aCommand, parameterNumber, reGet );
G4int value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -185,7 +185,7 @@ const char * aParameterName, G4bool reGet)
GetCurrentStringValue( aCommand, aParameterName, reGet );
G4double value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -197,7 +197,7 @@ G4int parameterNumber, G4bool reGet)
GetCurrentStringValue( aCommand, parameterNumber, reGet );
G4double value;
const char* t = targetParameter;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> value;
return value;
}
@@ -233,7 +233,7 @@ void G4UImanager::LoopS(const char* valueList)
c1 += " ";
c1 += parameterToken();
const char* t1 = c1;
std::istrstream is((char*)t1);
std::istringstream is(t1);
G4double d1;
G4double d2;
G4double d3;
@@ -247,10 +247,9 @@ void G4UImanager::Loop(const char * macroFile,const char * variableName,
G4String cd;
for(G4double d=initialValue;d<=finalValue;d+=stepSize)
{
char st[20];
std::ostrstream os(st,20);
os << d << '\0';
cd += st;
std::ostringstream os;
os << d;
cd += os.str();
cd += " ";
}
Foreach(macroFile,variableName,cd);
+11 -15
View File
@@ -21,17 +21,15 @@
// ********************************************************************
//
//
// $Id: G4UImessenger.cc,v 1.5 2003/06/16 16:55:46 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UImessenger.cc,v 1.6 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UImessenger.hh"
#include "G4UImanager.hh"
#include "G4UIcommand.hh"
#include <string.h>
#include "G4ios.hh"
#include <strstream>
#include <sstream>
G4UImessenger::G4UImessenger() { }
@@ -53,18 +51,16 @@ G4bool G4UImessenger::operator == (const G4UImessenger& messenger) const {
G4String G4UImessenger::ItoS(G4int i)
{
char defVal[20];
std::ostrstream os(defVal,20);
os << i << '\0';
return G4String(defVal);
std::ostringstream os;
os << i;
return G4String(os.str());
}
G4String G4UImessenger::DtoS(G4double a)
{
char defVal[40];
std::ostrstream os(defVal,40);
os << a << '\0';
return G4String(defVal);
std::ostringstream os;
os << a;
return G4String(os.str());
}
G4String G4UImessenger::BtoS(G4bool b)
@@ -78,7 +74,7 @@ G4int G4UImessenger::StoI(G4String s)
{
G4int vl;
const char* t = s;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> vl;
return vl;
}
@@ -87,7 +83,7 @@ G4double G4UImessenger::StoD(G4String s)
{
G4double vl;
const char* t = s;
std::istrstream is((char*)t);
std::istringstream is(t);
is >> vl;
return vl;
}
+13 -14
View File
@@ -21,16 +21,17 @@
// ********************************************************************
//
//
// $Id: G4UIparameter.cc,v 1.12 2003/06/16 16:55:47 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4UIparameter.cc,v 1.13 2005/10/26 06:10:22 kmura Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
#include "G4UIparameter.hh"
#include "G4UIcommandStatus.hh"
#include "G4Tokenizer.hh"
#include "G4ios.hh"
#include <sstream>
G4UIparameter::G4UIparameter():paramERR(0)
{
G4String nullString;
@@ -108,18 +109,16 @@ void G4UIparameter::List()
void G4UIparameter::SetDefaultValue(G4int theDefaultValue)
{
char defVal[20];
std::ostrstream os(defVal,20);
os << theDefaultValue << '\0';
defaultValue = defVal;
std::ostringstream os;
os << theDefaultValue;
defaultValue = os.str();
}
void G4UIparameter::SetDefaultValue(G4double theDefaultValue)
{
char defVal[20];
std::ostrstream os(defVal,20);
os << theDefaultValue << '\0';
defaultValue = defVal;
std::ostringstream os;
os << theDefaultValue;
defaultValue = os.str();
}
@@ -158,7 +157,7 @@ G4int G4UIparameter::
RangeCheck(const char* newValue) {
yystype result;
bp = 0; // reset buffer pointer for G4UIpGetc()
std::istrstream is((char*)newValue);
std::istringstream is(newValue);
char type = toupper( parameterType );
switch (type) {
case 'D': { is >> newVal.D; } break;
@@ -674,7 +673,7 @@ Yylex() // reads input and returns token number KR486
c=='e' || c=='E' || c=='+' || c=='-');
G4UIpUngetc(c);
const char* t = buf;
std::istrstream is((char*)t);
std::istringstream is(t);
if ( IsInt(buf.data(),20) ) {
is >> yylval.I;
return CONSTINT;
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UIsession.cc,v 1.6 2003/06/16 16:55:48 gunter Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// ---------------------------------------------------------------------
+1 -1
View File
@@ -22,7 +22,7 @@
//
//
// $Id: G4UnitsMessenger.cc,v 1.6 2005/05/03 17:30:29 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
@@ -22,7 +22,7 @@
//
//
// $Id: G4VGlobalFastSimulationManager.cc,v 1.4 2002/11/20 14:46:01 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// Abstract interface for GEANT4 Global Fast Simulation Manager.
-45
View File
@@ -1,45 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * This code implementation is the intellectual property of the *
// * GEANT4 collaboration. *
// * By copying, distributing or modifying the Program (or any work *
// * based on the Program) you indicate your acceptance of this *
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: G4VVisManager.cc,v 1.5 2002/11/20 14:46:01 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
//
// Abstract interface for GEANT4 Visualization Manager.
// John Allison 19/Oct/1996.
#include "G4VVisManager.hh"
G4VVisManager::~G4VVisManager () {}
G4VVisManager* G4VVisManager::fpConcreteInstance = 0;
G4VVisManager* G4VVisManager::GetConcreteInstance ()
{
return fpConcreteInstance;
}
void G4VVisManager::SetConcreteInstance (G4VVisManager* m)
{
fpConcreteInstance = m;
}