Import Geant4 5.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 10:28:22 +02:00
parent fbd4999cf7
commit 4aea781e80
5454 changed files with 223141 additions and 67347 deletions
+4 -4
View File
@@ -72,7 +72,7 @@ void G4DCIOcatalog::RegisterDCIOmanager(G4VPDigitsCollectionIO* d)
}
// Implementation of GetEntry
G4VDCIOentry* G4DCIOcatalog::GetEntry(G4std::string name)
G4VDCIOentry* G4DCIOcatalog::GetEntry(std::string name)
{
if ( theCatalog.find(name) == theCatalog.end() ) {
G4cout << "Digit Collection I/O manager entry \"" << name
@@ -85,7 +85,7 @@ G4VDCIOentry* G4DCIOcatalog::GetEntry(G4std::string name)
}
// Implementation of GetDCIOmanager
G4VPDigitsCollectionIO* G4DCIOcatalog::GetDCIOmanager(G4std::string name)
G4VPDigitsCollectionIO* G4DCIOcatalog::GetDCIOmanager(std::string name)
{
if ( theStore.find(name) == theStore.end() ) {
G4cout << "Digit Collection I/O manager \"" << name
@@ -109,9 +109,9 @@ void G4DCIOcatalog::PrintEntries()
}
// Implementation of CurrentDCIOmanager
G4std::string G4DCIOcatalog::CurrentDCIOmanager()
std::string G4DCIOcatalog::CurrentDCIOmanager()
{
G4std::string list = "";
std::string list = "";
DCIOstore::const_iterator it;
for ( it=theStore.begin(); it != theStore.end(); it++ ) {
list += (*it).first + " ";
+5 -5
View File
@@ -39,7 +39,7 @@ G4FileUtilities::~G4FileUtilities()
}
// Implementation of FileExists
G4bool G4FileUtilities::FileExists(const G4std::string file)
G4bool G4FileUtilities::FileExists(const std::string file)
{
char* c = (char *) file.c_str();
@@ -54,16 +54,16 @@ G4bool G4FileUtilities::FileExists(const G4std::string file)
}
// Implementation of CopyFile
int G4FileUtilities::CopyFile(const G4std::string srcFile, const G4std::string dstFile)
int G4FileUtilities::CopyFile(const std::string srcFile, const std::string dstFile)
{
G4std::string cmd = "cp " + srcFile + " " + dstFile;
std::string cmd = "cp " + srcFile + " " + dstFile;
return Shell( cmd );
}
// Implementation of DeleteFile
int G4FileUtilities::DeleteFile(const G4std::string file, const G4std::string option)
int G4FileUtilities::DeleteFile(const std::string file, const std::string option)
{
G4std::string cmd = "rm " + option + " " + file;
std::string cmd = "rm " + option + " " + file;
return Shell( cmd );
}
+5 -5
View File
@@ -72,11 +72,11 @@ void G4HCIOcatalog::RegisterHCIOmanager(G4VPHitsCollectionIO* d)
}
// Implementation of GetEntry
G4VHCIOentry* G4HCIOcatalog::GetEntry(G4std::string name)
G4VHCIOentry* G4HCIOcatalog::GetEntry(std::string name)
{
if ( theCatalog.find(name) == theCatalog.end() ) {
G4cout << "Hit Collection I/O manager entry \"" << name
<< "\" not found!" << G4std::endl;
<< "\" not found!" << std::endl;
return 0;
} else {
G4VHCIOentry* ds = theCatalog[name];
@@ -85,7 +85,7 @@ G4VHCIOentry* G4HCIOcatalog::GetEntry(G4std::string name)
}
// Implementation of GetHCIOmanager
G4VPHitsCollectionIO* G4HCIOcatalog::GetHCIOmanager(G4std::string name)
G4VPHitsCollectionIO* G4HCIOcatalog::GetHCIOmanager(std::string name)
{
if ( theStore.find(name) == theStore.end() ) {
G4cout << "Hit Collection I/O manager \"" << name
@@ -109,9 +109,9 @@ void G4HCIOcatalog::PrintEntries()
}
// Implementation of CurrentHCIOmanager
G4std::string G4HCIOcatalog::CurrentHCIOmanager()
std::string G4HCIOcatalog::CurrentHCIOmanager()
{
G4std::string list = "";
std::string list = "";
HCIOstore::const_iterator it;
for ( it=theStore.begin(); it != theStore.end(); it++ ) {
list += (*it).first + " ";
+3 -3
View File
@@ -86,9 +86,9 @@ int G4MCTEvent::AddPrimaryPair(const G4MCTGenParticle& genp,
const G4MCTSimParticle* simp)
////////////////////////////////////////////////////////
{
gen2simParticleMap.insert(G4std::make_pair(const_cast<G4MCTGenParticle&>(genp),
gen2simParticleMap.insert(std::make_pair(const_cast<G4MCTGenParticle&>(genp),
const_cast<G4MCTSimParticle*>(simp)));
sim2genParticleMap.insert(G4std::make_pair(const_cast<G4MCTSimParticle*>(simp),
sim2genParticleMap.insert(std::make_pair(const_cast<G4MCTSimParticle*>(simp),
const_cast<G4MCTGenParticle&>(genp)));
return gen2simParticleMap.size();
@@ -107,7 +107,7 @@ void G4MCTEvent::ClearEvent()
//////////////////////////////////////////////
void G4MCTEvent::Print(G4std::ostream& ostr) const
void G4MCTEvent::Print(std::ostream& ostr) const
//////////////////////////////////////////////
{
ostr << "Event#:" << eventNumber << G4endl;
+1 -1
View File
@@ -82,7 +82,7 @@ void G4MCTGenEvent::ClearEvent()
}
////////////////////////////////////////////////////////////
void G4MCTGenEvent::Print(G4std::ostream& ostr) const
void G4MCTGenEvent::Print(std::ostream& ostr) const
////////////////////////////////////////////////////////////
{
int nev= eventList.size();
+2 -2
View File
@@ -54,7 +54,7 @@ G4bool G4MCTSimEvent::AddParticle(const G4MCTSimParticle* aparticle)
int trackID= aparticle-> GetTrackID();
int nc= particleMap.count(trackID);
if(nc==0) {
particleMap.insert(G4std::make_pair(trackID, qpart));
particleMap.insert(std::make_pair(trackID, qpart));
return true;
} else {
return false;
@@ -148,7 +148,7 @@ int G4MCTSimEvent::GetNofStoredVertices() const
/////////////////////////////////////////////////
void G4MCTSimEvent::Print(G4std::ostream& ostr) const
void G4MCTSimEvent::Print(std::ostream& ostr) const
/////////////////////////////////////////////////
{
ostr << "____________________________________________________"
+29 -28
View File
@@ -22,10 +22,11 @@
// G4MCTSimParticle.cc
//
// ====================================================================
#include "g4std/strstream"
#include "g4std/iomanip"
#include "globals.hh"
#include <strstream>
#include <iomanip>
#include "G4ios.hh"
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4MCTSimParticle.hh"
#include "G4MCTSimVertex.hh"
@@ -46,7 +47,7 @@ G4MCTSimParticle::G4MCTSimParticle()
}
/////////////////////////////////////////////////////////////
G4MCTSimParticle::G4MCTSimParticle(G4std::string aname, int apcode,
G4MCTSimParticle::G4MCTSimParticle(std::string aname, int apcode,
int atid, int ptid,
const HepLorentzVector& p)
: parentParticle(0),
@@ -59,7 +60,7 @@ G4MCTSimParticle::G4MCTSimParticle(G4std::string aname, int apcode,
}
/////////////////////////////////////////////////////////////
G4MCTSimParticle::G4MCTSimParticle(G4std::string aname, int apcode,
G4MCTSimParticle::G4MCTSimParticle(std::string aname, int apcode,
int atid, int ptid,
const HepLorentzVector& p,
const G4MCTSimVertex* v )
@@ -128,29 +129,29 @@ void G4MCTSimParticle::SetStoreFlagToParentTree(G4bool q)
//////////////////////////////////////////////////////////
void G4MCTSimParticle::PrintSingle(G4std::ostream& ostr) const
void G4MCTSimParticle::PrintSingle(std::ostream& ostr) const
//////////////////////////////////////////////////////////
{
char stp[20];
G4std::ostrstream os(stp,20);
std::ostrstream os(stp,20);
char cqp=' ';
if(storeFlag) cqp='+';
os << cqp << trackID << '\0';
G4std::string stid(stp);
ostr << G4std::setw(6) << stid;
//ostr << G4std::setw(4) << trackID;
std::string stid(stp);
ostr << std::setw(6) << stid;
//ostr << std::setw(4) << trackID;
if(primaryFlag) ostr << "*";
else ostr << " ";
ostr << "<" << G4std::setw(5) << parentTrackID;
ostr.setf(G4std::ios::fixed);
ostr << "<" << std::setw(5) << parentTrackID;
ostr.setf(std::ios::fixed);
ostr << ": P("
<< G4std::setw(7) << G4std::setprecision(3) << momentumAtVertex.x()/GeV
<< "," << G4std::setw(7) << G4std::setprecision(3)
<< std::setw(7) << std::setprecision(3) << momentumAtVertex.x()/GeV
<< "," << std::setw(7) << std::setprecision(3)
<< momentumAtVertex.y()/GeV
<< "," << G4std::setw(7) << G4std::setprecision(3)
<< "," << std::setw(7) << std::setprecision(3)
<< momentumAtVertex.z()/GeV
<< "," << G4std::setw(7) << G4std::setprecision(3)
<< "," << std::setw(7) << std::setprecision(3)
<< momentumAtVertex.e()/GeV << ") @";
ostr << name << "(" << pdgID << ")";
@@ -158,24 +159,24 @@ void G4MCTSimParticle::PrintSingle(G4std::ostream& ostr) const
ostr << " %" << vertex-> GetCreatorProcessName() << G4endl;
char stv[20];
G4std::ostrstream osv(stv,20);
std::ostrstream osv(stv,20);
char cqv=' ';
if(vertex->GetStoreFlag()) cqv='+';
osv << cqv << vertex-> GetID() << '\0';
G4std::string svid(stv);
ostr << " " << G4std::setw(6) << svid;
//ostr << " " << G4std::setw(4) << vertex-> GetID();
ostr.unsetf(G4std::ios::fixed);
ostr.setf(G4std::ios::scientific|G4std::ios::right|G4std::ios::showpoint);
ostr << "- X(" << G4std::setw(9) << G4std::setprecision(2)
std::string svid(stv);
ostr << " " << std::setw(6) << svid;
//ostr << " " << std::setw(4) << vertex-> GetID();
ostr.unsetf(std::ios::fixed);
ostr.setf(std::ios::scientific|std::ios::right|std::ios::showpoint);
ostr << "- X(" << std::setw(9) << std::setprecision(2)
<< vertex-> GetPosition().x()/mm
<< "," << G4std::setw(9) << G4std::setprecision(2)
<< "," << std::setw(9) << std::setprecision(2)
<< vertex-> GetPosition().y()/mm
<< "," << G4std::setw(9) << G4std::setprecision(2)
<< "," << std::setw(9) << std::setprecision(2)
<< vertex-> GetPosition().z()/mm
<< "," << G4std::setw(9) << G4std::setprecision(2)
<< "," << std::setw(9) << std::setprecision(2)
<< vertex-> GetTime()/ns << ")";
ostr.unsetf(G4std::ios::scientific);
ostr.unsetf(std::ios::scientific);
ostr << " @" << vertex-> GetVolumeName()
<< "-" << vertex-> GetVolumeNumber();
@@ -185,7 +186,7 @@ void G4MCTSimParticle::PrintSingle(G4std::ostream& ostr) const
}
////////////////////////////////////////////////////////////////////
void G4MCTSimParticle::Print(G4std::ostream& ostr, G4bool qrevorder) const
void G4MCTSimParticle::Print(std::ostream& ostr, G4bool qrevorder) const
////////////////////////////////////////////////////////////////////
{
PrintSingle(ostr);
+18 -17
View File
@@ -22,10 +22,11 @@
// G4MCTSimVertex.cc
//
// ====================================================================
#include "g4std/strstream"
#include "g4std/iomanip"
#include "globals.hh"
#include <strstream>
#include <iomanip>
#include "G4ios.hh"
#include <CLHEP/Units/SystemOfUnits.h>
#include "G4MCTSimParticle.hh"
#include "G4MCTSimVertex.hh"
@@ -56,7 +57,7 @@ G4MCTSimVertex::G4MCTSimVertex(const Hep3Vector& x, double t)
///////////////////////////////////////////////////////////////
G4MCTSimVertex::G4MCTSimVertex(const Hep3Vector& x, double t,
G4std::string vname, int ncopy, G4std::string pname)
std::string vname, int ncopy, std::string pname)
: inParticleTrackID(0), id(-1), position(x), time(t),
volumeName(vname), volumeNumber(ncopy),
creatorProcessName(pname), storeFlag(false)
@@ -72,35 +73,35 @@ G4MCTSimVertex::~G4MCTSimVertex()
}
//////////////////////////////////////////////////
void G4MCTSimVertex::Print(G4std::ostream& ostr) const
void G4MCTSimVertex::Print(std::ostream& ostr) const
//////////////////////////////////////////////////
{
char st[20];
G4std::ostrstream os(st,20);
std::ostrstream os(st,20);
char cq=' ';
if(storeFlag) cq='+';
os << cq << id << '\0';
G4std::string sid(st);
std::string sid(st);
ostr.unsetf(G4std::ios::fixed);
ostr.setf(G4std::ios::scientific|G4std::ios::right|G4std::ios::showpoint);
//ostr << G4std::setw(4) << id;
ostr << G4std::setw(6) << sid;
ostr << " : X(" << G4std::setw(9) << G4std::setprecision(2)
ostr.unsetf(std::ios::fixed);
ostr.setf(std::ios::scientific|std::ios::right|std::ios::showpoint);
//ostr << std::setw(4) << id;
ostr << std::setw(6) << sid;
ostr << " : X(" << std::setw(9) << std::setprecision(2)
<< position.x()/mm
<< "," << G4std::setw(9) << G4std::setprecision(2)
<< "," << std::setw(9) << std::setprecision(2)
<< position.y()/mm
<< "," << G4std::setw(9) << G4std::setprecision(2)
<< "," << std::setw(9) << std::setprecision(2)
<< position.z()/mm
<< "," << G4std::setw(9) << G4std::setprecision(2)
<< "," << std::setw(9) << std::setprecision(2)
<< time/ns << ")";
ostr.unsetf(G4std::ios::scientific);
ostr.unsetf(std::ios::scientific);
ostr << "@" << volumeName
<< "-" << volumeNumber
<< "%" << creatorProcessName
<< G4endl;
ostr << " " << G4std::setw(4) << inParticleTrackID << "-> ";
ostr << " " << std::setw(4) << inParticleTrackID << "-> ";
size_t np= outParticleTrackIDList.size();
for (size_t i=0; i<np; i++) ostr << outParticleTrackIDList[i] << ", ";
ostr << G4endl;
+25 -25
View File
@@ -89,7 +89,7 @@ G4PersistencyCenter* G4PersistencyCenter::GetPersistencyCenter()
// Implementation of SelectSystem
void G4PersistencyCenter::SelectSystem(G4std::string systemName)
void G4PersistencyCenter::SelectSystem(std::string systemName)
{
int st = 0;
@@ -107,7 +107,7 @@ void G4PersistencyCenter::SelectSystem(G4std::string systemName)
G4cout<<" G4PersistencyCenter: \"ROOT\" Persistency Package is selected."
<<G4endl;
// G4UImanager *man=G4UImanager::GetUIpointer();
// G4std::string libs="Cint:Core:Tree:Rint:Matrix:Physics:fadsROOT";
// std::string libs="Cint:Core:Tree:Rint:Matrix:Physics:fadsROOT";
// st = man->ApplyCommand("/load "+libs);
if ( st == 0 ) {
pm = GetPersistencyManager("ROOT");
@@ -117,7 +117,7 @@ void G4PersistencyCenter::SelectSystem(G4std::string systemName)
{
G4cout<<" G4PersistencyCenter: \"ODBMS\" package is selected."<<G4endl;
// G4UImanager *man=G4UImanager::GetUIpointer();
// G4std::string libs="fadsODBMS";
// std::string libs="fadsODBMS";
// st = man->ApplyCommand("/load "+libs);
if ( st == 0 ) {
pm = GetPersistencyManager("ODBMS");
@@ -131,7 +131,7 @@ void G4PersistencyCenter::SelectSystem(G4std::string systemName)
}
// Implementation of SetHepMCObjyReaderFile
void G4PersistencyCenter::SetHepMCObjyReaderFile(G4std::string file)
void G4PersistencyCenter::SetHepMCObjyReaderFile(std::string file)
{
if ( SetReadFile("HepMC", file) ) {
SetRetrieveMode("HepMC", true);
@@ -139,7 +139,7 @@ void G4PersistencyCenter::SetHepMCObjyReaderFile(G4std::string file)
}
// Implementation of CurrentHepMCObjyReaderFile
G4std::string G4PersistencyCenter::CurrentHepMCObjyReaderFile()
std::string G4PersistencyCenter::CurrentHepMCObjyReaderFile()
{
if ( CurrentRetrieveMode("HepMC") ) {
return CurrentReadFile("HepMC");
@@ -149,7 +149,7 @@ G4std::string G4PersistencyCenter::CurrentHepMCObjyReaderFile()
}
// Implementation of SetStoreMode
void G4PersistencyCenter::SetStoreMode(G4std::string objName, StoreMode mode)
void G4PersistencyCenter::SetStoreMode(std::string objName, StoreMode mode)
{
if ( (*(f_writeFileName.find(objName))).second != "" ) {
f_writeFileMode[objName] = mode;
@@ -160,7 +160,7 @@ void G4PersistencyCenter::SetStoreMode(G4std::string objName, StoreMode mode)
}
// Implementation of SetRetrieveMode
void G4PersistencyCenter::SetRetrieveMode(G4std::string objName, G4bool mode)
void G4PersistencyCenter::SetRetrieveMode(std::string objName, G4bool mode)
{
if ( (*(f_readFileName.find(objName))).second != "" ) {
f_readFileMode[objName] = mode;
@@ -171,7 +171,7 @@ void G4PersistencyCenter::SetRetrieveMode(G4std::string objName, G4bool mode)
}
// Implementation of CurrentStoreMode
StoreMode G4PersistencyCenter::CurrentStoreMode(G4std::string objName)
StoreMode G4PersistencyCenter::CurrentStoreMode(std::string objName)
{
@@ -183,7 +183,7 @@ StoreMode G4PersistencyCenter::CurrentStoreMode(G4std::string objName)
}
// Implementation of CurrentRetrieveMode
G4bool G4PersistencyCenter::CurrentRetrieveMode(G4std::string objName)
G4bool G4PersistencyCenter::CurrentRetrieveMode(std::string objName)
{
if ( (*(f_readFileName.find(objName))).second != "" ) {
return f_readFileMode[objName];
@@ -193,7 +193,7 @@ G4bool G4PersistencyCenter::CurrentRetrieveMode(G4std::string objName)
}
// Implementation of SetWriteFile
G4bool G4PersistencyCenter::SetWriteFile(G4std::string objName, G4std::string writeFileName)
G4bool G4PersistencyCenter::SetWriteFile(std::string objName, std::string writeFileName)
{
if ( (*(f_writeFileName.find(objName))).second != "" ) {
f_writeFileName[objName] = writeFileName;
@@ -206,7 +206,7 @@ G4bool G4PersistencyCenter::SetWriteFile(G4std::string objName, G4std::string wr
}
// Implementation of SetReadFile
G4bool G4PersistencyCenter::SetReadFile(G4std::string objName, G4std::string readFileName)
G4bool G4PersistencyCenter::SetReadFile(std::string objName, std::string readFileName)
{
#ifndef WIN32
if ( f_ut.FileExists(readFileName) )
@@ -224,7 +224,7 @@ G4bool G4PersistencyCenter::SetReadFile(G4std::string objName, G4std::string rea
}
// Implementation of CurrentWriteFile
G4std::string G4PersistencyCenter::CurrentWriteFile(G4std::string objName)
std::string G4PersistencyCenter::CurrentWriteFile(std::string objName)
{
if ( (*(f_writeFileName.find(objName))).second != "" ) {
return f_writeFileName[objName];
@@ -234,7 +234,7 @@ G4std::string G4PersistencyCenter::CurrentWriteFile(G4std::string objName)
}
// Implementation of CurrentReadFile
G4std::string G4PersistencyCenter::CurrentReadFile(G4std::string objName)
std::string G4PersistencyCenter::CurrentReadFile(std::string objName)
{
if ( (*(f_readFileName.find(objName))).second != "" ) {
return f_readFileName[objName];
@@ -244,7 +244,7 @@ G4std::string G4PersistencyCenter::CurrentReadFile(G4std::string objName)
}
// Implementation of CurrentObject
G4std::string G4PersistencyCenter::CurrentObject(G4std::string file)
std::string G4PersistencyCenter::CurrentObject(std::string file)
{
FileMap::iterator itr;
for ( itr = f_readFileName.begin(); itr != f_readFileName.end(); itr++ ) {
@@ -257,7 +257,7 @@ G4std::string G4PersistencyCenter::CurrentObject(G4std::string file)
}
// Implementation of AddHCIOmanager
void G4PersistencyCenter::AddHCIOmanager(G4std::string detName, G4std::string colName)
void G4PersistencyCenter::AddHCIOmanager(std::string detName, std::string colName)
{
G4HCIOcatalog* ioc = G4HCIOcatalog::GetHCIOcatalog();
@@ -271,18 +271,18 @@ void G4PersistencyCenter::AddHCIOmanager(G4std::string detName, G4std::string co
}
// Implementation of CurrentHCIOmanager
G4std::string G4PersistencyCenter::CurrentHCIOmanager()
std::string G4PersistencyCenter::CurrentHCIOmanager()
{
G4HCIOcatalog* ioc = G4HCIOcatalog::GetHCIOcatalog();
return ioc->CurrentHCIOmanager();
}
// Implementation of AddDCIOmanager
void G4PersistencyCenter::AddDCIOmanager(G4std::string detName)
void G4PersistencyCenter::AddDCIOmanager(std::string detName)
{
G4DCIOcatalog* ioc = G4DCIOcatalog::GetDCIOcatalog();
G4std::string colName = "";
std::string colName = "";
G4VDCIOentry* ioe = ioc->GetEntry(detName);
if ( ioe != 0 ) {
ioe->CreateDCIOmanager(detName, colName);
@@ -293,7 +293,7 @@ void G4PersistencyCenter::AddDCIOmanager(G4std::string detName)
}
// Implementation of CurrentDCIOmanager
G4std::string G4PersistencyCenter::CurrentDCIOmanager()
std::string G4PersistencyCenter::CurrentDCIOmanager()
{
G4DCIOcatalog* ioc = G4DCIOcatalog::GetDCIOcatalog();
return ioc->CurrentDCIOmanager();
@@ -306,8 +306,8 @@ void G4PersistencyCenter::PrintAll()
G4cout << G4endl;
ObjMap::iterator itr;
G4std::string name;
G4std::string file;
std::string name;
std::string file;
StoreMode mode;
G4cout << "Output object types and file names:" << G4endl;
@@ -372,14 +372,14 @@ void G4PersistencyCenter::PrintAll()
// Implementation of SetPersistencyManager
void G4PersistencyCenter::SetPersistencyManager(G4PersistencyManager* pm,
G4std::string name)
std::string name)
{
f_currentManager=pm;
f_currentSystemName=name;
}
// Implementation of GetPersistencyManager
G4PersistencyManager* G4PersistencyCenter::GetPersistencyManager(G4std::string nam)
G4PersistencyManager* G4PersistencyCenter::GetPersistencyManager(std::string nam)
{
if (f_theCatalog.find(nam)!=f_theCatalog.end())
return f_theCatalog[nam];
@@ -407,12 +407,12 @@ void G4PersistencyCenter::SetVerboseLevel(int v)
}
// Implementation of PadString
G4std::string G4PersistencyCenter::PadString(G4std::string name, unsigned int width)
std::string G4PersistencyCenter::PadString(std::string name, unsigned int width)
{
if ( name.length() > width ) {
return name.substr(0,width-1) + "#";
} else {
G4std::string wname = name;
std::string wname = name;
for ( unsigned int i=0; i < width-name.length(); i++) wname = wname + " ";
return wname;
}
@@ -30,11 +30,11 @@
G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter* p)
: pc(p)
{
G4std::string name = "/persistency/";
std::string name = "/persistency/";
directory=new G4UIdirectory(name.c_str());
directory->SetGuidance("Control commands for Persistency package");
G4std::string cmd = name + "verbose";
std::string cmd = name + "verbose";
verboseCmd = new G4UIcmdWithAnInteger(cmd.c_str(),this);
verboseCmd->SetGuidance("Set the verbose level of G4PersistencyManager.");
@@ -46,7 +46,7 @@ G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter*
verboseCmd->SetDefaultValue(0);
verboseCmd->SetRange("level >=0 && level <=3");
G4std::string vname = name + "select";
std::string vname = name + "select";
cmd = vname;
select = new G4UIcmdWithAString(cmd.c_str(),this);
@@ -56,16 +56,14 @@ G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter*
vname = name + "store/";
G4UIcommand* directory;
directory = new G4UIdirectory(vname.c_str());
directory->SetGuidance("Specifiy object types for store");
subdir1 = new G4UIdirectory(vname.c_str());
subdir1->SetGuidance("Specifiy object types for store");
wrObj.push_back("HepMC");
wrObj.push_back("MCTruth");
wrObj.push_back("Hits");
G4std::string guidance;
std::string guidance;
int i;
for ( i = 0; i < 3; i++ )
@@ -82,8 +80,8 @@ G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter*
}
vname += "using/";
directory = new G4UIdirectory(vname.c_str());
directory->SetGuidance("Select I/O manager for store");
subdir2 = new G4UIdirectory(vname.c_str());
subdir2->SetGuidance("Select I/O manager for store");
cmd = vname + "hitIO";
regHitIO = new G4UIcmdWithAString(cmd.c_str(),this);
@@ -91,12 +89,12 @@ G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter*
regHitIO->SetParameterName("Name of Hits I/O Manager", true, true);
vname = name + "set/";
directory = new G4UIdirectory(vname.c_str());
directory->SetGuidance("Set various parameters");
subdir3 = new G4UIdirectory(vname.c_str());
subdir3->SetGuidance("Set various parameters");
vname += "writeFile/";
directory = new G4UIdirectory(vname.c_str());
directory->SetGuidance("Set output file names for object types");
subdir4 = new G4UIdirectory(vname.c_str());
subdir4->SetGuidance("Set output file names for object types");
for ( i = 0; i < 3; i++ )
{
@@ -108,8 +106,8 @@ G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter*
}
vname = name + "set/ReadFile/";
directory = new G4UIdirectory(vname.c_str());
directory->SetGuidance("Set input file names for object types");
subdir5 = new G4UIdirectory(vname.c_str());
subdir5->SetGuidance("Set input file names for object types");
rdObj.push_back("Hits");
@@ -129,6 +127,11 @@ G4PersistencyCenterMessenger::G4PersistencyCenterMessenger(G4PersistencyCenter*
G4PersistencyCenterMessenger::~G4PersistencyCenterMessenger()
{
delete directory;
delete subdir1;
delete subdir2;
delete subdir3;
delete subdir4;
delete subdir5;
delete verboseCmd;
delete select;
delete regHitIO;
@@ -244,7 +247,7 @@ G4String G4PersistencyCenterMessenger::GetCurrentValue(G4UIcommand* command)
}
// Implementation of PopWord
G4std::string G4PersistencyCenterMessenger::PopWord(G4std::string text, int n, G4std::string delim)
std::string G4PersistencyCenterMessenger::PopWord(std::string text, int n, std::string delim)
{
if ( text.length() <= 0 ) return "";
int p = 0, p0 = 0;
@@ -27,11 +27,11 @@
#include "G4PersistencyManager.hh"
// Addtional Include:
#include "g4std/iomanip"
#include <iomanip>
#include "G4PersistencyCenter.hh"
// Implementation of Constructor #1
G4PersistencyManager::G4PersistencyManager(G4PersistencyCenter* pc, G4std::string n)
G4PersistencyManager::G4PersistencyManager(G4PersistencyCenter* pc, std::string n)
: f_pc(pc), nameMgr(n), f_is_initialized(false)
{
m_verbose = f_pc->VerboseLevel();
@@ -133,8 +133,8 @@ G4bool G4PersistencyManager::Store(const G4Event* evt)
return false;
}
G4std::string file;
G4std::string obj;
std::string file;
std::string obj;
#ifndef WIN32
@@ -313,11 +313,11 @@ G4bool G4PersistencyManager::Retrieve(G4Event*& evt)
}
G4bool st = false;
G4std::string file;
std::string file;
// Retrieve a G4EVENT
//
G4std::string obj = "Hits";
std::string obj = "Hits";
if ( f_pc->CurrentRetrieveMode(obj) == true ) {
file = f_pc->CurrentReadFile(obj);
if ( TransactionManager()->SelectReadFile(obj, file) ) {
@@ -380,11 +380,11 @@ G4bool G4PersistencyManager::Retrieve(HepMC::GenEvent*& evt, int id)
}
G4bool st = false;
G4std::string file;
std::string file;
// Retrieve a HepMC GenEvent
//
G4std::string obj = "HepMC";
std::string obj = "HepMC";
if ( f_pc->CurrentRetrieveMode(obj) == true ) {
file = f_pc->CurrentReadFile(obj);
if ( TransactionManager()->SelectReadFile(obj, file) ) {
+1 -1
View File
@@ -30,7 +30,7 @@
#include "G4DCIOcatalog.hh"
// Implementation of Constructor #1
G4VDCIOentry::G4VDCIOentry(G4std::string n)
G4VDCIOentry::G4VDCIOentry(std::string n)
: m_name(n)
{
G4DCIOcatalog* c = G4DCIOcatalog::GetDCIOcatalog();
+1 -1
View File
@@ -30,7 +30,7 @@
#include "G4HCIOcatalog.hh"
// Implementation of Constructor #1
G4VHCIOentry::G4VHCIOentry(G4std::string n)
G4VHCIOentry::G4VHCIOentry(std::string n)
: m_name(n)
{
G4HCIOcatalog* c = G4HCIOcatalog::GetHCIOcatalog();
@@ -27,8 +27,8 @@
#include "G4VPDigitsCollectionIO.hh"
// Implementation of Constructor #1
G4VPDigitsCollectionIO::G4VPDigitsCollectionIO( G4std::string detName,
G4std::string colName )
G4VPDigitsCollectionIO::G4VPDigitsCollectionIO( std::string detName,
std::string colName )
: m_verbose(0), f_detName(detName), f_colName(colName)
{}
@@ -27,8 +27,8 @@
#include "G4VPHitsCollectionIO.hh"
// Implementation of Constructor #1
G4VPHitsCollectionIO::G4VPHitsCollectionIO( G4std::string detName,
G4std::string colName )
G4VPHitsCollectionIO::G4VPHitsCollectionIO( std::string detName,
std::string colName )
: m_verbose(0), f_detName(detName), f_colName(colName)
{}