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
+8
View File
@@ -15,6 +15,14 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
04 June, 03 G.Cosmo (persistency-V05-01-01)
- Fixes for inclusion of <strstream> in G4MCTSimParticle.cc and
G4MCTSimVertex.cc in view of the g4std wrappers migration.
- Fixed warning on SUN-CC for G4PersistencyCenterMessenger.
30 May, 03 G.Cosmo (persistency-V05-01-00)
- Fixed few pedantic warnings...
05 February, 03 G.Cosmo (persistency-V05-00-00)
- Corrected inclusion of headers for constant and units from CLHEP.
+6 -6
View File
@@ -27,15 +27,15 @@
#ifndef DCIO_CATALOG_HH
#define DCIO_CATALOG_HH 1
#include "g4std/map"
#include <map>
#include "G4Types.hh"
#include "G4VPDigitsCollectionIO.hh"
class G4VDCIOentry;
typedef G4std::map<G4std::string, G4VDCIOentry*, G4std::less<G4std::string> > DCIOmap;
typedef std::map<std::string, G4VDCIOentry*, std::less<std::string> > DCIOmap;
typedef G4std::map<G4std::string, G4VPDigitsCollectionIO*, G4std::less<G4std::string> > DCIOstore;
typedef std::map<std::string, G4VPDigitsCollectionIO*, std::less<std::string> > DCIOstore;
// Class Description:
// Catalog for the I/O manager of digits collection for each detector.
@@ -62,16 +62,16 @@ class G4DCIOcatalog
void RegisterDCIOmanager(G4VPDigitsCollectionIO* d);
// Register I/O manager
G4VDCIOentry* GetEntry(G4std::string name);
G4VDCIOentry* GetEntry(std::string name);
// Returns the I/O manager entry
G4VPDigitsCollectionIO* GetDCIOmanager(G4std::string name);
G4VPDigitsCollectionIO* GetDCIOmanager(std::string name);
// Returns the registered I/O manager entry
void PrintEntries();
// Prints the list of I/O manager entries
G4std::string CurrentDCIOmanager();
std::string CurrentDCIOmanager();
// Returns the list of I/O managers
void PrintDCIOmanager();
+2 -2
View File
@@ -41,7 +41,7 @@ template <class T> class G4DCIOentryT
: public G4VDCIOentry
{
public: // With description
G4DCIOentryT<T>(G4std::string n)
G4DCIOentryT<T>(std::string n)
: G4VDCIOentry(n), f_manager(0)
{
if ( m_verbose > 2 ) {
@@ -55,7 +55,7 @@ template <class T> class G4DCIOentryT
// Destructor
public: // With description
void CreateDCIOmanager(G4std::string detName, G4std::string colName)
void CreateDCIOmanager(std::string detName, std::string colName)
{
if ( f_manager == 0 ) {
f_manager = new T( detName, colName );
@@ -36,7 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <string>
#include "g4std/iostream"
#include <iostream>
// Class Description:
@@ -52,22 +52,22 @@ class G4FileUtilities
// Destructor
public: // With description
G4bool FileExists(const G4std::string file);
G4bool FileExists(const std::string file);
// checks if the "file" exists. returns true if it does.
G4std::string StrErrNo() const { return ::strerror(errno); };
std::string StrErrNo() const { return ::strerror(errno); };
// returns the error message of the last system call as string.
int Shell(G4std::string s) { return ::system(s.c_str()); };
int Shell(std::string s) { return ::system(s.c_str()); };
// execute the shell command. returns zero if success.
int CopyFile(const G4std::string srcFile, const G4std::string dstFile);
int CopyFile(const std::string srcFile, const std::string dstFile);
// copies the "srcFile" to "dstFile". returns zero if success.
int DeleteFile(const G4std::string file, const G4std::string option);
int DeleteFile(const std::string file, const std::string option);
// deletes the "file" with the "option". returns zero if success.
G4std::string GetEnv(const G4std::string env) { return ::getenv(env.c_str()); };
std::string GetEnv(const std::string env) { return ::getenv(env.c_str()); };
// retuns the value of environment variable as string.
}; // End of class G4FileUtilities
+6 -6
View File
@@ -27,15 +27,15 @@
#ifndef HCIO_CATALOG_HH
#define HCIO_CATALOG_HH 1
#include "g4std/map"
#include <map>
#include "G4Types.hh"
#include "G4VPHitsCollectionIO.hh"
class G4VHCIOentry;
typedef G4std::map<G4std::string, G4VHCIOentry*, G4std::less<G4std::string> > HCIOmap;
typedef std::map<std::string, G4VHCIOentry*, std::less<std::string> > HCIOmap;
typedef G4std::map<G4std::string, G4VPHitsCollectionIO*, G4std::less<G4std::string> > HCIOstore;
typedef std::map<std::string, G4VPHitsCollectionIO*, std::less<std::string> > HCIOstore;
// Class Description:
// Catalog for the I/O manager of hits collection for each detector.
@@ -62,16 +62,16 @@ class G4HCIOcatalog
void RegisterHCIOmanager(G4VPHitsCollectionIO* d);
// Register I/O manager
G4VHCIOentry* GetEntry(G4std::string name);
G4VHCIOentry* GetEntry(std::string name);
// Returns the I/O manager entry
G4VPHitsCollectionIO* GetHCIOmanager(G4std::string name);
G4VPHitsCollectionIO* GetHCIOmanager(std::string name);
// Returns the registered I/O manager entry
void PrintEntries();
// Prints the list of I/O manager entries
G4std::string CurrentHCIOmanager();
std::string CurrentHCIOmanager();
// Returns the list of I/O managers
void PrintHCIOmanager();
+2 -2
View File
@@ -41,7 +41,7 @@ template <class T> class G4HCIOentryT
: public G4VHCIOentry
{
public: // With description
G4HCIOentryT<T>(G4std::string n)
G4HCIOentryT<T>(std::string n)
: G4VHCIOentry(n), f_manager(0)
{
if ( m_verbose > 2 ) {
@@ -55,7 +55,7 @@ template <class T> class G4HCIOentryT
// Destructor
public: // With description
void CreateHCIOmanager(G4std::string detName, G4std::string colName)
void CreateHCIOmanager(std::string detName, std::string colName)
{
if ( f_manager == 0 ) {
f_manager = new T( detName, colName );
+5 -5
View File
@@ -26,8 +26,8 @@
#define MCT_EVENT_H
#include "G4Types.hh"
#include "g4std/iostream"
#include "g4std/map"
#include <iostream>
#include <map>
#include "G4MCTGenParticle.hh"
// ====================================================================
@@ -41,8 +41,8 @@ class G4MCTSimParticle;
class HepMC::GenEvent;
class HepMC::GenParticle;
typedef G4std::map<G4MCTGenParticle, G4MCTSimParticle*> MCTGen2SimParticleMap;
typedef G4std::map<G4MCTSimParticle*, G4MCTGenParticle> MCTSim2GenParticleMap;
typedef std::map<G4MCTGenParticle, G4MCTSimParticle*> MCTGen2SimParticleMap;
typedef std::map<G4MCTSimParticle*, G4MCTGenParticle> MCTSim2GenParticleMap;
class G4MCTEvent {
protected:
@@ -76,7 +76,7 @@ public:
int AddPrimaryPair(const G4MCTGenParticle& genp,
const G4MCTSimParticle* simp);
void ClearEvent();
void Print(G4std::ostream& ostr= G4std::cout) const;
void Print(std::ostream& ostr= std::cout) const;
// iterators
typedef MCTGen2SimParticleMap::const_iterator genprimary_const_iterator;
+4 -4
View File
@@ -26,8 +26,8 @@
#define MCT_GEN_EVENT_H
#include "G4Types.hh"
#include "g4std/iostream"
#include "g4std/vector"
#include <iostream>
#include <vector>
#include "CLHEP/HepMC/GenEvent.h"
// ====================================================================
@@ -38,7 +38,7 @@
class G4MCTGenEvent {
protected:
G4std::vector<HepMC::GenEvent*> eventList;
std::vector<HepMC::GenEvent*> eventList;
public:
G4MCTGenEvent();
@@ -55,7 +55,7 @@ public:
void ClearEvent();
void Print(G4std::ostream& ostr= G4std::cout) const;
void Print(std::ostream& ostr= std::cout) const;
};
// ====================================================================
@@ -26,14 +26,14 @@
#define MCT_GEN_PARTICLE_H
#include "G4Types.hh"
#include "g4std/algorithm"
#include <algorithm>
#include "CLHEP/HepMC/GenEvent.h"
#include "CLHEP/HepMC/GenParticle.h"
class HepMC::GenEvent;
class HepMC::GenParticle;
typedef G4std::pair<HepMC::GenEvent*, HepMC::GenParticle*> G4MCTGenParticle;
typedef std::pair<HepMC::GenEvent*, HepMC::GenParticle*> G4MCTGenParticle;
#endif
+6 -6
View File
@@ -26,9 +26,9 @@
#define MCT_SIM_EVENT_H
#include "G4Types.hh"
#include "g4std/iostream"
#include "g4std/vector"
#include "g4std/map"
#include <iostream>
#include <vector>
#include <map>
// ====================================================================
//
@@ -38,8 +38,8 @@
class G4MCTSimParticle;
class G4MCTSimVertex;
typedef G4std::map<int, G4MCTSimParticle*> G4MCTSimParticleContainer;
typedef G4std::vector<G4MCTSimVertex*> G4MCTSimVertexContainer;
typedef std::map<int, G4MCTSimParticle*> G4MCTSimParticleContainer;
typedef std::vector<G4MCTSimVertex*> G4MCTSimVertexContainer;
class G4MCTSimEvent {
protected:
@@ -65,7 +65,7 @@ public:
void BuildVertexContainer();
void ClearEvent();
void Print(G4std::ostream& ostr= G4std::cout) const;
void Print(std::ostream& ostr= std::cout) const;
// iterators
typedef G4MCTSimParticleContainer::iterator particle_iterator;
+13 -13
View File
@@ -26,9 +26,9 @@
#define MCT_SIM_PARTICLE_H
#include "G4Types.hh"
#include "g4std/vector"
#include <vector>
#include <string>
#include "g4std/iostream"
#include <iostream>
#include "CLHEP/Vector/LorentzVector.h"
// ====================================================================
@@ -39,14 +39,14 @@
class G4MCTSimVertex;
class G4MCTSimParticle;
typedef G4std::vector<G4MCTSimParticle*> SimParticleList;
typedef std::vector<G4MCTSimParticle*> SimParticleList;
class G4MCTSimParticle {
protected:
G4MCTSimParticle* parentParticle;
G4std::vector<G4MCTSimParticle*> associatedParticleList;
std::vector<G4MCTSimParticle*> associatedParticleList;
G4std::string name;
std::string name;
int pdgID;
int trackID;
int parentTrackID;
@@ -57,9 +57,9 @@ protected:
public:
G4MCTSimParticle();
G4MCTSimParticle(G4std::string aname, int apcode, int atid, int ptid,
G4MCTSimParticle(std::string aname, int apcode, int atid, int ptid,
const HepLorentzVector& p);
G4MCTSimParticle(G4std::string aname, int apcode, int atid, int ptid,
G4MCTSimParticle(std::string aname, int apcode, int atid, int ptid,
const HepLorentzVector& p, const G4MCTSimVertex* v);
virtual ~G4MCTSimParticle();
@@ -71,8 +71,8 @@ public:
void SetParentParticle(const G4MCTSimParticle* p);
G4MCTSimParticle* GetParentParticle() const;
void SetParticleName(G4std::string aname);
const G4std::string& GetParticleName() const;
void SetParticleName(std::string aname);
const std::string& GetParticleName() const;
void SetPdgID(int id);
int GetPdgID() const;
@@ -102,8 +102,8 @@ public:
int GetTreeLevel() const;
void SetStoreFlagToParentTree(G4bool q=true);
void Print(G4std::ostream& ostr= G4std::cout, G4bool qrevorder=false) const;
void PrintSingle(G4std::ostream& ostr= G4std::cout) const;
void Print(std::ostream& ostr= std::cout, G4bool qrevorder=false) const;
void PrintSingle(std::ostream& ostr= std::cout) const;
};
// ====================================================================
@@ -137,10 +137,10 @@ inline void G4MCTSimParticle::SetParentParticle(const G4MCTSimParticle* p)
inline G4MCTSimParticle* G4MCTSimParticle::GetParentParticle() const
{ return parentParticle; }
inline void G4MCTSimParticle::SetParticleName(G4std::string aname)
inline void G4MCTSimParticle::SetParticleName(std::string aname)
{ name= aname; }
inline const G4std::string& G4MCTSimParticle::GetParticleName() const
inline const std::string& G4MCTSimParticle::GetParticleName() const
{ return name; }
inline void G4MCTSimParticle::SetPdgID(int id) { pdgID= id; }
+15 -15
View File
@@ -26,8 +26,8 @@
#define MCT_SIM_VERTEX_H
#include "G4Types.hh"
#include "g4std/iostream"
#include "g4std/vector"
#include <iostream>
#include <vector>
#include <string>
#include "CLHEP/Vector/ThreeVector.h"
#include "G4MCTSimParticle.hh"
@@ -41,21 +41,21 @@
class G4MCTSimVertex {
private:
int inParticleTrackID;
G4std::vector<int> outParticleTrackIDList;
std::vector<int> outParticleTrackIDList;
int id; // assigned independently from G4
Hep3Vector position;
double time;
G4std::string volumeName;
std::string volumeName;
int volumeNumber;
G4std::string creatorProcessName;
std::string creatorProcessName;
G4bool storeFlag;
public:
G4MCTSimVertex();
G4MCTSimVertex(const Hep3Vector& x, double t);
G4MCTSimVertex(const Hep3Vector& x, double t,
G4std::string vname, int ncopy, G4std::string pname);
std::string vname, int ncopy, std::string pname);
~G4MCTSimVertex();
// copy constructor and assignment operator
@@ -72,14 +72,14 @@ public:
void SetTime(double t);
double GetTime() const;
void SetVolumeName(G4std::string vname);
const G4std::string& GetVolumeName() const;
void SetVolumeName(std::string vname);
const std::string& GetVolumeName() const;
void SetVolumeNumber(int n);
int GetVolumeNumber() const;
void SetCreatorProcessName(G4std::string pname);
const G4std::string& GetCreatorProcessName() const;
void SetCreatorProcessName(std::string pname);
const std::string& GetCreatorProcessName() const;
void SetStoreFlag(G4bool q);
G4bool GetStoreFlag() const;
@@ -94,7 +94,7 @@ public:
int AddOutParticle(int out);
int GetOutParticleTrackID(int i) const;
void Print(G4std::ostream& ostr= G4std::cout) const;
void Print(std::ostream& ostr= std::cout) const;
};
// ====================================================================
@@ -136,10 +136,10 @@ inline void G4MCTSimVertex::SetTime(double t)
inline double G4MCTSimVertex::GetTime() const
{ return time; }
inline void G4MCTSimVertex::SetVolumeName(G4std::string vname)
inline void G4MCTSimVertex::SetVolumeName(std::string vname)
{ volumeName= vname; }
inline const G4std::string& G4MCTSimVertex::GetVolumeName() const
inline const std::string& G4MCTSimVertex::GetVolumeName() const
{ return volumeName; }
inline void G4MCTSimVertex::SetVolumeNumber(int n)
@@ -148,10 +148,10 @@ inline void G4MCTSimVertex::SetVolumeNumber(int n)
inline int G4MCTSimVertex::GetVolumeNumber() const
{ return volumeNumber; }
inline void G4MCTSimVertex::SetCreatorProcessName(G4std::string pname)
inline void G4MCTSimVertex::SetCreatorProcessName(std::string pname)
{ creatorProcessName= pname; }
inline const G4std::string& G4MCTSimVertex::GetCreatorProcessName() const
inline const std::string& G4MCTSimVertex::GetCreatorProcessName() const
{ return creatorProcessName; }
inline void G4MCTSimVertex::SetStoreFlag(G4bool q) { storeFlag= q; }
@@ -29,8 +29,8 @@
#include "G4Types.hh"
#include <string>
#include "g4std/vector"
#include "g4std/map"
#include <vector>
#include <map>
#include "G4HCIOcatalog.hh"
#include "G4VHCIOentry.hh"
#include "G4DCIOcatalog.hh"
@@ -43,14 +43,14 @@
// Forward Declaration to avoid circular dependencies.
class G4PersistencyManager;
typedef G4std::map<G4std::string, G4PersistencyManager*,G4std::less<G4std::string> > PMap;
typedef G4std::map<int, G4std::string, G4std::less<int> > ObjMap;
typedef G4std::map<G4std::string, G4std::string, G4std::less<G4std::string> > FileMap;
typedef std::map<std::string, G4PersistencyManager*,std::less<std::string> > PMap;
typedef std::map<int, std::string, std::less<int> > ObjMap;
typedef std::map<std::string, std::string, std::less<std::string> > FileMap;
enum StoreMode { kOn, kOff, kRecycle };
typedef G4std::map<G4std::string, StoreMode, G4std::less<G4std::string> > StoreMap;
typedef G4std::map<G4std::string, G4bool, G4std::less<G4std::string> > BoolMap;
typedef std::map<std::string, StoreMode, std::less<std::string> > StoreMap;
typedef std::map<std::string, G4bool, std::less<std::string> > BoolMap;
// Forward Declarations:
class G4PersistencyCenterMessenger;
@@ -72,55 +72,55 @@ class G4PersistencyCenter
static G4PersistencyCenter* GetPersistencyCenter();
// returns the pointer of singleton G4PersistencyCenter
void SelectSystem(G4std::string systemName);
void SelectSystem(std::string systemName);
// Select the persistency package
const G4std::string CurrentSystem() { return f_currentSystemName; };
const std::string CurrentSystem() { return f_currentSystemName; };
// returns the current persistent package name
void SetHepMCObjyReaderFile(G4std::string file);
void SetHepMCObjyReaderFile(std::string file);
// Sets the name of HepMCObjyReader file name. To be called by generator.
G4std::string CurrentHepMCObjyReaderFile();
std::string CurrentHepMCObjyReaderFile();
// Sets the name of HepMCObjyReader file name. To be called by generator.
void SetStoreMode(G4std::string objName, StoreMode mode);
void SetStoreMode(std::string objName, StoreMode mode);
// Sets the object store mode. Modes are kOn, kOff or kRecycle.
void SetRetrieveMode(G4std::string objName, G4bool mode);
void SetRetrieveMode(std::string objName, G4bool mode);
// Sets the object retrieve mode. Modes are true or false.
StoreMode CurrentStoreMode(G4std::string objName);
StoreMode CurrentStoreMode(std::string objName);
// returns the current object store mode.
G4bool CurrentRetrieveMode(G4std::string objName);
G4bool CurrentRetrieveMode(std::string objName);
// returns the current object store mode.
G4bool SetWriteFile(G4std::string objName, G4std::string writeFileName);
G4bool SetWriteFile(std::string objName, std::string writeFileName);
// Sets the output filename.
G4bool SetReadFile(G4std::string objName, G4std::string readFileName);
G4bool SetReadFile(std::string objName, std::string readFileName);
// Sets the input filename.
G4std::string CurrentWriteFile(G4std::string objName);
std::string CurrentWriteFile(std::string objName);
// returns the current output filename.
G4std::string CurrentReadFile(G4std::string objName);
std::string CurrentReadFile(std::string objName);
// returns the current input filename.
G4std::string CurrentObject(G4std::string file);
std::string CurrentObject(std::string file);
// returns the current object type
void AddHCIOmanager(G4std::string detName, G4std::string colName);
void AddHCIOmanager(std::string detName, std::string colName);
// add a hits colleciton I/O manager to the catalog
G4std::string CurrentHCIOmanager();
std::string CurrentHCIOmanager();
// Returns a list of registered hits colleciton I/O managers
void AddDCIOmanager(G4std::string detName);
void AddDCIOmanager(std::string detName);
// add a digits colleciton I/O manager to the catalog
G4std::string CurrentDCIOmanager();
std::string CurrentDCIOmanager();
// Returns a list of registered digits colleciton I/O managers
void PrintAll();
@@ -129,10 +129,10 @@ class G4PersistencyCenter
G4PersistencyManager* CurrentPersistencyManager() { return f_currentManager; };
// returns the pointer of the currnet G4PersistencyManager.
void SetPersistencyManager(G4PersistencyManager* pm, G4std::string name);
void SetPersistencyManager(G4PersistencyManager* pm, std::string name);
// returns the pointer of the currnet G4PersistencyManager.
G4PersistencyManager* GetPersistencyManager(G4std::string nam);
G4PersistencyManager* GetPersistencyManager(std::string nam);
// returns the pointer of the currnet G4PersistencyManager with name.
void RegisterPersistencyManager(G4PersistencyManager* pm);
@@ -148,7 +148,7 @@ class G4PersistencyCenter
// Return verbose level.
private:
G4std::string PadString(G4std::string name, unsigned int width);
std::string PadString(std::string name, unsigned int width);
// truncate or pad a string up to the width.
private:
@@ -158,7 +158,7 @@ class G4PersistencyCenter
G4PersistencyCenterMessenger* f_theMessenger;
static G4PersistencyCenter* f_thePointer;
G4PersistencyManager* f_currentManager;
G4std::string f_currentSystemName;
std::string f_currentSystemName;
PMap f_theCatalog;
ObjMap f_wrObj;
ObjMap f_rdObj;
@@ -63,7 +63,8 @@ class G4PersistencyCenterMessenger
private:
G4PersistencyCenter* pc;
G4UIdirectory* directory;
G4UIdirectory* directory, *subdir1, *subdir2,
*subdir3, *subdir4, *subdir5;
G4UIcmdWithAnInteger* verboseCmd;
G4UIcmdWithAString* select;
G4UIcmdWithAString* regHitIO;
@@ -39,7 +39,7 @@ template <class T> class G4PersistencyManagerT
: public G4PersistencyManager
{
public: // With description
G4PersistencyManagerT(G4PersistencyCenter* pc, G4std::string n)
G4PersistencyManagerT(G4PersistencyCenter* pc, std::string n)
: G4PersistencyManager(pc, n), pm(0)
{
if ( m_verbose > 2 ) {
+7 -7
View File
@@ -37,27 +37,27 @@
class G4VDCIOentry
{
public: // With description
G4VDCIOentry(G4std::string n);
G4VDCIOentry(std::string n);
// Constructor
virtual ~G4VDCIOentry() {};
virtual ~G4VDCIOentry() {}
// Destructor
public: // With description
void SetVerboseLevel(int v) { m_verbose = v; };
void SetVerboseLevel(G4int v) { m_verbose = v; }
// Set verbose level.
G4std::string GetName() { return m_name; };
std::string GetName() { return m_name; }
// Returns the name of the DC I/O manager entry
virtual void CreateDCIOmanager(G4std::string detName, G4std::string colName) {};
virtual void CreateDCIOmanager(std::string, std::string) {}
// virtual method for creating DC I/O manager for the detector
protected:
int m_verbose;
G4int m_verbose;
private:
G4std::string m_name;
std::string m_name;
}; // End of class G4VDCIOentry
+7 -7
View File
@@ -37,27 +37,27 @@
class G4VHCIOentry
{
public: // With description
G4VHCIOentry(G4std::string n);
G4VHCIOentry(std::string n);
// Constructor
virtual ~G4VHCIOentry() {};
virtual ~G4VHCIOentry() {}
// Destructor
public: // With description
void SetVerboseLevel(int v) { m_verbose = v; };
void SetVerboseLevel(G4int v) { m_verbose = v; }
// Set verbose level.
G4std::string GetName() { return m_name; };
std::string GetName() { return m_name; }
// Returns the name of the HC I/O manager entry
virtual void CreateHCIOmanager(G4std::string detName, G4std::string colName) {};
virtual void CreateHCIOmanager(std::string, std::string) {}
// virtual method for creating HC I/O manager for the detector
protected:
int m_verbose;
G4int m_verbose;
private:
G4std::string m_name;
std::string m_name;
}; // End of class G4VHCIOentry
@@ -35,7 +35,7 @@
class G4VPDigitsCollectionIO
{
public: // With description
G4VPDigitsCollectionIO( G4std::string detName, G4std::string colName );
G4VPDigitsCollectionIO( std::string detName, std::string colName );
// Constructor
virtual ~G4VPDigitsCollectionIO() {};
@@ -55,10 +55,10 @@ class G4VPDigitsCollectionIO
G4bool operator== (const G4VPDigitsCollectionIO& right) const;
// virtual operator for comparing digit collections with names.
G4std::string DMname() { return f_detName; };
std::string DMname() { return f_detName; };
// Returns the digitizer module name.
G4std::string CollectionName() { return f_colName; };
std::string CollectionName() { return f_colName; };
// Returns the digit collection name.
void SetVerboseLevel(int v) { m_verbose = v; };
@@ -66,8 +66,8 @@ class G4VPDigitsCollectionIO
protected:
G4int m_verbose;
G4std::string f_detName;
G4std::string f_colName;
std::string f_detName;
std::string f_colName;
}; // End of class G4VPDigitsCollectionIO
@@ -35,7 +35,7 @@
class G4VPHitsCollectionIO
{
public: // With description
G4VPHitsCollectionIO( G4std::string detName, G4std::string colName );
G4VPHitsCollectionIO( std::string detName, std::string colName );
// Constructor
virtual ~G4VPHitsCollectionIO() {};
@@ -55,10 +55,10 @@ class G4VPHitsCollectionIO
G4bool operator== (const G4VPHitsCollectionIO& right) const;
// virtual operator for comparing hit collections with names.
G4std::string SDname() { return f_detName; };
std::string SDname() { return f_detName; };
// Returns the sensitive detector name.
G4std::string CollectionName() { return f_colName; };
std::string CollectionName() { return f_colName; };
// Returns the hit collection name.
void SetVerboseLevel(int v) { m_verbose = v; };
@@ -66,8 +66,8 @@ class G4VPHitsCollectionIO
protected:
G4int m_verbose;
G4std::string f_detName;
G4std::string f_colName;
std::string f_detName;
std::string f_colName;
}; // End of class G4VPHitsCollectionIO
@@ -46,10 +46,10 @@ class G4VTransactionManager
void SetVerboseLevel(int v) { m_verbose = v; };
// Set verbose level.
virtual G4bool SelectReadFile(G4std::string obj, G4std::string file)=0;
virtual G4bool SelectReadFile(std::string obj, std::string file)=0;
// Set the input file name and open it for the object type "obj".
virtual G4bool SelectWriteFile(G4std::string obj, G4std::string file)=0;
virtual G4bool SelectWriteFile(std::string obj, std::string file)=0;
// Set the output file name and open it for the object type "obj".
virtual G4bool StartUpdate()=0;
+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)
{}