Import Geant4 1.0.0 source tree
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# $Id: GNUmakefile,v 1.3 1999/11/24 20:28:06 morita Exp $
|
||||
|
||||
name := G4pdigits
|
||||
G4ODBMS := true
|
||||
G4ODBMS_INSTALLATION := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../..
|
||||
endif
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
G4OODDLX_BOOT := $(G4TMPSCHEMA_BOOT)
|
||||
|
||||
CPPFLAGS += \
|
||||
-Iinclude \
|
||||
-I$(G4SCHEMA_HEADER_DIR) \
|
||||
-I$(G4INSTALL)/source/persistency/global/include \
|
||||
-I$(G4INSTALL)/source/digits+hits/digits/include \
|
||||
-I$(G4INSTALL)/source/global/management/include \
|
||||
-I$(G4INSTALL)/source/graphics_reps/include
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
include $(G4INSTALL)/config/G4ODBMS_BUILD.gmk
|
||||
|
||||
include $(G4INSTALL)/config/common.gmk
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Explicit header file dependencies:
|
||||
|
||||
$(G4SCHEMA_HEADER_DIR)/G4PDCofThisEvent.hh: $(G4SCHEMA_HEADER_DIR)/G4PVDigitsCollection.hh
|
||||
$(G4SCHEMA_HEADER_DIR)/G4PVDigitsCollection.hh: $(G4SCHEMA_HEADER_DIR)/G4PVDigit.hh
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// 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: G4PDCofThisEvent.ddl,v 1.3 1999/12/02 16:10:19 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PDCofThisEvent_h
|
||||
#define G4PDCofThisEvent_h 1
|
||||
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
#include "G4PVDigitsCollection.hh"
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
class G4PDCofThisEvent
|
||||
: public HepPersObj
|
||||
{
|
||||
public:
|
||||
G4PDCofThisEvent();
|
||||
~G4PDCofThisEvent();
|
||||
|
||||
void AddDigitsCollection(G4int DCID, HepRef(G4PVDigitsCollection) aDC);
|
||||
|
||||
private:
|
||||
d_Varray< d_Ref<G4PVDigitsCollection> > DC;
|
||||
|
||||
public:
|
||||
inline HepRef(G4PVDigitsCollection) GetDC(G4int i)
|
||||
{ return DC[i]; }
|
||||
inline G4int GetCapacity()
|
||||
{ return DC.size(); }
|
||||
inline G4int GetNumberOfCollections()
|
||||
{
|
||||
G4int n = 0;
|
||||
for(int i=0;i<DC.size();i++)
|
||||
{
|
||||
if(! DC[i] ) n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
// 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: G4PVDigit.ddl,v 1.2 1999/11/24 20:28:06 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PVDigit_h
|
||||
#define G4PVDigit_h 1
|
||||
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
#include "G4VDigi.hh"
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
class G4PVDigit
|
||||
: public HepPersObj, public G4VDigi
|
||||
{
|
||||
|
||||
public:
|
||||
G4PVDigit();
|
||||
virtual ~G4PVDigit();
|
||||
int operator==(const G4PVDigit &right) const;
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// 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: G4PVDigitsCollection.ddl,v 1.4 1999/12/01 14:45:10 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PVDigitsCollection_h
|
||||
#define G4PVDigitsCollection_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4PersistentTypes.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
class G4PVDigitsCollection
|
||||
: public HepPersObj
|
||||
{
|
||||
public:
|
||||
G4PVDigitsCollection(G4String detName,G4String colNam);
|
||||
~G4PVDigitsCollection();
|
||||
int operator==(const G4PVDigitsCollection &right) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Persistent Collection name
|
||||
G4PString pcollectionName;
|
||||
G4PString pDMname;
|
||||
|
||||
public:
|
||||
inline G4String GetName()
|
||||
{ return (G4String) pcollectionName; }
|
||||
inline G4String GetDMname()
|
||||
{ return (G4String) pDMname; }
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// 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: G4PersistentDigitMan.hh,v 1.6 1999/11/29 20:11:16 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// class G4PersistentDigitMan
|
||||
//
|
||||
// A Class responsible for registring DigitsCollection
|
||||
// during event tracking.
|
||||
//
|
||||
// The class is `singleton', with access via
|
||||
// G4PersistentDigitMan::GetPersistentDigitMan.
|
||||
//
|
||||
// This class itself is not persistent-capable.
|
||||
//
|
||||
// Member functions:
|
||||
// =================
|
||||
// static G4PersistentDigitMan* GetPersistentDigitMan();
|
||||
// static G4PersistentDigitMan* get_PersistentDigitManIfExist();
|
||||
// Return ptr to singleton instance of the class.
|
||||
//
|
||||
// G4PersistentDigitMan();
|
||||
// ~G4PersistentDigitMan();
|
||||
//
|
||||
// Member data:
|
||||
// ============
|
||||
// static G4PersistentDigitMan* fPersistentDigitMan
|
||||
// Ptr to the unique instance of class
|
||||
//
|
||||
// History:
|
||||
// 99.11.22 Y.Morita Initial version
|
||||
|
||||
#ifndef G4PersistentDigitMan_DDL
|
||||
#define G4PersistentDigitMan_DDL 1
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
#include "G4VPersistentSubMan.hh"
|
||||
#include "G4VPersistentSubDbMan.hh"
|
||||
|
||||
#include "G4PDCofThisEvent.hh"
|
||||
|
||||
class G4PersistentDigitMan
|
||||
: public G4VPersistentSubMan, public G4VPersistentSubDbMan
|
||||
{
|
||||
public:
|
||||
static G4PersistentDigitMan* GetPersistentDigitMan();
|
||||
static G4PersistentDigitMan* get_PersistentDigitManIfExist();
|
||||
|
||||
G4PersistentDigitMan();
|
||||
~G4PersistentDigitMan();
|
||||
|
||||
private:
|
||||
static G4PersistentDigitMan * f_PersistentDigitMan;
|
||||
HepRef(G4PDCofThisEvent) f_CurrentPDCofThisEvent;
|
||||
|
||||
public:
|
||||
inline void SetCurrentPDCofThisEvent( HepRef(G4PDCofThisEvent) aPDC)
|
||||
{ f_CurrentPDCofThisEvent = aPDC; };
|
||||
inline HepRef(G4PDCofThisEvent) GetCurrentPDCofThisEvent()
|
||||
{ return f_CurrentPDCofThisEvent; };
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
// 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: G4PDCofThisEvent.cc,v 1.3 1999/12/02 16:10:20 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#include "G4PDCofThisEvent.hh"
|
||||
|
||||
G4PDCofThisEvent::G4PDCofThisEvent()
|
||||
{
|
||||
DC.resize(10);
|
||||
}
|
||||
|
||||
G4PDCofThisEvent::~G4PDCofThisEvent()
|
||||
{;}
|
||||
|
||||
void G4PDCofThisEvent::AddDigitsCollection(G4int DCID,
|
||||
HepRef(G4PVDigitsCollection) aDC)
|
||||
{
|
||||
if(DCID>=0)
|
||||
{
|
||||
if(DCID>=DC.size()) DC.resize(DCID+1);
|
||||
DC[DCID] = aDC;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// 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: G4PVDigit.cc,v 1.2 1999/11/24 20:28:07 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#include "G4PVDigit.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
G4PVDigit::G4PVDigit()
|
||||
{;}
|
||||
|
||||
G4PVDigit::~G4PVDigit()
|
||||
{;}
|
||||
|
||||
int G4PVDigit::operator==(const G4PVDigit &right) const
|
||||
{ return false; }
|
||||
|
||||
void G4PVDigit::Draw()
|
||||
{;}
|
||||
|
||||
void G4PVDigit::Print()
|
||||
{;}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// 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: G4PVDigitsCollection.cc,v 1.3 1999/11/29 20:11:17 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
// G4PVDigitsCollection
|
||||
|
||||
#include <assert.h>
|
||||
#include "G4PVDigitsCollection.hh"
|
||||
#include "G4PersistentDigitMan.hh"
|
||||
#include "G4PDCofThisEvent.hh"
|
||||
|
||||
G4PVDigitsCollection::G4PVDigitsCollection(G4String detName,G4String colNam)
|
||||
: pcollectionName(colNam), pDMname(detName)
|
||||
{;}
|
||||
|
||||
G4PVDigitsCollection::~G4PVDigitsCollection()
|
||||
{;}
|
||||
|
||||
int G4PVDigitsCollection::operator==(const G4PVDigitsCollection &right) const
|
||||
{
|
||||
return ((pcollectionName==right.pcollectionName)
|
||||
&&(pDMname==right.pDMname));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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: G4PersistentDigitMan.cc,v 1.4 1999/11/28 21:54:14 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// class G4PersistentDigitMan
|
||||
//
|
||||
// History:
|
||||
// 99.11.22 Y.Morita Initial version
|
||||
|
||||
#include "G4PersistentDigitMan.hh"
|
||||
|
||||
|
||||
G4PersistentDigitMan* G4PersistentDigitMan::f_PersistentDigitMan = NULL;
|
||||
|
||||
G4PersistentDigitMan* G4PersistentDigitMan::GetPersistentDigitMan()
|
||||
{
|
||||
if(!f_PersistentDigitMan)
|
||||
{
|
||||
f_PersistentDigitMan = new G4PersistentDigitMan;
|
||||
}
|
||||
return f_PersistentDigitMan;
|
||||
}
|
||||
|
||||
G4PersistentDigitMan* G4PersistentDigitMan::get_PersistentDigitManIfExist()
|
||||
{ return f_PersistentDigitMan; }
|
||||
|
||||
G4PersistentDigitMan::G4PersistentDigitMan()
|
||||
: f_CurrentPDCofThisEvent(NULL)
|
||||
{;}
|
||||
|
||||
G4PersistentDigitMan::~G4PersistentDigitMan()
|
||||
{;}
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
# $Id: GNUmakefile,v 1.1 1999/01/07 16:10:44 gunter Exp $
|
||||
# $Id: GNUmakefile,v 1.10 1999/11/24 20:27:23 morita Exp $
|
||||
|
||||
name := G4phits
|
||||
G4ODBMS := true
|
||||
G4ODBMS_INSTALLATION := true
|
||||
|
||||
ifndef G4INSTALL
|
||||
G4INSTALL = ../../../..
|
||||
endif
|
||||
include $(G4INSTALL)/config/architecture.gmk
|
||||
|
||||
# $(G4TMPDIR) will be overriden in common.gmk later.
|
||||
G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name)
|
||||
G4OODDLX_BOOT := $(G4TMPSCHEMA_BOOT)
|
||||
|
||||
CPPFLAGS += \
|
||||
-Iinclude \
|
||||
-I$(G4TMPDIR) \
|
||||
-I$(G4INSTALL)/source/persistency/management/include \
|
||||
-I$(G4INSTALL)/source/run/include \
|
||||
-I$(G4INSTALL)/source/global/management/include \
|
||||
-I$(G4SCHEMA_HEADER_DIR) \
|
||||
-I$(G4INSTALL)/source/persistency/global/include \
|
||||
-I$(G4INSTALL)/source/digits+hits/hits/include \
|
||||
-I$(G4INSTALL)/source/global/management/include \
|
||||
-I$(G4INSTALL)/source/graphics_reps/include
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
@@ -29,5 +28,7 @@ include $(G4INSTALL)/config/common.gmk
|
||||
#--------------------------------------------------------------------
|
||||
# Explicit header file dependencies:
|
||||
|
||||
$(G4SCHEMA_HEADER_DIR)/G4PHCofThisEvent.hh: $(G4SCHEMA_HEADER_DIR)/G4PVHitsCollection.hh
|
||||
$(G4SCHEMA_HEADER_DIR)/G4PVHitsCollection.hh: $(G4SCHEMA_HEADER_DIR)/G4PVHit.hh
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,68 +1,50 @@
|
||||
// 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: G4PHCofThisEvent.ddl,v 1.1 1999/01/07 16:10:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PHCofThisEvent.ddl,v 1.8 1999/12/02 16:10:21 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCofThisEvent_h
|
||||
#define G4HCofThisEvent_h 1
|
||||
#ifndef G4PHCofThisEvent_h
|
||||
#define G4PHCofThisEvent_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include <rw/tpordvec.h>
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
class G4HCofThisEvent
|
||||
#include "G4PVHitsCollection.hh"
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
class G4PHCofThisEvent
|
||||
: public HepPersObj
|
||||
{
|
||||
public:
|
||||
G4HCofThisEvent();
|
||||
G4HCofThisEvent(G4int cap);
|
||||
~G4HCofThisEvent();
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void* anHCoTE);
|
||||
G4PHCofThisEvent();
|
||||
~G4PHCofThisEvent();
|
||||
|
||||
void AddHitsCollection(G4int HCID,G4VHitsCollection * aHC);
|
||||
void AddHitsCollection(G4int HCID, HepRef(G4PVHitsCollection) aHC);
|
||||
|
||||
private:
|
||||
RWTPtrOrderedVector<G4VHitsCollection> * HC;
|
||||
d_Varray< d_Ref<G4PVHitsCollection> > HC;
|
||||
|
||||
public:
|
||||
inline G4VHitsCollection* GetHC(G4int i)
|
||||
{ return (*HC)[i]; }
|
||||
inline HepRef(G4PVHitsCollection) GetHC(G4int i)
|
||||
{ return HC[i]; }
|
||||
inline G4int GetCapacity()
|
||||
{
|
||||
return HC->entries();
|
||||
}
|
||||
{ return HC.size(); }
|
||||
inline G4int GetNumberOfCollections()
|
||||
{
|
||||
G4int n = 0;
|
||||
for(int i=0;i<HC->entries();i++)
|
||||
for(int i=0;i<HC.size();i++)
|
||||
{
|
||||
if(!(*HC)[i]) n++;
|
||||
if( HC[i] != NULL ) n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
};
|
||||
|
||||
extern G4Allocator<G4HCofThisEvent> anHCoTHAllocator;
|
||||
|
||||
inline void* G4HCofThisEvent::operator new(size_t)
|
||||
{
|
||||
void* anHCoTH;
|
||||
anHCoTH = (void*)anHCoTHAllocator.MallocSingle();
|
||||
return anHCoTH;
|
||||
}
|
||||
|
||||
inline void G4HCofThisEvent::operator delete(void* anHCoTH)
|
||||
{
|
||||
anHCoTHAllocator.FreeSingle((G4HCofThisEvent*)anHCoTH);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,34 +1,33 @@
|
||||
// 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: G4PVHit.ddl,v 1.1 1999/01/07 16:10:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// Takashi.Sasaki@kek.jp
|
||||
// $Id: G4PVHit.ddl,v 1.6 1999/11/24 20:27:24 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4PVHit_h
|
||||
#define G4PVHit_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
#include "G4VHit.hh"
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
class G4VHit;
|
||||
|
||||
class G4PVHit : public HepPersObj
|
||||
class G4PVHit
|
||||
: public HepPersObj, public G4VHit
|
||||
{
|
||||
|
||||
public:
|
||||
G4PVHit();
|
||||
virtual ~G4PVHit();
|
||||
int operator==(const G4PVHit &right) const
|
||||
{
|
||||
return (this==&right) ? true : false;
|
||||
};
|
||||
|
||||
virtual G4VHit* MakeTransientObject()=0;
|
||||
int operator==(const G4PVHit &right) const;
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,41 +1,43 @@
|
||||
// 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: G4PVHitsCollection.ddl,v 1.1 1999/01/07 16:10:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// $Id: G4PVHitsCollection.ddl,v 1.12 1999/12/01 14:45:13 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHitsCollection_h
|
||||
#define G4VHitsCollection_h 1
|
||||
#ifndef G4PVHitsCollection_h
|
||||
#define G4PVHitsCollection_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4PersistentTypes.hh"
|
||||
#include "G4PersistentSchema.hh"
|
||||
|
||||
class G4VHitsCollection
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
class G4PVHitsCollection
|
||||
: public HepPersObj
|
||||
{
|
||||
public:
|
||||
G4VHitsCollection();
|
||||
G4VHitsCollection(G4String detName,G4String colNam);
|
||||
virtual ~G4VHitsCollection();
|
||||
int operator==(const G4VHitsCollection &right) const;
|
||||
|
||||
virtual void DrawAllHits();
|
||||
virtual void PrintAllHits();
|
||||
G4PVHitsCollection(G4String detName,G4String colNam);
|
||||
~G4PVHitsCollection();
|
||||
int operator==(const G4PVHitsCollection &right) const;
|
||||
|
||||
protected:
|
||||
|
||||
// Collection name
|
||||
G4String collectionName;
|
||||
G4String SDname;
|
||||
// Persistent Collection name
|
||||
G4PString pcollectionName;
|
||||
G4PString pSDname;
|
||||
|
||||
public:
|
||||
inline G4String GetName()
|
||||
{ return collectionName; }
|
||||
{ return (G4String) pcollectionName; }
|
||||
inline G4String GetSDname()
|
||||
{ return SDname; }
|
||||
{ return (G4String) pSDname; }
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// 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: G4PersistentHitMan.hh,v 1.5 1999/11/28 21:54:15 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// class G4PersistentHitMan
|
||||
//
|
||||
// A Class responsible for registring HitsCollection
|
||||
// during event tracking.
|
||||
//
|
||||
// The class is `singleton', with access via
|
||||
// G4PersistentHitMan::GetPersistentHitMan.
|
||||
//
|
||||
// This class itself is not persistent-capable.
|
||||
//
|
||||
// Member functions:
|
||||
// =================
|
||||
// static G4PersistentHitMan* GetPersistentHitMan();
|
||||
// static G4PersistentHitMan* get_PersistentHitManIfExist();
|
||||
// Return ptr to singleton instance of the class.
|
||||
//
|
||||
// G4PersistentHitMan();
|
||||
// ~G4PersistentHitMan();
|
||||
//
|
||||
// Member data:
|
||||
// ============
|
||||
// static G4PersistentHitMan* fPersistentHitMan
|
||||
// Ptr to the unique instance of class
|
||||
//
|
||||
// History:
|
||||
// 99.11.16 Y.Morita Initial version
|
||||
|
||||
#ifndef G4PersistentHitMan_DDL
|
||||
#define G4PersistentHitMan_DDL 1
|
||||
|
||||
#include "HepODBMS/odbms/HepODBMS.h"
|
||||
|
||||
#include "G4VPersistentSubMan.hh"
|
||||
#include "G4VPersistentSubDbMan.hh"
|
||||
|
||||
#include "G4PHCofThisEvent.hh"
|
||||
|
||||
class G4PersistentHitMan
|
||||
: public G4VPersistentSubMan, public G4VPersistentSubDbMan
|
||||
{
|
||||
public:
|
||||
static G4PersistentHitMan* GetPersistentHitMan();
|
||||
static G4PersistentHitMan* get_PersistentHitManIfExist();
|
||||
|
||||
G4PersistentHitMan();
|
||||
~G4PersistentHitMan();
|
||||
|
||||
private:
|
||||
static G4PersistentHitMan * f_PersistentHitMan;
|
||||
HepRef(G4PHCofThisEvent) f_CurrentPHCofThisEvent;
|
||||
|
||||
public:
|
||||
inline void SetCurrentPHCofThisEvent( HepRef(G4PHCofThisEvent) aPHC)
|
||||
{ f_CurrentPHCofThisEvent = aPHC; };
|
||||
inline HepRef(G4PHCofThisEvent) GetCurrentPHCofThisEvent()
|
||||
{ return f_CurrentPHCofThisEvent; };
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// 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: G4PHCofThisEvent.cc,v 1.6 1999/12/02 16:10:22 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#include "G4PHCofThisEvent.hh"
|
||||
|
||||
G4PHCofThisEvent::G4PHCofThisEvent()
|
||||
{
|
||||
HC.resize(10);
|
||||
}
|
||||
|
||||
G4PHCofThisEvent::~G4PHCofThisEvent()
|
||||
{;}
|
||||
|
||||
void G4PHCofThisEvent::AddHitsCollection(G4int HCID,
|
||||
HepRef(G4PVHitsCollection) aHC)
|
||||
{
|
||||
if(HCID>=0)
|
||||
{
|
||||
if(HCID>=HC.size()) HC.resize(HCID+1);
|
||||
HC[HCID] = aHC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
// 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: G4PVHit.cc,v 1.1 1999/01/07 16:10:45 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
// Takashi.Sasaki@kek.jp
|
||||
// $Id: G4PVHit.cc,v 1.4 1999/11/24 20:27:24 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
#include "G4PVHit.hh"
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
G4PVHit::G4PVHit()
|
||||
{
|
||||
}
|
||||
{;}
|
||||
|
||||
G4PVHit::~G4PVHit()
|
||||
{;}
|
||||
|
||||
int G4PVHit::operator==(const G4PVHit &right) const
|
||||
{ return false; }
|
||||
|
||||
void G4PVHit::Draw()
|
||||
{;}
|
||||
|
||||
void G4PVHit::Print()
|
||||
{;}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
// 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: G4PVHitsCollection.cc,v 1.8 1999/11/28 21:54:16 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
|
||||
// G4PVHitsCollection
|
||||
|
||||
#include <assert.h>
|
||||
#include "G4PVHitsCollection.hh"
|
||||
#include "G4PersistentHitMan.hh"
|
||||
#include "G4PHCofThisEvent.hh"
|
||||
|
||||
G4PVHitsCollection::G4PVHitsCollection(G4String detName,G4String colNam)
|
||||
: pcollectionName(colNam), pSDname(detName)
|
||||
{;}
|
||||
|
||||
G4PVHitsCollection::~G4PVHitsCollection()
|
||||
{;}
|
||||
|
||||
int G4PVHitsCollection::operator==(const G4PVHitsCollection &right) const
|
||||
{
|
||||
return ((pcollectionName==right.pcollectionName)
|
||||
&&(pSDname==right.pSDname));
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
// 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: G4PersistentHitMan.cc,v 1.4 1999/11/28 21:54:16 morita Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
//
|
||||
// class G4PersistentHitMan
|
||||
//
|
||||
// History:
|
||||
// 99.11.16 Y.Morita Initial version
|
||||
|
||||
#include "G4PersistentHitMan.hh"
|
||||
|
||||
|
||||
G4PersistentHitMan* G4PersistentHitMan::f_PersistentHitMan = NULL;
|
||||
|
||||
G4PersistentHitMan* G4PersistentHitMan::GetPersistentHitMan()
|
||||
{
|
||||
if(!f_PersistentHitMan)
|
||||
{
|
||||
f_PersistentHitMan = new G4PersistentHitMan;
|
||||
}
|
||||
return f_PersistentHitMan;
|
||||
}
|
||||
|
||||
G4PersistentHitMan* G4PersistentHitMan::get_PersistentHitManIfExist()
|
||||
{ return f_PersistentHitMan; }
|
||||
|
||||
G4PersistentHitMan::G4PersistentHitMan()
|
||||
: f_CurrentPHCofThisEvent(NULL)
|
||||
{;}
|
||||
|
||||
G4PersistentHitMan::~G4PersistentHitMan()
|
||||
{;}
|
||||
|
||||
Reference in New Issue
Block a user