Modifications to have it compiled under gcc 3.2
authoriglez2 <iglez2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Nov 2002 11:00:21 +0000 (11:00 +0000)
committeriglez2 <iglez2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 Nov 2002 11:00:21 +0000 (11:00 +0000)
Flugg/FGeometryInit.cxx
Flugg/FGeometryInit.icc
Flugg/WrapUtils.cxx
Flugg/WrapUtils.hh

index b1600bd2de96cf4bcda33973e0c2192e44890693..7c88b8675a05b0a2a22f2aa6e96a88a6499cbd9a 100644 (file)
@@ -2,11 +2,11 @@
 // Flugg tag 
 // modified 17/06/02: by I. Gonzalez. STL migration
 
+//#include <stdio.h>
+//#include <iomanip.h>
 #include "FGeometryInit.hh"
 #include "FluggNavigator.hh"
 #include "WrapUtils.hh"
-#include <stdio.h>
-#include <iomanip.h>
 
 FGeometryInit * FGeometryInit::flagInstance=0;
 
@@ -29,14 +29,15 @@ FGeometryInit* FGeometryInit::GetInstance()  {
 FGeometryInit::FGeometryInit():
   fDetector(0),
   fFieldManager(0),
+  fTransportationManager(G4TransportationManager::GetTransportationManager()),
   myTopNode(0),
   ptrGeoMan(0),
   ptrArray(0),
   ptrTouchHist(0),
   ptrOldNavHist(0),
   ptrTempNavHist(0),
-  ptrJrLtGeant(0),
-  fTransportationManager(G4TransportationManager::GetTransportationManager()){
+  ptrJrLtGeant(0)
+{
 
 #ifdef G4GEOMETRY_DEBUG
   G4cout << "==> Flugg FGeometryInit::FGeometryInit()" << G4endl;
@@ -48,7 +49,7 @@ FGeometryInit::FGeometryInit():
     fTransportationManager->SetNavigatorForTracking(newnav);
   }
   else {
-    cerr << "ERROR: Could not find the actual G4Navigator" << G4endl;
+    G4cerr << "ERROR: Could not find the actual G4Navigator" << G4endl;
     abort();
   }
 
@@ -292,7 +293,7 @@ void FGeometryInit::createFlukaMatFile() {
 #endif 
   
   //open file for output
-  ofstream fout("flukaMat.inp");  
+  G4std::ofstream fout("flukaMat.inp");  
   
   //PhysicalVolumeStore, Volume and MaterialTable pointers
   G4PhysicalVolumeStore * pVolStore = G4PhysicalVolumeStore::GetInstance();
@@ -589,7 +590,7 @@ void FGeometryInit::createFlukaMatFile() {
   G4int lastFlagField = 0;
   
   //open file for volume-index correspondence
-  ofstream vout("Volumes_index.inp");
+  G4std::ofstream vout("Volumes_index.inp");
   
   //... and write title
   vout << "*" << G4endl;
@@ -674,7 +675,7 @@ void FGeometryInit::createFlukaMatFile() {
       
       // begin material card           
       fout << setw10 << "ASSIGNMAT ";
-      fout.setf(0,G4std::ios::floatfield);     
+      fout.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);  
       fout << setw10 << setfixed
           << G4std::setprecision(1) << G4double(indexMat);
       fout << setw10 << G4double(indexRegFluka);
@@ -741,7 +742,7 @@ void FGeometryInit::createFlukaMatFile() {
     fout << setw10 << "";
     fout << setw10 << "";
     fout << setw10 << "";
-    fout.setf(0,G4std::ios::floatfield);
+    fout.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
     fout << setw10 << setfixed
         << G4std::setprecision(4) << Bx
         << setw10 << By
index ba83861f5d89246b6e54e5cff954185c90ccb359..7d034a2f91746eadb9ef4267740d627eda20b0b3 100644 (file)
@@ -1,4 +1,4 @@
-#include <iostream.h>
+//#include <iostream.h>
 #include <FluggNavigator.hh>
 
 FluggNavigator* FGeometryInit::getNavigatorForTracking() {
index a00f99e84ed83cfd3f6c69b915992f6f0b67d76c..ac0f8ca38407eb6e625956b0888b68107594c4a4 100644 (file)
@@ -1,8 +1,5 @@
 #include "WrapUtils.hh"
-
 #include "FGeometryInit.hh"
-#include <iostream.h>
-#include <iomanip.h>
 
 ////////////////////////////////////////////////////////////////////////
 // StepAndLocation
@@ -172,13 +169,13 @@ bool EqualHistories(const G4NavigationHistory* ptrFirstHist,
 ////////////////////////////////////////////////////////////////////////
 // PrintHeader
 ////////////////////////////////////////////////////////////////////////
-ostream& PrintHeader(ostream& os, const char* title) {
+G4std::ostream& PrintHeader(G4std::ostream& os, const char* title) {
   os << "*\n" << "*\n" << "*\n";
   os << "*********************  " << title << " *********************\n"
      << "*\n";
   os << "*...+....1....+....2....+....3....+....4....+....5....+....6....+....7..."
-     << endl;
-  os << "*" << endl;
+     << G4endl;
+  os << "*" << G4endl;
 
   return os;
 }
@@ -186,7 +183,7 @@ ostream& PrintHeader(ostream& os, const char* title) {
 ////////////////////////////////////////////////////////////////////////
 // PrintMaterial
 ////////////////////////////////////////////////////////////////////////
-ostream& PrintMaterial(ostream& os, const char* title,
+G4std::ostream& PrintMaterial(G4std::ostream& os, const char* title,
                       G4double Z, G4double A,
                       G4double density,
                       G4double index,
@@ -195,7 +192,7 @@ ostream& PrintMaterial(ostream& os, const char* title,
 
   os << setw10 << title;
 
-  os.setf(0,G4std::ios::floatfield);
+  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
   if (Z < 0)
     os << setw10 << " ";
   else
@@ -210,13 +207,13 @@ ostream& PrintMaterial(ostream& os, const char* title,
     os << setw10 << G4std::setprecision(3)
        << A;
 
-  os.setf(0,G4std::ios::floatfield);
+  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
   os << setw10 
      << setscientific
      << G4std::setprecision(3) 
      << density;
 
-  os.setf(0,G4std::ios::floatfield);
+  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
   os << setw10 
      << setfixed
      << G4std::setprecision(1) 
@@ -229,7 +226,7 @@ ostream& PrintMaterial(ostream& os, const char* title,
   else
     os << setw10 << N;
 
-  os << name << endl;
+  os << name << G4endl;
 
   return os;
 }
@@ -238,7 +235,7 @@ ostream& PrintMaterial(ostream& os, const char* title,
 ////////////////////////////////////////////////////////////////////////
 // PrintCompund
 ////////////////////////////////////////////////////////////////////////
-ostream& PrintCompound(ostream& os, const char* title,
+G4std::ostream& PrintCompound(G4std::ostream& os, const char* title,
                       G4int count,
                       const char* name,
                       G4double fraction,
@@ -246,16 +243,16 @@ ostream& PrintCompound(ostream& os, const char* title,
 
   
   if(count==3) {
-    os << name << endl;
+    os << name << G4endl;
     os << setw10 << "COMPOUND  ";
   }
   
-  os.setf(0,G4std::ios::floatfield);
+  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
   os << setw10
      << setscientific
      << G4std::setprecision(2)
      << fraction;
-  os.setf(0,G4std::ios::floatfield);
+  os.setf(static_cast<G4std::ios::fmtflags>(0),G4std::ios::floatfield);
   os << setw10
      << setfixed
      << G4std::setprecision(1)
index fddb924b1fa113936e0a1e63a57dfa0dbf7e05dc..801581ade9d00e986bdf456ffd1bf939fb7f3eeb 100644 (file)
 #ifndef WrapUtils_hh
 #define WrapUtils_hh 1
 
+//#include <iostream.h>
+#include <iomanip>
 #include "G4NavigationHistory.hh"
 #include "G4ThreeVector.hh"
-#include <iostream.h>
-#include <iomanip.h>
 
 //Forward declarations
 
@@ -31,17 +31,17 @@ bool EqualHistories(const G4NavigationHistory*,
                    const G4NavigationHistory*);
 
 // Commonly printed things used in FGeometryInit.cc
-inline ostream& setw10(ostream& os) { return os << G4std::setw(10);}
-inline ostream& setscientific(ostream& os) { return os << G4std::setiosflags(G4std::ios::scientific);}
-inline ostream& setfixed(ostream& os) { return os << G4std::setiosflags(G4std::ios::fixed);}
-ostream& PrintHeader(ostream& os, const char* title);
-ostream& PrintMaterial(ostream& os, const char* title,
+inline G4std::ostream& setw10(G4std::ostream& os) { return os << G4std::setw(10);}
+inline G4std::ostream& setscientific(G4std::ostream& os) { return os << G4std::setiosflags(G4std::ios::scientific);}
+inline G4std::ostream& setfixed(G4std::ostream& os) { return os << G4std::setiosflags(G4std::ios::fixed);}
+G4std::ostream& PrintHeader(G4std::ostream& os, const char* title);
+G4std::ostream& PrintMaterial(G4std::ostream& os, const char* title,
                       G4double Z, G4double A,
                       G4double density,
                       G4double index,
                       G4double N,
                       const char* name);
-ostream& PrintCompound(ostream& os, const char* title,
+G4std::ostream& PrintCompound(G4std::ostream& os, const char* title,
                       G4int count,
                       const char* name,
                       G4double fraction,