Import Geant4 8.0.0 source tree
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: Brachy.cc
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - ExDiane example
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
$Id: History,v 1.3 2005/05/03 10:05:49 allison Exp $
|
||||
$Id: History,v 1.5 2005/12/06 14:53:47 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -9,13 +9,18 @@ $Id: History,v 1.3 2005/05/03 10:05:49 allison Exp $
|
||||
Category History file
|
||||
---------------------
|
||||
|
||||
3rd May 2005 John Allison (examples-V07-00-03)
|
||||
06.12.2005 - Gabriele Cosmo
|
||||
- Trivial changes for support of CLHEP-2.0.X series.
|
||||
|
||||
29.11.2005 - Susanna Guatelli (ExDiane-V07-01-00)
|
||||
- Updated documentation.
|
||||
|
||||
03.05.2005 - John Allison (examples-V07-00-03)
|
||||
- Replaced vis manager with G4VisExecutive.
|
||||
|
||||
2.12.2004 - Gabriele Cosmo (ExDiane-V06-02-00)
|
||||
Implemented migration to <cmath>.
|
||||
02.12.2004 - Gabriele Cosmo (ExDiane-V06-02-00)
|
||||
- Implemented migration to <cmath>.
|
||||
|
||||
25.5.2004 - Susanna Guatelli
|
||||
Migration to AIDA 3.2.1 and PI 1.2.1
|
||||
Cleaning of the code for public release
|
||||
|
||||
- Migration to AIDA 3.2.1 and PI 1.2.1
|
||||
- Cleaning of the code for public release.
|
||||
|
||||
@@ -37,7 +37,7 @@ to know details about the functionality of the application:
|
||||
G4SYSTEM = linux-g++
|
||||
|
||||
- other environment variables which need to be set:
|
||||
G4LEDATA: points to low energy data base - G4EMLOW2.3
|
||||
G4LEDATA: points to low energy data base - G4EMLOW3.0
|
||||
|
||||
- download DIANE
|
||||
You need to have python 2.2 or greater.
|
||||
@@ -49,12 +49,13 @@ to know details about the functionality of the application:
|
||||
http://cern.ch/diane/download.html
|
||||
|
||||
* MANUAL INSTALLATION OF DIANE
|
||||
Make sure that you have AIDA 3.2.1, PI 1.2.1. Download them from
|
||||
Make sure that you have AIDA 3.2.1, PI 1.3.3. Download them from
|
||||
http://aida.freehep.org/
|
||||
http://www.cern.ch/PI
|
||||
Download DIANE executing this command:
|
||||
> python2 diane.installation.manager DIANE-1.0.0 download
|
||||
|
||||
Download DIANE from www.cern.ch/diane
|
||||
Documentation about how to "dianize" a Geant4 application can be found
|
||||
at www.cern.ch/diane
|
||||
------------------------------------------------------------------------
|
||||
----> 3.How to compile the example.
|
||||
|
||||
@@ -91,4 +92,4 @@ Authors: Susanna Guatelli, Kuba Moscicki
|
||||
for comments, advices, doubts and questions:
|
||||
guatelli@ge.infn.it, Jakub.Moscicki@cern.ch
|
||||
|
||||
- last modified: Susanna Guatelli and Kuba Moscicki 25/5/2004
|
||||
- last modified: Susanna Guatelli and Kuba Moscicki 29/11/2005
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstruction.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionI.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionIr.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ****************************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionLeipzig.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//Author: Susanna Guatelli
|
||||
//
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
#ifndef BrachyDetectorMessenger_h
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyEventAction.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// Code developed by:
|
||||
// S.Guatelli
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// Code developed by: Susanna Guatelli
|
||||
//
|
||||
// $Id: BrachyFactory.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyFactoryI.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyFactoryIr.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyFactoryLeipzig.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyMaterial.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomHit.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// ********************************
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ************************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhantomSD.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ********************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPhysicsList.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// **********************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorAction.hh,v 1.1 2004/05/25 07:32:35 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// ********************************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionI.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
//Author: Susanna Guatelli
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionIr.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// *************************************************
|
||||
// * *
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyRunAction.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//Author: Susanna Guatelli
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyRunMessenger.hh,v 1.2 2004/05/25 08:36:17 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//Author: Susanna Guatelli
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachySimulation.hh
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyAnalysisManager.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#ifdef G4ANALYSIS_USE
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstruction.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyPhantomSD.hh"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionI.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "BrachyDetectorConstructionI.hh"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// ****************************************
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionIr.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "BrachyDetectorConstructionIr.hh"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorConstructionLeipzig.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachyDetectorMessenger.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyEventAction.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyEventAction.hh"
|
||||
#include "G4Event.hh"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactory.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include"BrachyFactory.hh"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryI.cc,v 1.1 2004/05/25 07:32:36 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyFactoryI.hh"
|
||||
#include "BrachyPrimaryGeneratorActionI.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryIr.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "BrachyFactoryIr.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyFactoryLeipzig.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyMaterial.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "G4MaterialPropertiesTable.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// ********************************
|
||||
//
|
||||
// $Id: BrachyPhantomHit.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPhantomHit.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// ************************************
|
||||
//
|
||||
// $Id: BrachyPhantomROGeometry.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPhantomROGeometry.hh"
|
||||
#include "BrachyDummySD.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// ********************************
|
||||
//
|
||||
// $Id: BrachyPhantomSD.cc,v 1.3 2004/05/25 12:39:09 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPhantomSD.hh"
|
||||
#include "BrachyPhantomHit.hh"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// **********************************
|
||||
//
|
||||
// $Id: BrachyPhysicsList.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPhysicsList.hh"
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorAction.cc,v 1.1 2004/05/25 07:32:37 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "globals.hh"
|
||||
#include "BrachyPrimaryGeneratorAction.hh"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionI.cc,v 1.3 2004/12/02 17:37:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionI.hh"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// ********************************************
|
||||
//
|
||||
// $Id: BrachyPrimaryGeneratorActionIr.cc,v 1.3 2004/12/02 17:37:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
#include "BrachyPrimaryGeneratorActionIr.hh"
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
// *******************************
|
||||
//
|
||||
// $Id: BrachyRunAction.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#include "BrachyRunAction.hh"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// S.Guatelli
|
||||
//
|
||||
// $Id: BrachyRunMessenger.cc,v 1.2 2004/05/25 08:36:18 guatelli Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: BrachySimulation.cc
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Brachytherapy example
|
||||
@@ -76,12 +76,12 @@ BrachySimulation::~BrachySimulation()
|
||||
void BrachySimulation::setSeed(G4int sd)
|
||||
{
|
||||
seed = sd;
|
||||
HepRandom ::setTheSeed(seed);
|
||||
CLHEP::HepRandom::setTheSeed(seed);
|
||||
}
|
||||
|
||||
G4bool BrachySimulation::initialize(int ,char** )
|
||||
{
|
||||
HepRandom::setTheEngine(new RanecuEngine);
|
||||
CLHEP::HepRandom::setTheEngine(new CLHEP::RanecuEngine);
|
||||
|
||||
G4cout << "G4 initializing" << G4endl;
|
||||
|
||||
|
||||
+5
-11
@@ -1,9 +1,6 @@
|
||||
$Id: 000README,v 1.4 2004/12/03 13:33:32 gcosmo Exp $
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
ParGeant4: Geant4/TOP-C, a parallelization of Geant4
|
||||
Version 0.9
|
||||
(event-level parallelism only)
|
||||
(event-level parallelism)
|
||||
|
||||
Gene Cooperman
|
||||
Northeastern University
|
||||
@@ -90,16 +87,13 @@ New or modified files:
|
||||
src/ParRunManager.cc - ParRunManger derived from G4RunManager
|
||||
replaces Gr4RunManager::DoEventLoop w/ TOP-C parallel loop,
|
||||
Adds certain local vars of DoEventLoop as ParRunManager members
|
||||
src/ParMarshaledObj.cc - run-time utilities for marshalling
|
||||
src/ParExN02MarshaledHits.cc - marshals N02 hits (calorimeter hits)
|
||||
include/Par*.hh - Currently just ParRunManager.hh
|
||||
include/MarshaledObj.h - run-time utilities for marshalling
|
||||
include/MarshaledEx*Hit.h - marshals N02 hits (calorimeter hits)
|
||||
include/MarshaledG4*.h - marshaling routines for Geant4 data structures
|
||||
|
||||
~/slave*.out - Contains outputs of slave1, slave2, etc.
|
||||
Generated each time parallel ParN02 is executed.
|
||||
These files are specified in the file procgroup.
|
||||
thwap - A script I inherited from our N.U. systems group
|
||||
`thwap ParN02' will clobber all processes you own
|
||||
whose command line includes `ParN02' as substring.
|
||||
Handy for runaway processes when doing parallelism.
|
||||
|
||||
====================================================================
|
||||
This version passes an event number to the slave and lets the
|
||||
@@ -0,0 +1,47 @@
|
||||
The files in this directory are the files that were used to build
|
||||
../include/Marshaled*.hh . The files ../include/Marshaled*.hh contain
|
||||
marshaling (serialization) routines that are used by Parallel Geantr4.
|
||||
|
||||
Marshalgen is a package that allows one to add a small number of annotations
|
||||
to the original sequential code, in order to create marshalling or
|
||||
serialization routines. Those marshalling routines are then used
|
||||
by ParGeant4 to pass data between slave processes and the master process.
|
||||
|
||||
INPUT FILES:
|
||||
1. G4*.hh : The files *.hh are taken from Geant4. They include annotations
|
||||
(comments) that describe how to marshal individual fields of the
|
||||
given classes. These files have additional annotations that describe
|
||||
how to marshal individual fields of the given classes. For a new
|
||||
application, you have to change any references to Ex* to your
|
||||
own example/application include files. These files are then reused
|
||||
in the new Geant4 parallel application.
|
||||
2. ../include/Ex*Hit.hh : These files are the original sequential Geant4
|
||||
application files that describe the application-defined hits.
|
||||
They remain in the application include directory because they may
|
||||
depend on other files in the include directory.
|
||||
For most new parallel Geant4 applications, these files are sufficiently
|
||||
simple, that one needs only to add Marshalgen begin and end comments
|
||||
bracketing the class that needs to be marshalled, and a small number
|
||||
of annotations specifying accessor functions to get and set fields
|
||||
in the class. It may also be necessary to include marshalling
|
||||
include files, if it is necessary to marshal other Geant4 data
|
||||
structures.
|
||||
Information on how to marshal the fields, etc., is in the Marshalgen
|
||||
manual, along with the Marshalgen package:
|
||||
http://www.ccs.neu.edu/home/gene/marshalgen
|
||||
|
||||
|
||||
Marshalgen was then called on the above input files. One calls:
|
||||
./marshalgen *.hh
|
||||
./marshalgen ../include/Ex*Hit.hh
|
||||
|
||||
OUTPUT FILES:
|
||||
3. *.msh : These files are intermediate files generated automatically
|
||||
by marshalgen ( http://www.ccs.neu.edu/home/gene/marshalgen )
|
||||
These files can be deleted if desired.
|
||||
4. Marshaled*.h : These files are generated by Marshalgen. They
|
||||
include of type both MarshaledEx*.h and MarshaledG4*.h .
|
||||
(In addition, the file MarshaledObj.h is copied directly from
|
||||
the Marshalgen distribution.) These files are all copied to
|
||||
the include directory of the Geant4 parallel application.
|
||||
They provide the marshalling functions that are then used by Geant4.
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.hh,v 1.1 2004/11/22 17:39:47 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4HCofThisEvent.hh,v 1.2 2005/11/26 09:47:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCofThisEvent_h
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
// class description:
|
||||
//
|
||||
@@ -68,7 +68,7 @@ class G4HCofThisEvent
|
||||
void AddHitsCollection(G4int HCID,G4VHitsCollection * aHC);
|
||||
|
||||
private:
|
||||
G4std::vector<G4VHitsCollection*> * HC; /*MSH: ptr_as_array
|
||||
std::vector<G4VHitsCollection*> * HC; /*MSH: ptr_as_array
|
||||
[elementType: G4VHitsCollection*]
|
||||
[elementCount: { $ELE_COUNT = $THIS->GetNumberOfCollections(); }]
|
||||
[elementGet: { $ELEMENT = $THIS->GetHC($ELE_INDEX); }]
|
||||
@@ -101,7 +101,11 @@ class G4HCofThisEvent
|
||||
};
|
||||
//MSH_END
|
||||
|
||||
extern G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
#if defined G4DIGI_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
#endif
|
||||
|
||||
inline void* G4HCofThisEvent::operator new(size_t)
|
||||
{
|
||||
|
||||
@@ -10,9 +10,12 @@
|
||||
//MSH_include_end
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4HCofThisEvent.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4HCofThisEvent (G4HCofThisEvent* param) {
|
||||
|
||||
G4std::vector<G4VHitsCollection*> * HC;
|
||||
std::vector<G4VHitsCollection*> * HC;
|
||||
//FIELDMARSHAL:
|
||||
{
|
||||
int copy_off = 0;
|
||||
|
||||
@@ -32,11 +32,12 @@
|
||||
vietha 2003.05.08
|
||||
*/
|
||||
|
||||
#ifndef G4String_h
|
||||
#define G4String_h
|
||||
#ifndef __G4String
|
||||
#define __G4String
|
||||
|
||||
//MSH_BEGIN
|
||||
class G4String{
|
||||
class G4String : public std::string
|
||||
{
|
||||
int dummy; /*MSH: manual
|
||||
{ memcpy($$, param->c_str(), param->size());
|
||||
*($$+param->size()) = '\0';
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4String.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4String (G4String* param) {
|
||||
|
||||
int dummy;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4THitsCollection.hh,v 1.1 2004/11/22 17:39:47 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4THitsCollection.hh,v 1.2 2005/11/26 09:47:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4THitsCollection_h
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "G4Allocator.hh"
|
||||
#include "globals.hh"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
// class description:
|
||||
//
|
||||
@@ -64,7 +64,11 @@ class G4HitsCollection : public G4VHitsCollection
|
||||
};
|
||||
//MSH_END
|
||||
|
||||
extern G4Allocator<G4HitsCollection> anHCAllocator;
|
||||
#if defined G4DIGI_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4HitsCollection> anHCAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4HitsCollection> anHCAllocator;
|
||||
#endif
|
||||
|
||||
//MSH_BEGIN
|
||||
template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
@@ -88,15 +92,15 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
|
||||
public: // with description
|
||||
inline T* operator[](size_t i) const
|
||||
{ return (*((G4std::vector<T*>*)theCollection))[i]; }
|
||||
{ return (*((std::vector<T*>*)theCollection))[i]; }
|
||||
// Returns a pointer to a concrete hit object.
|
||||
inline G4std::vector<T*>* GetVector() const
|
||||
{ return (G4std::vector<T*>*)theCollection; }
|
||||
inline std::vector<T*>* GetVector() const
|
||||
{ return (std::vector<T*>*)theCollection; }
|
||||
// Returns a collection vector.
|
||||
inline G4int insert(T* aHit)
|
||||
{
|
||||
G4std::vector<T*>*theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*>*theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
theHitsCollection->push_back(aHit);
|
||||
return theHitsCollection->size();
|
||||
}
|
||||
@@ -104,17 +108,17 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
// collection is returned.
|
||||
inline G4int entries() const
|
||||
{
|
||||
G4std::vector<T*>*theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*>*theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
return theHitsCollection->size();
|
||||
}
|
||||
// Returns the number of hit objects stored in this collection
|
||||
|
||||
public:
|
||||
virtual G4VHit* GetHit(size_t i) const
|
||||
{ return (*((G4std::vector<T*>*)theCollection))[i]; }
|
||||
{ return (*((std::vector<T*>*)theCollection))[i]; }
|
||||
virtual size_t GetSize() const
|
||||
{ return ((G4std::vector<T*>*)theCollection)->size(); }
|
||||
{ return ((std::vector<T*>*)theCollection)->size(); }
|
||||
|
||||
// MSH_superclass : G4HitsCollection
|
||||
|
||||
@@ -135,23 +139,23 @@ template <class T> inline void G4THitsCollection<T>::operator delete(void* anHC)
|
||||
|
||||
template <class T> G4THitsCollection<T>::G4THitsCollection()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= new G4std::vector<T*>;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= new std::vector<T*>;
|
||||
theCollection = (void*)theHitsCollection;
|
||||
}
|
||||
|
||||
template <class T> G4THitsCollection<T>::G4THitsCollection(G4String detName,G4String colNam)
|
||||
: G4HitsCollection(detName,colNam)
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= new G4std::vector<T*>;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= new std::vector<T*>;
|
||||
theCollection = (void*)theHitsCollection;
|
||||
}
|
||||
|
||||
template <class T> G4THitsCollection<T>::~G4THitsCollection()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
//theHitsCollection->clearAndDestroy();
|
||||
for(size_t i=0;i<theHitsCollection->size();i++)
|
||||
{ delete (*theHitsCollection)[i]; }
|
||||
@@ -164,8 +168,8 @@ template <class T> G4int G4THitsCollection<T>::operator==(const G4THitsCollectio
|
||||
|
||||
template <class T> void G4THitsCollection<T>::DrawAllHits()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
size_t n = theHitsCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theHitsCollection)[i]->Draw(); }
|
||||
@@ -173,8 +177,8 @@ template <class T> void G4THitsCollection<T>::DrawAllHits()
|
||||
|
||||
template <class T> void G4THitsCollection<T>::PrintAllHits()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
size_t n = theHitsCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theHitsCollection)[i]->Print(); }
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4THitsCollection.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4HitsCollection (G4HitsCollection* param) {
|
||||
|
||||
void* theCollection;
|
||||
@@ -48,7 +51,7 @@
|
||||
}
|
||||
|
||||
template <class T> marshaling class MarshaledG4THitsCollection<T> (G4THitsCollection<T>* param) : public G4HitsCollection {
|
||||
int __dummy848; // marshaling code for MSH_superclass
|
||||
int __dummy569; // marshaling code for MSH_superclass
|
||||
//FIELDMARSHAL:
|
||||
{
|
||||
MarshaledG4HitsCollection marParent($THIS);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VHitsCollection.hh,v 1.1 2004/11/22 17:39:48 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VHitsCollection.hh,v 1.2 2005/11/26 09:47:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHitsCollection_h
|
||||
@@ -55,9 +55,9 @@ class G4VHitsCollection
|
||||
protected:
|
||||
|
||||
// Collection name
|
||||
G4String collectionName; /*MSH: predefined
|
||||
[elementGet: { $ELEMENT = $THIS->GetName(); }]
|
||||
[elementSet: { Shadowed_param->collectionName=$ELEMENT; }]
|
||||
G4String collectionName; /*MSH: predefined
|
||||
[elementGet: { $ELEMENT = $THIS->GetName(); }]
|
||||
[elementSet: { Shadowed_param->collectionName=$ELEMENT; }]
|
||||
*/
|
||||
|
||||
G4String SDname; /* MSH: predefined
|
||||
@@ -77,7 +77,7 @@ class G4VHitsCollection
|
||||
// GetHit and GetSize are given a default implementation here so
|
||||
// that the template G4THitsCollection can be used, but they
|
||||
// are re-implemented G4THitsCollection.
|
||||
virtual G4VHit* GetHit(size_t i) const { return 0; }
|
||||
virtual G4VHit* GetHit(size_t) const { return 0; }
|
||||
virtual size_t GetSize() const { return 0; };
|
||||
|
||||
};
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4VHitsCollection.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4VHitsCollection (G4VHitsCollection* param) {
|
||||
|
||||
G4String collectionName;
|
||||
G4String collectionName;
|
||||
//FIELDMARSHAL:
|
||||
{
|
||||
G4String $ELEMENT;
|
||||
@@ -52,11 +55,11 @@
|
||||
// no need to declare size since $SIZE is already assigned in the MARSHAL field
|
||||
|
||||
}
|
||||
int __dummy100; // marshaling code for MSH_derivedclass
|
||||
int __dummy630; // marshaling code for MSH_derivedclass
|
||||
//FIELDMARSHAL:
|
||||
{
|
||||
G4THitsCollection<ExN02TrackerHit> *aObj100 = (G4THitsCollection<ExN02TrackerHit>*)$THIS;
|
||||
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj100);
|
||||
G4THitsCollection<ExN02TrackerHit> *aObj630 = (G4THitsCollection<ExN02TrackerHit>*)$THIS;
|
||||
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj630);
|
||||
EXTEND_BUFFER(marChild.getBufferSize());
|
||||
memcpy($$,marChild.getBuffer(), marChild.getBufferSize());
|
||||
$SIZE = marChild.getBufferSize();
|
||||
|
||||
@@ -222,8 +222,8 @@ void marshal3() {
|
||||
|
||||
//Now just copy "get" functions here
|
||||
{
|
||||
G4THitsCollection<ExN02TrackerHit> *aObj100 = (G4THitsCollection<ExN02TrackerHit>*)param;
|
||||
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj100);
|
||||
G4THitsCollection<ExN02TrackerHit> *aObj630 = (G4THitsCollection<ExN02TrackerHit>*)param;
|
||||
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj630);
|
||||
EXTEND_BUFFER(marChild.getBufferSize());
|
||||
memcpy(msh_cursor,marChild.getBuffer(), marChild.getBufferSize());
|
||||
msh_currentSize = marChild.getBufferSize();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.9 2005/05/03 10:05:49 allison Exp $
|
||||
$Id: History,v 1.11 2005/11/28 11:30:55 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -15,7 +15,16 @@ track of all tags.
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
3rd May 2005 John Allison (examples-V07-00-03)
|
||||
Nov 28th, 2005 G.Cooperman - ParN02-V07-01-01
|
||||
---------------------------
|
||||
- Updated in sync with the last kernel code.
|
||||
|
||||
Nov 15th, 2005 G.Cosmo - ParN02-V07-01-00
|
||||
-----------------------
|
||||
- Migration to <sstream> from deprecated <strstream>.
|
||||
|
||||
May 3rd, 2005 J.Allison
|
||||
------------------------
|
||||
- Replaced vis manager with G4VisExecutive.
|
||||
|
||||
Nov 22nd, 2004 G.Cooperman - ParN02-V07-00-00
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# $Id: ParGNUmakefile,v 1.3 2002/03/09 09:49:55 cooperma Exp $
|
||||
# $Id: ParGNUmakefile,v 1.5 2005/12/02 07:51:43 cooperma Exp $
|
||||
# --------------------------------------------------------------
|
||||
#This file should be included in GNUmakefile of local directory.
|
||||
|
||||
#Usage: make [ to compile parallel version ]
|
||||
# make run [ to compile and run it ]
|
||||
# make run-debug [ to compile and run in gdb ]
|
||||
# make parclean [ remove intermediate and executable files ]
|
||||
# make parclean [ remove intermediate and executable files ]
|
||||
# See `run' target for parameters by which executable is called.
|
||||
# This assumes Geant4 environment vars have been defined.
|
||||
# See ../info/NEW_APP_INSTALL (number 10) for an example of setting up
|
||||
@@ -59,7 +59,7 @@ TOPC_OPTIONS = --TOPC-verbose
|
||||
EXTRALIBS=${TOPC_LIBS}
|
||||
CPPFLAGS=${TOPC_CFLAGS}
|
||||
|
||||
TIMESTAMP=${G4BINDIR}/timestamp
|
||||
TIMESTAMP=${G4BINDIR}/ParN02.timestamp
|
||||
|
||||
# Unfortunately, .../geant4.x.x/config/binmake.gmk has target:
|
||||
# $(G4BINDIR)/$(G4TARGET)
|
||||
@@ -71,11 +71,25 @@ compile:
|
||||
@ if [ "$$G4SYSTEM" = "" ]; then \
|
||||
echo '***' Environment variable G4SYSTEM not defined; \
|
||||
echo '***' Make sure G4INSTALL and G4SYSTEM are set; \
|
||||
exit 1; \
|
||||
fi
|
||||
${MAKE} G4BINDIR=${G4BINDIR} ${TIMESTAMP}
|
||||
@ if which topc-config > /dev/null; then :; \
|
||||
else \
|
||||
echo '***' topc-config is not in your path; \
|
||||
exit 1; \
|
||||
fi
|
||||
@ echo ""
|
||||
@ echo 'To run, now type "make run"'
|
||||
@ echo 'To remove built files, type "make parclean"'
|
||||
|
||||
${TIMESTAMP}: *.cc *.icc src/*.cc include/*.hh ParGNUmakefile
|
||||
# Test for presence of topc-config
|
||||
topc-config ${MEM_MODEL} --libs > /dev/null
|
||||
@ if which topc-config > /dev/null; then :; \
|
||||
else \
|
||||
echo ''; \
|
||||
echo '***' topc-config is not in your path; \
|
||||
exit 1; \
|
||||
fi
|
||||
${MAKE} all
|
||||
rm -f ${TIMESTAMP}
|
||||
echo "" > ${TIMESTAMP}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ParN02.cc,v 1.3 2005/05/03 10:21:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ParTopC.icc,v 1.1 2002/03/09 06:25:03 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// Parallel Library for Geant4
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02ChamberParameterisation.hh,v 1.3 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// A parameterisation that describes a series of boxes along Z
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02DetectorConstruction.hh,v 1.1 2002/03/05 15:21:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02DetectorMessenger.hh,v 1.2 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02EventAction.hh,v 1.1 2002/03/05 15:21:56 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02MagneticField.hh,v 1.1 2002/03/05 15:21:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//
|
||||
// A class for control of the Magnetic Field of the detector.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02PhysicsList.hh,v 1.1 2002/03/05 15:21:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02PrimaryGeneratorAction.hh,v 1.1 2002/03/05 15:21:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02RunAction.hh,v 1.1 2002/03/05 15:21:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02SteppingAction.hh,v 1.1 2002/03/05 15:21:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02SteppingVerbose.hh,v 1.1 2002/03/05 15:21:57 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// This class manages the verbose outputs in G4SteppingManager.
|
||||
// It inherits from G4SteppingVerbose.
|
||||
|
||||
@@ -21,31 +21,43 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: ExN02TrackerHit.hh,v 1.3 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 - Underground Dark Matter Detector Advanced Example
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
// For information related to this code contact: Alex Howard
|
||||
// e-mail: a.s.howard@ic.ac.uk
|
||||
// --------------------------------------------------------------
|
||||
// Comments
|
||||
//
|
||||
//
|
||||
// TrackerHit header
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#ifndef ExN02TrackerHit_h
|
||||
#define ExN02TrackerHit_h 1
|
||||
|
||||
|
||||
//MSH_include_begin
|
||||
#include "MarshaledG4String.h"
|
||||
//MSH_include_end
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
class ExN02TrackerHit : public G4VHit
|
||||
//MSH_BEGIN
|
||||
class ExN02TrackerHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
|
||||
ExN02TrackerHit();
|
||||
~ExN02TrackerHit();
|
||||
|
||||
ExN02TrackerHit(const ExN02TrackerHit&);
|
||||
const ExN02TrackerHit& operator=(const ExN02TrackerHit&);
|
||||
G4int operator==(const ExN02TrackerHit&) const;
|
||||
int operator==(const ExN02TrackerHit&) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
@@ -53,48 +65,61 @@ class ExN02TrackerHit : public G4VHit
|
||||
void Draw();
|
||||
void Print();
|
||||
|
||||
public:
|
||||
|
||||
void SetTrackID (G4int track) { trackID = track; };
|
||||
void SetChamberNb(G4int chamb) { chamberNb = chamb; };
|
||||
void SetEdep (G4double de) { edep = de; };
|
||||
void SetPos (G4ThreeVector xyz){ pos = xyz; };
|
||||
|
||||
G4int GetTrackID() { return trackID; };
|
||||
G4int GetChamberNb() { return chamberNb; };
|
||||
G4double GetEdep() { return edep; };
|
||||
G4ThreeVector GetPos(){ return pos; };
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4int trackID;
|
||||
G4int chamberNb;
|
||||
G4double edep;
|
||||
G4ThreeVector pos;
|
||||
G4ThreeVector pos; /*MSH: primitive
|
||||
[elementGet: { $ELEMENT = $THIS->GetPos(); }]
|
||||
[elementSet: { $THIS->SetPos($ELEMENT); }] */
|
||||
|
||||
G4double edep; /*MSH: primitive
|
||||
[elementGet: { $ELEMENT = $THIS->GetEdep(); }]
|
||||
[elementSet: { $THIS->SetEdep($ELEMENT); }] */
|
||||
|
||||
G4int trackID; /*MSH: primitive
|
||||
[elementGet: { $ELEMENT = $THIS->GetTrackID(); }]
|
||||
[elementSet: { $THIS->SetTrackID($ELEMENT); }] */
|
||||
|
||||
G4int chamberNb; /*MSH: primitive
|
||||
[elementGet: { $ELEMENT = $THIS->GetChamberNb(); }]
|
||||
[elementSet: { $THIS->SetChamberNb($ELEMENT); }] */
|
||||
|
||||
|
||||
public:
|
||||
|
||||
inline void SetTrackID (G4int track) {trackID = track; };
|
||||
inline void SetChamberNb(G4int chamb) {chamberNb = chamb; };
|
||||
inline void SetEdep(G4double de) {edep=de;};
|
||||
inline void SetPos(G4ThreeVector xyz) {pos=xyz;};
|
||||
|
||||
inline G4int GetTrackID() const {return trackID; };
|
||||
inline G4int GetChamberNb() const {return chamberNb; };
|
||||
inline G4double GetEdep() const {return edep;};
|
||||
inline G4ThreeVector GetPos() const {return pos;};
|
||||
|
||||
};
|
||||
//MSH_END
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
// vector collection of one type of hits
|
||||
typedef G4THitsCollection<ExN02TrackerHit> ExN02TrackerHitsCollection;
|
||||
|
||||
|
||||
extern G4Allocator<ExN02TrackerHit> ExN02TrackerHitAllocator;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void* ExN02TrackerHit::operator new(size_t)
|
||||
{
|
||||
void *aHit;
|
||||
aHit = (void *) ExN02TrackerHitAllocator.MallocSingle();
|
||||
inline void* ExN02TrackerHit::operator new(size_t) {
|
||||
void* aHit;
|
||||
aHit = (void*) ExN02TrackerHitAllocator.MallocSingle();
|
||||
return aHit;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void ExN02TrackerHit::operator delete(void *aHit)
|
||||
{
|
||||
inline void ExN02TrackerHit::operator delete(void* aHit) {
|
||||
ExN02TrackerHitAllocator.FreeSingle((ExN02TrackerHit*) aHit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02TrackerSD.hh,v 1.1 2002/03/05 15:21:58 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -222,8 +222,8 @@ void marshal3() {
|
||||
|
||||
//Now just copy "get" functions here
|
||||
{
|
||||
G4THitsCollection<ExN02TrackerHit> *aObj100 = (G4THitsCollection<ExN02TrackerHit>*)param;
|
||||
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj100);
|
||||
G4THitsCollection<ExN02TrackerHit> *aObj293 = (G4THitsCollection<ExN02TrackerHit>*)param;
|
||||
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj293);
|
||||
EXTEND_BUFFER(marChild.getBufferSize());
|
||||
memcpy(msh_cursor,marChild.getBuffer(), marChild.getBufferSize());
|
||||
msh_currentSize = marChild.getBufferSize();
|
||||
|
||||
@@ -1,13 +1,26 @@
|
||||
/**********************************************************************
|
||||
* Parallel Library for Geant4 *
|
||||
* Include file with Base Class of Marshalgen *
|
||||
* Copyright (c) 2001 Gene Cooperman <gene@ccs.neu.edu> *
|
||||
* *
|
||||
* This library is free software distributed under the GNU *
|
||||
* Lesser General Public License. See the file COPYING for details. *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2.1 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library (see file COPYING); if not, write *
|
||||
* to the Free Software Foundation, Inc., 59 Temple Place, Suite *
|
||||
* 330, Boston, MA 02111-1307 USA, or contact Gene Cooperman *
|
||||
* <gene@ccs.neu.edu>. *
|
||||
**********************************************************************/
|
||||
|
||||
#ifndef PARMARSHALEDOBJ_H
|
||||
#define PARMARSHALEDOBJ_H
|
||||
#ifndef MARSHALEDOBJ_H
|
||||
#define MARSHALEDOBJ_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -111,14 +124,14 @@ class MarshaledObj {
|
||||
char* msh_field_begin;
|
||||
|
||||
// msh_size contains the total size of msh_buffer. i.e.,
|
||||
int msh_size;
|
||||
size_t msh_size;
|
||||
|
||||
// msh_cursor points to the next field to be marshaled.
|
||||
char *msh_cursor;
|
||||
|
||||
// msh_extent is the total allocated space for msh_buffer.
|
||||
// msh_extent is always >= msh_size
|
||||
int msh_extent;
|
||||
size_t msh_extent;
|
||||
|
||||
bool msh_isUnmarshalDone; //Is unmarshaling done yet?
|
||||
|
||||
@@ -130,7 +143,7 @@ class MarshaledObj {
|
||||
}
|
||||
}
|
||||
|
||||
void resizeBuffer(int new_size ) {
|
||||
void resizeBuffer(size_t new_size ) {
|
||||
int msh_displacement = msh_cursor - msh_buffer;
|
||||
int field_displacement = msh_field_begin - msh_buffer;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: ParRunManager.hh,v 1.2 2002/06/06 17:05:02 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// Parallel Library for Geant4
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02ChamberParameterisation.cc,v 1.2 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02DetectorConstruction.cc,v 1.2 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02DetectorMessenger.cc,v 1.3 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02EventAction.cc,v 1.1 2002/03/05 15:22:00 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02MagneticField.cc,v 1.1 2002/03/05 15:22:00 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
// User Field class implementation.
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02PhysicsList.cc,v 1.3 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02PrimaryGeneratorAction.cc,v 1.1 2002/03/05 15:22:01 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02RunAction.cc,v 1.1 2002/03/05 15:22:01 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02SteppingAction.cc,v 1.1 2002/03/05 15:22:01 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02SteppingVerbose.cc,v 1.3 2003/12/03 14:15:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02TrackerHit.cc,v 1.2 2003/07/04 15:36:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: ExN02TrackerSD.cc,v 1.2 2003/07/04 15:36:51 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
|
||||
#include "G4Timer.hh"
|
||||
|
||||
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
|
||||
#include "Randomize.hh"
|
||||
@@ -53,7 +51,10 @@
|
||||
#include "MarshaledG4HCofThisEvent.h"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include <strstream>
|
||||
|
||||
#include <sstream> // Geant4 8.x and beyond
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
/*
|
||||
* The TopC call backs are implemented by using the 5 static data members to store
|
||||
@@ -80,6 +81,7 @@ TOPC_ACTION ParRunManager::MyCheckEventResult( void * input_buf, void *buf ) {
|
||||
|
||||
static void trace_event_input( void *input ) {
|
||||
//G4cout << "Event " << *(G4int *)input << G4endl;
|
||||
input = NULL; // Stop C++ from complaining about unused parameter
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -98,17 +100,19 @@ void ParRunManager::DoEventLoop( G4int n_event, const char* macroFile, G4int n_s
|
||||
return;
|
||||
#endif
|
||||
|
||||
if ( verboseLevel > 0 ) { timer->Start(); }
|
||||
|
||||
if(verboseLevel>0)
|
||||
{ timer->Start(); }
|
||||
|
||||
G4String msg;
|
||||
if ( macroFile != 0 ) {
|
||||
if ( n_select < 0 ) n_select = n_event;
|
||||
if(macroFile!=0)
|
||||
{
|
||||
if(n_select<0) n_select = n_event;
|
||||
msg = "/control/execute ";
|
||||
msg += macroFile;
|
||||
} else {
|
||||
n_select = -1;
|
||||
}
|
||||
else
|
||||
{ n_select = -1; }
|
||||
|
||||
|
||||
// BeginOfEventAction() and EndOfEventAction() would normally be
|
||||
// called inside G4EventManager::ProcessOneEvent() in ParRunManager::DoEvent
|
||||
@@ -176,8 +180,8 @@ TOPC_BUF ParRunManager::DoEvent( void *input_buf )
|
||||
// removed for Geant4.6
|
||||
// stateManager->SetNewState(G4State_EventProc);
|
||||
|
||||
currentEvent = GenerateEvent( i_event );
|
||||
eventManager->ProcessOneEvent( currentEvent );
|
||||
currentEvent = GenerateEvent(i_event);
|
||||
eventManager->ProcessOneEvent(currentEvent);
|
||||
|
||||
G4HCofThisEvent* HCE = currentEvent->GetHCofThisEvent();
|
||||
|
||||
@@ -199,7 +203,7 @@ TOPC_ACTION ParRunManager::CheckEventResult( void * input_buf, void *output_buf
|
||||
|
||||
// removed for Geant4.6
|
||||
//stateManager->SetNewState(G4State_EventProc);
|
||||
// Geant4.6 requires the state to be G4State_GeomClosed
|
||||
// Geant4 6.0 requires the state to be G4State_GeomClosed
|
||||
// before calling EventManager::ProcessOneEvent(..)
|
||||
|
||||
if ( !userPrimaryGeneratorAction )
|
||||
@@ -235,11 +239,12 @@ TOPC_ACTION ParRunManager::CheckEventResult( void * input_buf, void *output_buf
|
||||
if ( origUserEventAction )
|
||||
origUserEventAction->EndOfEventAction( currentEvent );
|
||||
|
||||
AnalyzeEvent( currentEvent );
|
||||
AnalyzeEvent(currentEvent);
|
||||
|
||||
if ( i_event < n_select ) G4UImanager::GetUIpointer()->ApplyCommand( msg );
|
||||
if (i_event<n_select) G4UImanager::GetUIpointer()->ApplyCommand(msg);
|
||||
// Geant4 6.0 requires the state to be G4State_GeomClosed
|
||||
stateManager->SetNewState( G4State_GeomClosed );
|
||||
StackPreviousEvent( currentEvent );
|
||||
StackPreviousEvent(currentEvent);
|
||||
currentEvent = 0;
|
||||
return NO_ACTION;
|
||||
}
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# Rat's thwap script, rewritten in perl and diffed a lot.
|
||||
#
|
||||
# django@ccs.neu.edu
|
||||
# July 24, 1993
|
||||
#
|
||||
# 1/19/94 v2.01 - bdowling
|
||||
# Added: Interactive prompting (-i)
|
||||
# Whuggled option handling
|
||||
# -Allows numeric signals
|
||||
# -Allows varied ordering
|
||||
# Changed finding processes slightly
|
||||
# Added sysV support ??
|
||||
# 1997.08.05 jay
|
||||
# added Solaris support
|
||||
|
||||
$0 =~ s#.*/##;
|
||||
$| = 1;
|
||||
|
||||
$fakeit = 0;
|
||||
$iprompt = 0;
|
||||
|
||||
# gdc - /usr/bin/kill -> /bin/kill, Redhat Linux 4.2 had only /bin/kill
|
||||
@valid_signals = split(/[ \t\n]+/, `/bin/kill -l`);
|
||||
die "$0: error running 'kill' to gather signals!: $!\n" if $?;
|
||||
|
||||
$signal = "KILL";
|
||||
|
||||
while ($ARGV[0] =~ /^-/) {
|
||||
$_ = shift(@ARGV);
|
||||
if (/^-n$/) {
|
||||
$fakeit = 1; $iprompt = 0;
|
||||
} elsif (/^-i$/) {
|
||||
$iprompt = 1; $fakeit = 0;
|
||||
} elsif (/^-(\w+)/) {
|
||||
$signal = $1;
|
||||
$signal =~ tr/[a-z]/[A-Z]/;
|
||||
$signal =~ s/^SIG//;
|
||||
die "$1: $signal is not a valid signal\n"
|
||||
if (! grep(/^$signal$/,
|
||||
(@valid_signals, (1..$#valid_signals+1) ) ) );
|
||||
}
|
||||
}
|
||||
#warn "> $signal\n";
|
||||
# we don't need to do this, since Perl can handle named signals just as well
|
||||
# as numberic ones. In fact, this causes us grief because kill -l does not
|
||||
# return the same thing on all systems
|
||||
#if (! ($signal =~ /^[0-9]+$/)) { # We want to work with a numeric signal
|
||||
# for($x=0;$x<=$#valid_signals;$x++) {
|
||||
# do { $numsignal = ++$x; last; } if @valid_signals[$x] eq $signal;
|
||||
# }
|
||||
#}
|
||||
#warn "> $signal\n";
|
||||
|
||||
&usage if ($#ARGV < 0);
|
||||
|
||||
foreach $uname ('/bin/uname', '/usr/bin/uname', '/sbin/uname') {
|
||||
next unless (-x $uname);
|
||||
chop($rev = `$uname -r`);
|
||||
($OSMAJOR = $rev) =~ s/\..*//;
|
||||
last;
|
||||
}
|
||||
|
||||
if ($OSMAJOR == 5) { # System V
|
||||
$ps_flags = " -f ";
|
||||
$ps_flags .= " -e " if ($> == 0);
|
||||
$ps_flags .= " -u $>" if ($> != 0); # Do we need this? Could we just do
|
||||
# ps -f above? It gets some root procs
|
||||
# such as rlogin etc. (which is cool!)
|
||||
} else { # Assume BSD system, what others could we check for?
|
||||
$ps_flags = "uxww";
|
||||
$ps_flags .= "a" if ($> == 0); # Only need this if we're root
|
||||
}
|
||||
|
||||
# Don't want a leading "-" on the flags, so it works on both Alphas and Suns:
|
||||
$ps_pid = open(PS, "ps $ps_flags |"), "\n";
|
||||
$header = <PS>;
|
||||
$seen_header = 0;
|
||||
$thwapped = 0;
|
||||
|
||||
while (<PS>) {
|
||||
($foo = $_) =~ s/^\s*//;
|
||||
($user, $pid, @rest) = split(' ',$foo);
|
||||
next if ($pid == $$ || $pid == $ps_pid); # Don't thwap this process!
|
||||
next if (/thwap/); # Hackish attempt to avoid
|
||||
# thwapping this process
|
||||
# when invoked via rsh
|
||||
|
||||
testit: foreach $expr (@ARGV) {
|
||||
if ($expr =~ /^[0-9]+$/) { # make numbers only match pids
|
||||
next testit if ($pid != $expr);
|
||||
}
|
||||
if (grep(/$expr/, $_)) {
|
||||
# warn "expr = $expr; user = $user; pid = $pid; rest = @rest\n";
|
||||
warn $header if (! $seen_header);
|
||||
warn "\n" if ($seen_header && $iprompt);
|
||||
$seen_header = 1;
|
||||
warn $_;
|
||||
if (! $iprompt || &AskYN() ) {
|
||||
# warn "-> kill $signal $pid\n" if (! $fakeit);
|
||||
if (! $fakeit ) {
|
||||
# quotes needed around $signal so Perl will interpret both
|
||||
# numeric and non-numberic signals properly -- dNb
|
||||
$killed = kill("$signal", $pid);
|
||||
warn "kill: $!\n" if ! $killed;
|
||||
$thwapped += $killed;
|
||||
} else {
|
||||
$thwapped++;
|
||||
}
|
||||
}
|
||||
last testit; # Okay it's dead jim, we're done this loop.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close(PS);
|
||||
|
||||
warn "$0: ", ( $fakeit ? "would have " : "" ),
|
||||
"sent SIG${signal} to $thwapped process",
|
||||
($thwapped == 1 ? "" : "es"), "\n";
|
||||
|
||||
sub usage {
|
||||
warn <<"EOT";
|
||||
Usage: $0 [options] <user | pid | progname | perlregexp> ...
|
||||
Options:
|
||||
-n fake mode - only display processes that would be selected
|
||||
-i interactive mode - prompt on each suspect process
|
||||
-<signal> any valid literal or numeric signal (see kill -l)
|
||||
|
||||
EOT
|
||||
exit(1);
|
||||
}
|
||||
|
||||
sub AskYN {
|
||||
print STDERR "Send SIG", @valid_signals[$numsignal-1], " to this process? (y/n/a)? ";
|
||||
$ans = <STDIN>;
|
||||
$iprompt = ! ($ans =~ /^a/i);
|
||||
return( $ans =~ /^[ay]/i );
|
||||
}
|
||||
|
||||
+21
-25
@@ -1,9 +1,6 @@
|
||||
$Id: 000README,v 1.4 2004/12/03 13:35:22 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
ParGeant4: Geant4/TOP-C, a parallelization of Geant4
|
||||
Version 0.9
|
||||
(event-level parallelism only)
|
||||
ParGeant4: Geant4/TOP-C, a parallelization of Geant4
|
||||
(event-level parallelism)
|
||||
|
||||
Gene Cooperman
|
||||
Northeastern University
|
||||
@@ -16,11 +13,10 @@ Please write to gene@ccs.neu.edu for further information.
|
||||
To port other applications to a parallel version, read the
|
||||
files ../../info/PAR_INSTALL and ../../info/PAR_README.
|
||||
|
||||
|
||||
See the beginning of GNUmakefile for reasonable `make' targets to run it.
|
||||
To run it:
|
||||
0. a. Follow the standard Geant4 installation procedure.
|
||||
b. Download and install TOP-C.
|
||||
b. Download and install TOP-C
|
||||
The TOP-C home page is at http://www.ccs.neu.edu/home/gene/topc.html
|
||||
cd <TOPC_INSTALL_DIR>
|
||||
gzip -dc topc.tar.gz | tar -xvf -
|
||||
@@ -29,10 +25,10 @@ To run it:
|
||||
make
|
||||
make test
|
||||
[ Copy bin/topc-config to your path ]
|
||||
c. Verify that the Geant4 example installs for you:
|
||||
c. Verify that the Geant4 example installs:
|
||||
cd $G4INSTALL/examples/extended/parallel/ParN04
|
||||
make
|
||||
$G4WORKDIR/bin/$G4SYSTEM/ParN04 ParN04.in
|
||||
make
|
||||
$G4WORKDIR/bin/$G4SYSTEM/ParN04 ParN04.in
|
||||
2. make run
|
||||
[ By default, the included `procgroup' file creates two slave processes
|
||||
on localhost. ]
|
||||
@@ -41,15 +37,16 @@ To run it:
|
||||
[ To remove intermediate files and start over: make parclean ]
|
||||
3. Try running it with slave processes on remote processes.
|
||||
First, test that your local environment is set up correctly.
|
||||
Try: ssh <REMOTE_HOSTNAME> $G4WORKDIR/bin/$G4SYSTEM/ParN04 `pwd`/ParN04.in
|
||||
Try:
|
||||
ssh <REMOTE_HOSTNAME> $G4WORKDIR/bin/$G4SYSTEM/ParN04 `pwd`/ParN04.in
|
||||
The above command needs to work without asking for a password.
|
||||
[ If you use dynamic libraries (*.so), make sure the LD_LIBRARY_PATH
|
||||
in your shell startup file (e.g. ~.tcshrc) includes both:
|
||||
$G4INSTALL/lib/$G4SYSTEM and $CLHEP_BASE_DIR/lib
|
||||
If you use AFS, you may need to type 'klog' to renew your AFS token. ]
|
||||
In `procgroup' file, replace `localhost' by desired remote hosts;
|
||||
Add additional remote hosts (additional slaves) if you like.
|
||||
Then: make run
|
||||
Add additional remote hosts (additional slaves) if you like.
|
||||
Then: make run
|
||||
|
||||
============================================================================
|
||||
If you read ParGNUmakefile, you'll find other things that you can
|
||||
@@ -74,14 +71,14 @@ make parclean - Start over with clean set of files.
|
||||
|
||||
============================================================================
|
||||
New or modified files:
|
||||
ParN04.cc - Adds one line: #include "ParN04.icc"
|
||||
ParN04.cc - Adds one line: #include "ParN04.icc"
|
||||
ParExample.icc inserts: #include "topc.h"
|
||||
and causes main to calls TOPC_init, TOPC_finalize,
|
||||
and to use: `new ParRunManager' instead of `new G4RunManager'
|
||||
GNUmakefile - Adds one line at beginning: include ParGNUmakefile
|
||||
ParGNUmakefile defines EXTRALIBS and CPPFLAGS so as to
|
||||
modify behavior of config/binmake.gmk
|
||||
in order to use TOP-C libraries and includes
|
||||
modify behavior of config/binmake.gmk
|
||||
in order to use TOP-C libraries and includes
|
||||
procgroup - Specifies which slave hosts to use, and where to put output
|
||||
For example: localhost 1 - > slave1.out
|
||||
host=`localhost', executable=`same as master',
|
||||
@@ -90,16 +87,13 @@ New or modified files:
|
||||
src/ParRunManager.cc - ParRunManger derived from G4RunManager
|
||||
replaces Gr4RunManager::DoEventLoop w/ TOP-C parallel loop,
|
||||
Adds certain local vars of DoEventLoop as ParRunManager members
|
||||
src/ParMarshaledObj.cc - run-time utilities for marshalling
|
||||
src/ParExN04MarshaledHits.cc - marshals N04 hits (calorimeter & tracking hits)
|
||||
include/Par*.hh - Currently just ParRunManager.hh
|
||||
include/MarshaledObj.h - run-time utilities for marshalling
|
||||
include/MarshaledEx*Hit.h - marshals N04 hits (calorimeter hits)
|
||||
include/MarshaledG4*.h - marshaling routines for Geant4 data structures
|
||||
|
||||
~/slave*.out - Contains outputs of slave1, slave2, etc.
|
||||
Generated each time parallel ParN04 is executed.
|
||||
These files are specified in the file procgroup.
|
||||
thwap - A script I inherited from our N.U. systems group
|
||||
`thwap ParN04' will clobber all processes you own
|
||||
whose command line includes `ParN04' as substring.
|
||||
Handy for runaway processes when doing parallelism.
|
||||
|
||||
====================================================================
|
||||
This version passes an event number to the slave and lets the
|
||||
@@ -128,13 +122,15 @@ identical commands.
|
||||
====================================================================
|
||||
If you are curious about some of the layers, the following
|
||||
stack trace [somewhat out of date now] gives some idea.
|
||||
[ This stack trace is from a run based on ParN02.]
|
||||
|
||||
G4RunManager::BeamOn calls ParRunManager::DoEventLoop
|
||||
(since G4RunManager::DoEventLoop is virtual)
|
||||
ParRunManager::DoEventLoop calls TOPC_master_slave
|
||||
TOPC_master_slave calls submit_task_input
|
||||
submit_task_input eventually calls COMM_send_msg which calls MPI_Send
|
||||
(COMM_send_msg is the communication layer of TOPC;
|
||||
The exampleN02.cc was linked with the TOP-C MPI communication layer.
|
||||
ParN04.cc was linked with the TOP-C MPI communication layer.
|
||||
The same source could have been linked with a POSIX threads layer,
|
||||
a communication layer, or some other communication layer.
|
||||
)
|
||||
@@ -158,4 +154,4 @@ stack trace [somewhat out of date now] gives some idea.
|
||||
#11 0x416810a3 in G4UImanager::ApplyCommand () from /afs/cern.ch/user/c/cooperma/scratch-pcitapi07/geant4/lib/libG4intercoms.so
|
||||
#12 0x805db7e in G4UIterminal::ExecuteCommand () at /afs/cern.ch/sw/lhcxx/specific/redhat61/3.2.0/include/CLHEP/Random/Randomize.h:64
|
||||
#13 0x805d42d in G4UIterminal::SessionStart () at /afs/cern.ch/sw/lhcxx/specific/redhat61/3.2.0/include/CLHEP/Random/Randomize.h:64
|
||||
#14 0x8056a3d in main (argc=1, argv=0x80bfa00) at ParN04.cc:98
|
||||
#14 0x8056a3d in main (argc=1, argv=0x80bfa00) at ParN02.cc:98
|
||||
@@ -0,0 +1,47 @@
|
||||
The files in this directory are the files that were used to build
|
||||
../include/Marshaled*.hh . The files ../include/Marshaled*.hh contain
|
||||
marshaling (serialization) routines that are used by Parallel Geantr4.
|
||||
|
||||
Marshalgen is a package that allows one to add a small number of annotations
|
||||
to the original sequential code, in order to create marshalling or
|
||||
serialization routines. Those marshalling routines are then used
|
||||
by ParGeant4 to pass data between slave processes and the master process.
|
||||
|
||||
INPUT FILES:
|
||||
1. G4*.hh : The files *.hh are taken from Geant4. They include annotations
|
||||
(comments) that describe how to marshal individual fields of the
|
||||
given classes. These files have additional annotations that describe
|
||||
how to marshal individual fields of the given classes. For a new
|
||||
application, you have to change any references to Ex* to your
|
||||
own example/application include files. These files are then reused
|
||||
in the new Geant4 parallel application.
|
||||
2. ../include/Ex*Hit.hh : These files are the original sequential Geant4
|
||||
application files that describe the application-defined hits.
|
||||
They remain in the application include directory because they may
|
||||
depend on other files in the include directory.
|
||||
For most new parallel Geant4 applications, these files are sufficiently
|
||||
simple, that one needs only to add Marshalgen begin and end comments
|
||||
bracketing the class that needs to be marshalled, and a small number
|
||||
of annotations specifying accessor functions to get and set fields
|
||||
in the class. It may also be necessary to include marshalling
|
||||
include files, if it is necessary to marshal other Geant4 data
|
||||
structures.
|
||||
Information on how to marshal the fields, etc., is in the Marshalgen
|
||||
manual, along with the Marshalgen package:
|
||||
http://www.ccs.neu.edu/home/gene/marshalgen
|
||||
|
||||
|
||||
Marshalgen was then called on the above input files. One calls:
|
||||
./marshalgen *.hh
|
||||
./marshalgen ../include/Ex*Hit.hh
|
||||
|
||||
OUTPUT FILES:
|
||||
3. *.msh : These files are intermediate files generated automatically
|
||||
by marshalgen ( http://www.ccs.neu.edu/home/gene/marshalgen )
|
||||
These files can be deleted if desired.
|
||||
4. Marshaled*.h : These files are generated by Marshalgen. They
|
||||
include of type both MarshaledEx*.h and MarshaledG4*.h .
|
||||
(In addition, the file MarshaledObj.h is copied directly from
|
||||
the Marshalgen distribution.) These files are all copied to
|
||||
the include directory of the Geant4 parallel application.
|
||||
They provide the marshalling functions that are then used by Geant4.
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.hh,v 1.1 2004/11/22 17:51:00 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4HCofThisEvent.hh,v 1.2 2005/11/26 09:47:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCofThisEvent_h
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "g4std/vector"
|
||||
#include <vector>
|
||||
|
||||
// class description:
|
||||
//
|
||||
@@ -68,7 +68,7 @@ class G4HCofThisEvent
|
||||
void AddHitsCollection(G4int HCID,G4VHitsCollection * aHC);
|
||||
|
||||
private:
|
||||
G4std::vector<G4VHitsCollection*> * HC; /*MSH: ptr_as_array
|
||||
std::vector<G4VHitsCollection*> * HC; /*MSH: ptr_as_array
|
||||
[elementType: G4VHitsCollection*]
|
||||
[elementCount: { $ELE_COUNT = $THIS->GetNumberOfCollections(); }]
|
||||
[elementGet: { $ELEMENT = $THIS->GetHC($ELE_INDEX); }]
|
||||
@@ -101,7 +101,11 @@ class G4HCofThisEvent
|
||||
};
|
||||
//MSH_END
|
||||
|
||||
extern G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
#if defined G4DIGI_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
#endif
|
||||
|
||||
inline void* G4HCofThisEvent::operator new(size_t)
|
||||
{
|
||||
|
||||
@@ -10,9 +10,12 @@
|
||||
//MSH_include_end
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4HCofThisEvent.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4HCofThisEvent (G4HCofThisEvent* param) {
|
||||
|
||||
G4std::vector<G4VHitsCollection*> * HC;
|
||||
std::vector<G4VHitsCollection*> * HC;
|
||||
//FIELDMARSHAL:
|
||||
{
|
||||
int copy_off = 0;
|
||||
|
||||
@@ -32,11 +32,12 @@
|
||||
vietha 2003.05.08
|
||||
*/
|
||||
|
||||
#ifndef G4String_h
|
||||
#define G4String_h
|
||||
#ifndef __G4String
|
||||
#define __G4String
|
||||
|
||||
//MSH_BEGIN
|
||||
class G4String{
|
||||
class G4String : public std::string
|
||||
{
|
||||
int dummy; /*MSH: manual
|
||||
{ memcpy($$, param->c_str(), param->size());
|
||||
*($$+param->size()) = '\0';
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4String.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4String (G4String* param) {
|
||||
|
||||
int dummy;
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4THitsCollection.hh,v 1.1 2004/11/22 17:51:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4THitsCollection.hh,v 1.2 2005/11/26 09:47:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4THitsCollection_h
|
||||
@@ -96,7 +96,12 @@ class G4HitsCollection : public G4VHitsCollection
|
||||
};
|
||||
//MSH_END
|
||||
|
||||
extern G4Allocator<G4HitsCollection> anHCAllocator;
|
||||
|
||||
#if defined G4DIGI_ALLOC_EXPORT
|
||||
extern G4DLLEXPORT G4Allocator<G4HitsCollection> anHCAllocator;
|
||||
#else
|
||||
extern G4DLLIMPORT G4Allocator<G4HitsCollection> anHCAllocator;
|
||||
#endif
|
||||
|
||||
//MSH_BEGIN
|
||||
template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
@@ -120,15 +125,15 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
|
||||
public: // with description
|
||||
inline T* operator[](size_t i) const
|
||||
{ return (*((G4std::vector<T*>*)theCollection))[i]; }
|
||||
{ return (*((std::vector<T*>*)theCollection))[i]; }
|
||||
// Returns a pointer to a concrete hit object.
|
||||
inline G4std::vector<T*>* GetVector() const
|
||||
{ return (G4std::vector<T*>*)theCollection; }
|
||||
inline std::vector<T*>* GetVector() const
|
||||
{ return (std::vector<T*>*)theCollection; }
|
||||
// Returns a collection vector.
|
||||
inline G4int insert(T* aHit)
|
||||
{
|
||||
G4std::vector<T*>*theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*>*theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
theHitsCollection->push_back(aHit);
|
||||
return theHitsCollection->size();
|
||||
}
|
||||
@@ -136,17 +141,17 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
// collection is returned.
|
||||
inline G4int entries() const
|
||||
{
|
||||
G4std::vector<T*>*theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*>*theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
return theHitsCollection->size();
|
||||
}
|
||||
// Returns the number of hit objects stored in this collection
|
||||
|
||||
public:
|
||||
virtual G4VHit* GetHit(size_t i) const
|
||||
{ return (*((G4std::vector<T*>*)theCollection))[i]; }
|
||||
{ return (*((std::vector<T*>*)theCollection))[i]; }
|
||||
virtual size_t GetSize() const
|
||||
{ return ((G4std::vector<T*>*)theCollection)->size(); }
|
||||
{ return ((std::vector<T*>*)theCollection)->size(); }
|
||||
|
||||
// MSH_superclass : G4HitsCollection
|
||||
|
||||
@@ -167,23 +172,23 @@ template <class T> inline void G4THitsCollection<T>::operator delete(void* anHC)
|
||||
|
||||
template <class T> G4THitsCollection<T>::G4THitsCollection()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= new G4std::vector<T*>;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= new std::vector<T*>;
|
||||
theCollection = (void*)theHitsCollection;
|
||||
}
|
||||
|
||||
template <class T> G4THitsCollection<T>::G4THitsCollection(G4String detName,G4String colNam)
|
||||
: G4HitsCollection(detName,colNam)
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= new G4std::vector<T*>;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= new std::vector<T*>;
|
||||
theCollection = (void*)theHitsCollection;
|
||||
}
|
||||
|
||||
template <class T> G4THitsCollection<T>::~G4THitsCollection()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
//theHitsCollection->clearAndDestroy();
|
||||
for(size_t i=0;i<theHitsCollection->size();i++)
|
||||
{ delete (*theHitsCollection)[i]; }
|
||||
@@ -196,8 +201,8 @@ template <class T> G4int G4THitsCollection<T>::operator==(const G4THitsCollectio
|
||||
|
||||
template <class T> void G4THitsCollection<T>::DrawAllHits()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
size_t n = theHitsCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theHitsCollection)[i]->Draw(); }
|
||||
@@ -205,8 +210,8 @@ template <class T> void G4THitsCollection<T>::DrawAllHits()
|
||||
|
||||
template <class T> void G4THitsCollection<T>::PrintAllHits()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
std::vector<T*> * theHitsCollection
|
||||
= (std::vector<T*>*)theCollection;
|
||||
size_t n = theHitsCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theHitsCollection)[i]->Print(); }
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
//MSH_include_end
|
||||
%}
|
||||
|
||||
// This file is generated automatically from G4THitsCollection.hh . It is an
|
||||
// intermediate file useful for debugging, but otherwise may be deleted.
|
||||
|
||||
marshaling class MarshaledG4HitsCollection (G4HitsCollection* param) {
|
||||
|
||||
void* theCollection;
|
||||
@@ -150,7 +153,7 @@
|
||||
}
|
||||
|
||||
template <class T> marshaling class MarshaledG4THitsCollection<T> (G4THitsCollection<T>* param) : public G4HitsCollection {
|
||||
int __dummy208; // marshaling code for MSH_superclass
|
||||
int __dummy812; // marshaling code for MSH_superclass
|
||||
//FIELDMARSHAL:
|
||||
{
|
||||
MarshaledG4HitsCollection marParent($THIS);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VHitsCollection.hh,v 1.1 2004/11/22 17:51:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-07-01 $
|
||||
// $Id: G4VHitsCollection.hh,v 1.2 2005/11/26 09:47:01 cooperma Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHitsCollection_h
|
||||
@@ -55,9 +55,9 @@ class G4VHitsCollection
|
||||
protected:
|
||||
|
||||
// Collection name
|
||||
G4String collectionName; /*MSH: predefined
|
||||
[elementGet: { $ELEMENT = $THIS->GetName(); }]
|
||||
[elementSet: { Shadowed_param->collectionName=$ELEMENT; }]
|
||||
G4String collectionName; /*MSH: predefined
|
||||
[elementGet: { $ELEMENT = $THIS->GetName(); }]
|
||||
[elementSet: { Shadowed_param->collectionName=$ELEMENT; }]
|
||||
*/
|
||||
|
||||
G4String SDname; /* MSH: predefined
|
||||
@@ -79,7 +79,7 @@ class G4VHitsCollection
|
||||
// GetHit and GetSize are given a default implementation here so
|
||||
// that the template G4THitsCollection can be used, but they
|
||||
// are re-implemented G4THitsCollection.
|
||||
virtual G4VHit* GetHit(size_t i) const { return 0; }
|
||||
virtual G4VHit* GetHit(size_t) const { return 0; }
|
||||
virtual size_t GetSize() const { return 0; };
|
||||
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user