// 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;
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;
fTransportationManager->SetNavigatorForTracking(newnav);
}
else {
- cerr << "ERROR: Could not find the actual G4Navigator" << G4endl;
+ G4cerr << "ERROR: Could not find the actual G4Navigator" << G4endl;
abort();
}
#endif
//open file for output
- ofstream fout("flukaMat.inp");
+ G4std::ofstream fout("flukaMat.inp");
//PhysicalVolumeStore, Volume and MaterialTable pointers
G4PhysicalVolumeStore * pVolStore = G4PhysicalVolumeStore::GetInstance();
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;
// 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);
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
-#include <iostream.h>
+//#include <iostream.h>
#include <FluggNavigator.hh>
FluggNavigator* FGeometryInit::getNavigatorForTracking() {
#include "WrapUtils.hh"
-
#include "FGeometryInit.hh"
-#include <iostream.h>
-#include <iomanip.h>
////////////////////////////////////////////////////////////////////////
// StepAndLocation
////////////////////////////////////////////////////////////////////////
// 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;
}
////////////////////////////////////////////////////////////////////////
// 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,
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
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)
else
os << setw10 << N;
- os << name << endl;
+ os << name << G4endl;
return os;
}
////////////////////////////////////////////////////////////////////////
// PrintCompund
////////////////////////////////////////////////////////////////////////
-ostream& PrintCompound(ostream& os, const char* title,
+G4std::ostream& PrintCompound(G4std::ostream& os, const char* title,
G4int count,
const char* name,
G4double fraction,
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)
#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
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,