Import Geant4 10.4.1 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 105924 2017-08-29 12:28:09Z gcosmo $
|
||||
$Id: History 108676 2018-02-27 07:38:33Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,18 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
|
||||
February 26th, 2018 Alexander Howard (procbiasing-V10-03-04)
|
||||
- G4ImportanceConfigurator: cleaned up unnecessary G4cout and removed
|
||||
copy of G4String - thanks to Gabriele
|
||||
|
||||
February 21st, 2018 Alexander Howard
|
||||
- G4ImportanceConfigurator: put back clear() in the destructor
|
||||
|
||||
February 21st, 2018 Alexander Howard
|
||||
- G4ImportanceConfigurator: introduced AutoLock (G4Mutex) to protect
|
||||
instantiation of the biasing process against a threadrace
|
||||
|
||||
August 29th, 2017 Gabriele Cosmo (procbiasing-V10-03-03)
|
||||
- Removed duplicate class definition G4TrackTerminator.hh, which is part
|
||||
of the processes/transportation module.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History 103005 2017-03-08 08:08:35Z gcosmo $
|
||||
$Id: History 108676 2018-02-27 07:38:33Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -18,6 +18,17 @@ committal in the CVS repository !
|
||||
----------------------------------------------------------
|
||||
|
||||
|
||||
February 26th, 2018 A.Howard
|
||||
- G4ImportanceConfigurator: cleaned up unnecessary G4cout and removed
|
||||
copy of G4String - thanks to Gabriele
|
||||
|
||||
February 21st, 2018 A.Howard
|
||||
- G4ImportanceConfigurator: put back clear in the destructor
|
||||
|
||||
February 21st, 2018 A.Howard
|
||||
- G4ImportanceConfigurator: introduced AutoLock (G4Mutex) to protect
|
||||
instantiation of the biasing process against a threadrace
|
||||
|
||||
March 7th, 2017 A.Howard
|
||||
- G4GeometrySampler: removed unnecessary ClearSampling from the destructor
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ImportanceConfigurator.hh 77477 2013-11-25 09:42:24Z gcosmo $
|
||||
// $Id: G4ImportanceConfigurator.hh 108676 2018-02-27 07:38:33Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ImportanceConfigurator
|
||||
@@ -60,7 +60,7 @@ public: // with description
|
||||
const G4VImportanceAlgorithm *ialg,
|
||||
G4bool paraflag);
|
||||
|
||||
G4ImportanceConfigurator(const G4String worldvolumeName,
|
||||
G4ImportanceConfigurator(const G4String &worldvolumeName,
|
||||
const G4String &particlename,
|
||||
G4VIStore &istore,
|
||||
const G4VImportanceAlgorithm *ialg,
|
||||
@@ -70,7 +70,7 @@ public: // with description
|
||||
virtual void Configure(G4VSamplerConfigurator *preConf);
|
||||
virtual const G4VTrackTerminator *GetTrackTerminator() const;
|
||||
|
||||
void SetWorldName(G4String Name);
|
||||
void SetWorldName(const G4String& Name);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ImportanceConfigurator.cc 105159 2017-07-14 09:17:32Z gcosmo $
|
||||
// $Id: G4ImportanceConfigurator.cc 108676 2018-02-27 07:38:33Z gcosmo $
|
||||
//
|
||||
// ----------------------------------------------------------------------
|
||||
// Class G4ImportanceConfigurator
|
||||
@@ -39,6 +39,13 @@
|
||||
#include "G4ImportanceAlgorithm.hh"
|
||||
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4AutoLock.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
namespace {
|
||||
G4Mutex BiasConfigMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
#endif
|
||||
|
||||
G4ImportanceConfigurator::
|
||||
G4ImportanceConfigurator(const G4VPhysicalVolume* worldvolume,
|
||||
@@ -57,7 +64,7 @@ G4ImportanceConfigurator(const G4VPhysicalVolume* worldvolume,
|
||||
{;}
|
||||
|
||||
G4ImportanceConfigurator::
|
||||
G4ImportanceConfigurator(G4String worldvolumeName,
|
||||
G4ImportanceConfigurator(const G4String &worldvolumeName,
|
||||
const G4String &particlename,
|
||||
G4VIStore &istore,
|
||||
const G4VImportanceAlgorithm *ialg, G4bool para)
|
||||
@@ -71,7 +78,7 @@ G4ImportanceConfigurator(G4String worldvolumeName,
|
||||
paraflag(para)
|
||||
{
|
||||
fWorld = G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
|
||||
if(paraflag) fWorld = G4TransportationManager::GetTransportationManager()->GetParallelWorld(fWorldName);
|
||||
if(paraflag) fWorld = G4TransportationManager::GetTransportationManager()->GetParallelWorld(fWorldName);
|
||||
}
|
||||
|
||||
G4ImportanceConfigurator::~G4ImportanceConfigurator()
|
||||
@@ -97,10 +104,15 @@ G4ImportanceConfigurator::Configure(G4VSamplerConfigurator *preConf)
|
||||
terminator = preConf->GetTrackTerminator();
|
||||
};
|
||||
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
G4AutoLock l(&BiasConfigMutex);
|
||||
#endif
|
||||
fImportanceProcess =
|
||||
new G4ImportanceProcess(*fIalgorithm,
|
||||
fIStore,
|
||||
terminator,"ImportanceProcess",paraflag);
|
||||
|
||||
if (!fImportanceProcess)
|
||||
{
|
||||
G4Exception("G4ImportanceConfigurator::Configure()",
|
||||
@@ -110,10 +122,13 @@ G4ImportanceConfigurator::Configure(G4VSamplerConfigurator *preConf)
|
||||
|
||||
// G4cout << "G4ImportanceConfigurator:: setting parallel World " << paraflag << G4endl;
|
||||
if(paraflag) fImportanceProcess->SetParallelWorld(fWorld->GetName());
|
||||
#ifdef G4MULTITHREADED
|
||||
l.unlock();
|
||||
// G4MUTEXUNLOCK(&G4ImportanceConfigurator::BiasConfigMutex);
|
||||
#endif
|
||||
// if(paraflag) fImportanceProcess->SetParallelWorld(fWorldName);
|
||||
// G4cout << "G4ImportanceConfigurator:: set " << paraflag << " name: " << fWorld->GetName() << G4endl;
|
||||
// getchar();
|
||||
|
||||
fPlacer.AddProcessAsSecondDoIt(fImportanceProcess);
|
||||
}
|
||||
|
||||
@@ -123,7 +138,8 @@ GetTrackTerminator() const
|
||||
return fImportanceProcess;
|
||||
}
|
||||
|
||||
void G4ImportanceConfigurator::SetWorldName(G4String name)
|
||||
void G4ImportanceConfigurator::SetWorldName(const G4String& name)
|
||||
{
|
||||
G4cout << " G4ImportanceConfigurator:: setting world name: " << name << G4endl;
|
||||
fWorldName = name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user