Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
+10 -20
View File
@@ -1,38 +1,29 @@
# $Id: GNUmakefile,v 1.1 1999/01/07 16:10:58 gunter Exp $
# $Id: GNUmakefile,v 1.7 1999/11/22 12:11:23 morita Exp $
name := G4prun
G4ODBMS := true
G4ODBMS_INSTALLATION := true
ifndef G4INSTALL
G4INSTALL = ../../..
endif
include $(G4INSTALL)/config/architecture.gmk
# $(G4TMPDIR) will be overrided in common.gmk later.
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)
G4OODDLX_BOOT := $(G4TMPSCHEMA_BOOT)
CPPFLAGS += \
-Iinclude \
-I$(G4TMPDIR) \
-I$(G4SCHEMA_HEADER_DIR) \
-I$(G4INSTALL)/source/persistency/global/include \
-I$(G4INSTALL)/source/persistency/management/include \
-I$(G4INSTALL)/source/run/include \
-I$(G4INSTALL)/source/event/include \
-I$(G4INSTALL)/source/global/management/include \
-I$(G4INSTALL)/source/global/HEPRandom/include \
-I$(G4INSTALL)/source/global/HEPGeometry/include \
-I$(G4INSTALL)/source/geometry/management/include \
-I$(G4INSTALL)/source/geometry/volumes/include \
-I$(G4INSTALL)/source/geometry/solids/CSG/include \
-I$(G4INSTALL)/source/events+tracks/include \
-I$(G4INSTALL)/source/processes/management/include \
-I$(G4INSTALL)/source/materials/include \
-I$(G4INSTALL)/source/particles/management/include \
-I$(G4INSTALL)/source/graphics_reps/include \
-I$(G4INSTALL)/source/tracking/include \
-I$(G4INSTALL)/source/track/include \
-I$(G4INSTALL)/source/persistency/management/include \
-I$(G4INSTALL)/source/digits+hits/detector/include \
-I$(G4INSTALL)/source/digits+hits/digits/include \
-I$(G4INSTALL)/source/digits+hits/hits/include \
-I$(G4INSTALL)/source/digits+hits/digits/include
-I$(G4INSTALL)/source/global/management/include \
-I$(G4INSTALL)/source/graphics_reps/include
#--------------------------------------------------------------------
@@ -45,6 +36,5 @@ include $(G4INSTALL)/config/common.gmk
# G4PEvent.ddl includes G4PPrimaryVertex.hh, so G4PPrimaryVertex.hh
# should be created before G4PEvent.hh.
$(G4TMPDIR)/G4PEvent.hh: $(G4TMPDIR)/G4PPrimaryVertex.hh
#--------------------------------------------------------------------
+6 -5
View File
@@ -1,12 +1,12 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PRun.ddl,v 1.1 1999/01/07 16:10:58 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PRun.ddl,v 1.5.2.1 1999/12/07 20:50:16 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4PRun_h
@@ -18,10 +18,9 @@
#include "HepODBMS/odbms/HepODBMS.h"
#include "G4PersistentTypes.hh"
#include "G4PersistentSchema.hh"
class G4Run;
//class G4HCtable;
//class G4DCtable;
class G4PRun
: public HepPersObj
@@ -31,6 +30,8 @@ class G4PRun
G4PRun(const G4Run* aRun);
virtual ~G4PRun();
G4Run* MakeTransientObject();
protected:
G4Pint runID;
G4Pint numberOfEvent;
@@ -0,0 +1,77 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PersistentRunMan.hh,v 1.8 1999/11/28 21:54:21 morita Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4PersistentRunMan
//
// A Utility class for storing and retrieving the run objects.
//
// This class is not persistent-capable.
//
// Member functions:
// =================
// G4bool Store(HepDbApplication* dbApp, const G4Run* aRun);
// Store aRun and associated objects into database.
// G4bool Retrieve(HepDbApplication* dbApp, G4Run*& aRun);
// Retrieve aRun and associated objects into database.
// void SetContainer(HepContainerRef container);
// Set Run Container reference.
//
// Member data:
// ============
// HepContainerRef f_container;
// Reference to the event container in the database.
// HepContainerRef f_currentContainer;
// Reference to the current scan scope in Retrieve().
//
// History:
// 98.10.30 Y.Morita Splited from G4PersistencyManager
#ifndef G4PERSISTENTRUNMAN_H
#define G4PERSISTENTRUNMAN_H 1
#include "globals.hh"
#include "G4VPersistentSubMan.hh"
#include "G4VPersistentSubDbMan.hh"
#include "G4PRun.hh"
class HepDbApplication;
class G4Run;
class G4PersistentRunMan
: public G4VPersistentSubMan, public G4VPersistentSubDbMan
{
friend class G4PersistencyManager;
friend class G4TransactionManager;
private:
G4PersistentRunMan();
~G4PersistentRunMan();
private:
G4int f_currentRunID;
HepRef(G4PRun) f_currentPRun;
public:
inline G4int CurrentRunID()
{ return f_currentRunID; }
protected:
// interface with G4TransactionManager
private:
// interface with G4PersistencyManager
G4bool Store( HepDbApplication* dbApp, const G4Run* aRun);
G4bool Retrieve( HepDbApplication* dbApp, G4Run*& aRun );
};
#endif
+22 -3
View File
@@ -1,16 +1,17 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PRun.cc,v 1.1 1999/01/07 16:10:58 gunter Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4PRun.cc,v 1.4.2.1 1999/12/07 20:50:16 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#include "G4Run.hh"
#include "G4PRun.hh"
#include "G4Event.hh"
G4PRun::G4PRun()
// :runID(0),numberOfEvent(0),HCtable(NULL),DCtable(NULL)
@@ -26,3 +27,21 @@ G4PRun::G4PRun(const G4Run* aRun)
G4PRun::~G4PRun()
{;}
G4Run* G4PRun::MakeTransientObject()
{
G4Run* aRun = new G4Run();
aRun->SetRunID(runID);
G4Event* dummyEvt = new G4Event;
for(G4int i = 0; i < numberOfEvent; i++)
{
aRun->RecordEvent(dummyEvt);
}
delete dummyEvt;
return aRun;
}
@@ -0,0 +1,79 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PersistentRunMan.cc,v 1.8 1999/11/28 21:54:22 morita Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// class G4PersistentRunMan
//
// Implementation for concrete G4PersistentRunMan.
//
// History:
// 98.01.08 Y.Morita Initial version
// 98.10.30 Y.Morita Splitted from G4PersistencyManager
#include "G4PersistentRunMan.hh"
#include "HepODBMS/clustering/HepDbApplication.h"
#include "G4Run.hh"
#include "G4ios.hh"
G4PersistentRunMan::G4PersistentRunMan()
: f_currentRunID(0)
{;}
G4PersistentRunMan::~G4PersistentRunMan()
{;}
//----------------------------------------------------------------------------
G4bool G4PersistentRunMan::Store( HepDbApplication* dbApp,
const G4Run* aRun)
{
// Create persistent run
f_currentPRun = new(f_container) G4PRun(aRun);
if( f_currentPRun == NULL )
return false;
f_currentRunID = aRun->GetRunID();
return true;
}
G4bool G4PersistentRunMan::Retrieve( HepDbApplication* dbApp,
G4Run*& aRun)
{
G4bool theStatus = false;
aRun = NULL;
ooItr(G4PRun) pRun_iterator;
// set the new scan scope if the DB/Container has been changed by
// G4PersistencyManager
if( f_container != f_currentContainer )
{
f_currentContainer = f_container;
pRun_iterator.scan(f_currentContainer);
}
// Retrieve "next" G4PRun in this scope and make a G4Run object
if( pRun_iterator.next() )
{
G4Run* run = pRun_iterator->MakeTransientObject();
if( run != NULL )
{
aRun = run;
theStatus = true;
f_currentRunID = aRun->GetRunID();
}
}
return theStatus;
}