Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -14,6 +14,26 @@ introduced in the code and keeptrack of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
17-Oct-2016, Michel Maire (phys-ctor-fact-V10-02-04)
|
||||
- add README
|
||||
|
||||
29-Sep-2016, Robert Hatcher (phys-ctor-fact-V10-02-03)
|
||||
- Reviewed changes in current context, propose w/ minimal changes
|
||||
|
||||
03-Jun-2016, Robert Hatcher (phys-ctor-fact-V10-02-02)
|
||||
- Require use of declaring and referencing macros to have
|
||||
a trailing semicolon; for case where macro expands to a
|
||||
namespace block, deal with eating up the ";"
|
||||
|
||||
26-May-2016, Robert Hatcher (phys-ctor-fact-V10-02-01)
|
||||
- Implement G4_REFERENCE_PHYSCONSTR_FACTORY_NS in case physics
|
||||
ctor lives in a namespace
|
||||
|
||||
10-May-2016, Robert Hatcher (phys-ctor-fact-V10-02-00)
|
||||
- Reinstate use of G4_REFERENCE_PHYSCONSTR_FACTORY so that registry works
|
||||
in the case of static library builds, even without forcing linker
|
||||
to load whole library (which is not possible for MS Visual Studio)
|
||||
|
||||
05-Nov-2014, Alberto Ribon (phys-ctor-fact-V10-01-00)
|
||||
- Replaced neutron_hp/ with particle_hp/
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
$Id:$
|
||||
-------------------------------------------------------------------
|
||||
|
||||
|
||||
G4PhysicsConstructorFactory
|
||||
---------------------------
|
||||
|
||||
G4PhysicsConstructorRegistry
|
||||
----------------------------
|
||||
|
||||
@@ -62,16 +62,32 @@ public:
|
||||
|
||||
// support for phys constructors defined within a namespace
|
||||
// a bit tricky due to cpp macro expansion and the use of "::"
|
||||
// use G4_DECLARE_PHYSCONSTR_FACTORY_NS( myns::MyProc, myns, MyProc ) // without trailing ";"
|
||||
// use G4_DECLARE_PHYSCONSTR_FACTORY_NS( myns::MyProc, myns, MyProc );
|
||||
#define G4_DECLARE_PHYSCONSTR_FACTORY_NS( physics_constructor, nsname, pcbase ) \
|
||||
namespace nsname { \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& pcbase##Factory = G4PhysicsConstructorFactory<physics_constructor>(#physics_constructor); \
|
||||
}
|
||||
} \
|
||||
typedef int xyzzy__LINE__
|
||||
// eat trailing semicolon using silly typedef
|
||||
|
||||
// REFERENCE (rather than DECLARE) when the physics constructor if it is part
|
||||
// of a static library. No need to include the header (DECLARE needs this
|
||||
// to build the code), we just need to make a reference in order to pull
|
||||
// the compilation unit static variable from the library and cause it
|
||||
// to be initialized (and thus self-register)
|
||||
|
||||
#define G4_REFERENCE_PHYSCONSTR_FACTORY(physics_constructor) \
|
||||
class physics_constructor; \
|
||||
extern const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##Factory; \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& physics_constructor##FactoryRef = physics_constructor##Factory
|
||||
|
||||
#define G4_REFERENCE_PHYSCONSTR_FACTORY_NS( physics_constructor, nsname, pcbase ) \
|
||||
namespace nsname { \
|
||||
class pcbase; \
|
||||
extern const G4PhysicsConstructorFactory<physics_constructor>& pcbase##Factory; \
|
||||
const G4PhysicsConstructorFactory<physics_constructor>& pcbase##FactoryRef = pcbase##Factory; \
|
||||
} \
|
||||
typedef int xyzzy__LINE__
|
||||
// eat trailing semicolon using silly typedef
|
||||
|
||||
#endif
|
||||
|
||||
@@ -162,3 +162,72 @@ void G4PhysicsConstructorRegistry::PrintAvailablePhysicsConstructors() const
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// External reference to phy ctor factories for running with 'static'
|
||||
// libraries to pull the references of the declared factories into the
|
||||
// same compilation unit as the registry itself.
|
||||
// No harm having them in the non-static case.
|
||||
//
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ChargeExchangePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4DecayPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAChemistry);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option1);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option2);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option3);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option4);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option5);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmDNAPhysics_option7);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmExtraPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLivermorePolarizedPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmLowEPPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmPenelopePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsGS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsSS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysicsWVI);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option1);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option2);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option3);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4EmStandardPhysics_option4);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4GenericBiasingPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronDElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsHP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsLEND);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronElasticPhysicsXS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronHElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronInelasticQBBC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_ATL);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_HP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTFP_BERT_TRV);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsFTF_BIC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsINCLXX);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsNuBeam);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BERT_HP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_AllHP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_BIC_HP);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGSP_FTFP_BERT);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsQGS_BIC);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4HadronPhysicsShielding);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ImportanceBiasing);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonBinaryCascadePhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonElasticPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonINCLXXPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4IonQMDPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronCrossSectionXS);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4NeutronTrackingCut);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4OpticalPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4ParallelWorldPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4RadioactiveDecayPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4SpinDecayPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StepLimiterPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4StoppingPhysics);
|
||||
G4_REFERENCE_PHYSCONSTR_FACTORY(G4WeightWindowBiasing);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user