Import Geant4 7.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 12:11:21 +02:00
parent 516dbf1a58
commit d93e1e39a9
5384 changed files with 125662 additions and 82444 deletions
@@ -0,0 +1,120 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4HCofThisEvent.hh,v 1.1 2004/11/22 17:39:47 cooperma Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
#ifndef G4HCofThisEvent_h
#define G4HCofThisEvent_h 1
#include "globals.hh"
#include "G4Allocator.hh"
#include "G4VHitsCollection.hh"
#include "g4std/vector"
// class description:
//
// This is a class which stores hits collections generated at one event.
// This class is exclusively constructed by G4SDManager when the first
// hits collection of an event is passed to the manager, and this class
// object is deleted by G4RunManager when a G4Event class object is deleted.
// Almost all public methods must be used by Geant4 kernel classes and
// the user should not invoke them. The user can use two const methods,
// GetHC() and GetNumberOfCollections() for accessing to the stored hits
// collection(s).
//vietha 2003/04/26 , include files needed to copy to the beginning of MarshaledG4HCofThisEvent.h
// in order to compile
//MSH_include_begin
#include "G4SDManager.hh"
#include "G4THitsCollection.hh"
#include "ExN02TrackerHit.hh"
#include "MarshaledExN02TrackerHit.h"
#include "MarshaledG4THitsCollection.h"
#include "MarshaledG4VHitsCollection.h"
//MSH_include_end
//MSH_BEGIN
class G4HCofThisEvent
{
public:
G4HCofThisEvent();
G4HCofThisEvent(G4int cap);
~G4HCofThisEvent();
inline void *operator new(size_t);
inline void operator delete(void* anHCoTE);
void AddHitsCollection(G4int HCID,G4VHitsCollection * aHC);
private:
G4std::vector<G4VHitsCollection*> * HC; /*MSH: ptr_as_array
[elementType: G4VHitsCollection*]
[elementCount: { $ELE_COUNT = $THIS->GetNumberOfCollections(); }]
[elementGet: { $ELEMENT = $THIS->GetHC($ELE_INDEX); }]
[elementSet: { $THIS->AddHitsCollection($ELE_INDEX, $ELEMENT); }] */
public: // with description
inline G4VHitsCollection* GetHC(G4int i)
{ return (*HC)[i]; }
// Returns a pointer to a hits collection. Null will be returned
// if the particular collection is not stored at the current event.
// The integer argument is ID number which is assigned by G4SDManager
// and the number can be obtained by G4SDManager::GetHitsCollectionID()
// method.
inline G4int GetNumberOfCollections()
{
G4int n = 0;
for(size_t i=0;i<HC->size();i++)
{
if((*HC)[i]) n++;
}
return n;
}
// Returns the number of hits collections which are stored in this class
// object.
public:
inline G4int GetCapacity()
{
return HC->size();
}
};
//MSH_END
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
@@ -0,0 +1,56 @@
%{
#include <G4HCofThisEvent.hh>
//MSH_include_begin
#include "G4SDManager.hh"
#include "G4THitsCollection.hh"
#include "ExN02TrackerHit.hh"
#include "MarshaledExN02TrackerHit.h"
#include "MarshaledG4THitsCollection.h"
#include "MarshaledG4VHitsCollection.h"
//MSH_include_end
%}
marshaling class MarshaledG4HCofThisEvent (G4HCofThisEvent* param) {
G4std::vector<G4VHitsCollection*> * HC;
//FIELDMARSHAL:
{
int copy_off = 0;
int $ELE_COUNT;
$ELE_COUNT = $THIS->GetNumberOfCollections();
memcpy( $$+copy_off, &$ELE_COUNT,sizeof(int));
copy_off += sizeof(int);
for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){
G4VHitsCollection* $ELEMENT;
$ELEMENT = $THIS->GetHC($ELE_INDEX);
MarshaledG4VHitsCollection marEle($ELEMENT);
EXTEND_BUFFER(marEle.getBufferSize());
memcpy($$+copy_off, marEle.getBuffer(), marEle.getBufferSize());
copy_off += marEle.getBufferSize();
}
$SIZE = copy_off;
}
//FIELDUNMARSHAL:
{
int copy_off = 0;
int $ELE_COUNT;
memcpy(&$ELE_COUNT, $$+copy_off, sizeof(int));
copy_off += sizeof(int);
for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){
MarshaledG4VHitsCollection marEle($$+copy_off);
G4VHitsCollection* $ELEMENT = (G4VHitsCollection*)marEle.unmarshal();
copy_off += marEle.getBufferSize();
$THIS->AddHitsCollection($ELE_INDEX, $ELEMENT);
}
}
//FIELDSIZE:
{
}
unmarshaling constructor {
$THIS = new G4HCofThisEvent();
}
}
@@ -20,53 +20,33 @@
// * statement, and all its terms. *
// ********************************************************************
//
//
// $Id: ExN02VisManager.hh,v 1.1 2002/03/05 15:21:58 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
/*
This file only serves as a place-holder for the annotations of G4String class,
which is a type alias in Geant4.
Only the marshaling code (MarshaledG4String.hh) generated from this file
should be used in your code. Please make sure that this G4String.hh
itself is NOT included in your code. Otherwise, it will override Geant4's
valid G4String class and bad things would happen.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
vietha 2003.05.08
*/
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, etc., which are set by the GNUmakefiles if
// environment variables of the same name are set.
// So all you have to do is set environment variables and compile and
// instantiate this in your main().
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifndef ExN02VisManager_h
#define ExN02VisManager_h 1
#ifdef G4VIS_USE
#include "G4VisManager.hh"
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
class ExN02VisManager: public G4VisManager {
public:
ExN02VisManager ();
private:
void RegisterGraphicsSystems ();
#ifndef G4String_h
#define G4String_h
//MSH_BEGIN
class G4String{
int dummy; /*MSH: manual
{ memcpy($$, param->c_str(), param->size());
*($$+param->size()) = '\0';
}
{ G4String* s = new G4String($$);
memcpy(param, s, sizeof(G4String));
}
{ int size = param->size()+1;
while(size%8) size++;
$SIZE = size; } */
};
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#endif
//MSH_END
#endif
@@ -0,0 +1,31 @@
%{
#include <G4String.hh>
%}
marshaling class MarshaledG4String (G4String* param) {
int dummy;
//FIELDMARSHAL:
{
memcpy($$, param->c_str(), param->size());
*($$+param->size()) = '\0';
}
//FIELDUNMARSHAL:
{
G4String* s = new G4String($$);
memcpy(param, s, sizeof(G4String));
}
//FIELDSIZE:
{
int size = param->size()+1;
while(size%8) size++;
$SIZE = size;
}
unmarshaling constructor {
$THIS = new G4String();
}
}
@@ -0,0 +1,184 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4THitsCollection.hh,v 1.1 2004/11/22 17:39:47 cooperma Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
#ifndef G4THitsCollection_h
#define G4THitsCollection_h 1
#include "G4VHitsCollection.hh"
#include "G4Allocator.hh"
#include "globals.hh"
//#include "g4rw/tpordvec.h"
#include "g4std/vector"
// class description:
//
// This is a template class of hits collection and parametrized by
// The concrete class of G4VHit. This is a uniform collection for
// a particular concrete hit class objects.
// An intermediate layer class G4HitsCollection appeared in this
// header file is used just for G4Allocator, because G4Allocator
// cannot be instansiated with a template class. Thus G4HitsCollection
// class MUST NOT be directly used by the user.
//MSH_BEGIN
class G4HitsCollection : public G4VHitsCollection
{
public:
G4HitsCollection();
G4HitsCollection(G4String detName,G4String colNam);
virtual ~G4HitsCollection();
G4int operator==(const G4HitsCollection &right) const;
protected:
void* theCollection; /*MSH: ptr_as_array
[elementType: ExN02TrackerHit* ]
[elementCount: { $ELE_COUNT = ((G4THitsCollection<ExN02TrackerHit>*)$THIS)->entries(); }]
[elementGet: { $ELEMENT = (*((G4THitsCollection<ExN02TrackerHit>*)$THIS))[$ELE_INDEX]; }]
[elementSet: { ((G4THitsCollection<ExN02TrackerHit>*)$THIS)->insert((ExN02TrackerHit*)$ELEMENT); }]
*/
};
//MSH_END
extern G4Allocator<G4HitsCollection> anHCAllocator;
//MSH_BEGIN
template <class T> class G4THitsCollection : public G4HitsCollection
{
public:
G4THitsCollection();
public: // with description
G4THitsCollection(G4String detName,G4String colNam);
// constructor.
public:
virtual ~G4THitsCollection();
G4int operator==(const G4THitsCollection<T> &right) const;
inline void *operator new(size_t);
inline void operator delete(void* anHC);
public: // with description
virtual void DrawAllHits();
virtual void PrintAllHits();
// These two methods invokes Draw() and Print() methods of all of
// hit objects stored in this collection, respectively.
public: // with description
inline T* operator[](size_t i) const
{ return (*((G4std::vector<T*>*)theCollection))[i]; }
// Returns a pointer to a concrete hit object.
inline G4std::vector<T*>* GetVector() const
{ return (G4std::vector<T*>*)theCollection; }
// Returns a collection vector.
inline G4int insert(T* aHit)
{
G4std::vector<T*>*theHitsCollection
= (G4std::vector<T*>*)theCollection;
theHitsCollection->push_back(aHit);
return theHitsCollection->size();
}
// Insert a hit object. Total number of hit objects stored in this
// collection is returned.
inline G4int entries() const
{
G4std::vector<T*>*theHitsCollection
= (G4std::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]; }
virtual size_t GetSize() const
{ return ((G4std::vector<T*>*)theCollection)->size(); }
// MSH_superclass : G4HitsCollection
};
//MSH_END
template <class T> inline void* G4THitsCollection<T>::operator new(size_t)
{
void* anHC;
anHC = (void*)anHCAllocator.MallocSingle();
return anHC;
}
template <class T> inline void G4THitsCollection<T>::operator delete(void* anHC)
{
anHCAllocator.FreeSingle((G4HitsCollection*)anHC);
}
template <class T> G4THitsCollection<T>::G4THitsCollection()
{
G4std::vector<T*> * theHitsCollection
= new G4std::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*>;
theCollection = (void*)theHitsCollection;
}
template <class T> G4THitsCollection<T>::~G4THitsCollection()
{
G4std::vector<T*> * theHitsCollection
= (G4std::vector<T*>*)theCollection;
//theHitsCollection->clearAndDestroy();
for(size_t i=0;i<theHitsCollection->size();i++)
{ delete (*theHitsCollection)[i]; }
theHitsCollection->clear();
delete theHitsCollection;
}
template <class T> G4int G4THitsCollection<T>::operator==(const G4THitsCollection<T> &right) const
{ return (collectionName==right.collectionName); }
template <class T> void G4THitsCollection<T>::DrawAllHits()
{
G4std::vector<T*> * theHitsCollection
= (G4std::vector<T*>*)theCollection;
size_t n = theHitsCollection->size();
for(size_t i=0;i<n;i++)
{ (*theHitsCollection)[i]->Draw(); }
}
template <class T> void G4THitsCollection<T>::PrintAllHits()
{
G4std::vector<T*> * theHitsCollection
= (G4std::vector<T*>*)theCollection;
size_t n = theHitsCollection->size();
for(size_t i=0;i<n;i++)
{ (*theHitsCollection)[i]->Print(); }
}
#endif
@@ -0,0 +1,75 @@
%{
#include <G4THitsCollection.hh>
%}
marshaling class MarshaledG4HitsCollection (G4HitsCollection* param) {
void* theCollection;
//FIELDMARSHAL:
{
int copy_off = 0;
int $ELE_COUNT;
$ELE_COUNT = ((G4THitsCollection<ExN02TrackerHit>*)$THIS)->entries();
memcpy( $$+copy_off, &$ELE_COUNT,sizeof(int));
copy_off += sizeof(int);
for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){
ExN02TrackerHit* $ELEMENT;
$ELEMENT = (*((G4THitsCollection<ExN02TrackerHit>*)$THIS))[$ELE_INDEX];
MarshaledExN02TrackerHit marEle($ELEMENT);
EXTEND_BUFFER(marEle.getBufferSize());
memcpy($$+copy_off, marEle.getBuffer(), marEle.getBufferSize());
copy_off += marEle.getBufferSize();
}
$SIZE = copy_off;
}
//FIELDUNMARSHAL:
{
int copy_off = 0;
int $ELE_COUNT;
memcpy(&$ELE_COUNT, $$+copy_off, sizeof(int));
copy_off += sizeof(int);
for(int $ELE_INDEX=0;$ELE_INDEX<$ELE_COUNT;$ELE_INDEX++){
MarshaledExN02TrackerHit marEle($$+copy_off);
ExN02TrackerHit* $ELEMENT = (ExN02TrackerHit* )marEle.unmarshal();
copy_off += marEle.getBufferSize();
((G4THitsCollection<ExN02TrackerHit>*)$THIS)->insert((ExN02TrackerHit*)$ELEMENT);
}
}
//FIELDSIZE:
{
}
unmarshaling constructor {
$THIS = new G4HitsCollection();
}
}
template <class T> marshaling class MarshaledG4THitsCollection<T> (G4THitsCollection<T>* param) : public G4HitsCollection {
int __dummy848; // marshaling code for MSH_superclass
//FIELDMARSHAL:
{
MarshaledG4HitsCollection marParent($THIS);
EXTEND_BUFFER(marParent.getBufferSize());
memcpy($$,marParent.getBuffer(), marParent.getBufferSize());
$SIZE = marParent.getBufferSize();
}
//FIELD UNMARSHAL:
{
MarshaledG4HitsCollection marObj($$);
marObj.unmarshalTo($THIS);
}
//FIELD SIZE :
{
//code for size, just dummy code because the size will be set correctly at the end of marshaling code
}
unmarshaling constructor {
$THIS = new G4THitsCollection<T>();
}
}
@@ -0,0 +1,86 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: G4VHitsCollection.hh,v 1.1 2004/11/22 17:39:48 cooperma Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
#ifndef G4VHitsCollection_h
#define G4VHitsCollection_h 1
class G4VHit;
#include "globals.hh"
// class description:
//
// This is the base class of hits collection. The user is advised to
// use G4THitsCollection template class in case his/her collection is
// transient. While, in case the collection is persistent with ODBMS,
// the concrete collection class can be directly derived from this
// class.
// Geant4 kernel will use this class methods.
//MSH_BEGIN
class G4VHitsCollection
{
public:
G4VHitsCollection();
G4VHitsCollection(G4String detName,G4String colNam);
virtual ~G4VHitsCollection();
G4int operator==(const G4VHitsCollection &right) const;
virtual void DrawAllHits();
virtual void PrintAllHits();
protected:
// Collection name
G4String collectionName; /*MSH: predefined
[elementGet: { $ELEMENT = $THIS->GetName(); }]
[elementSet: { Shadowed_param->collectionName=$ELEMENT; }]
*/
G4String SDname; /* MSH: predefined
[elementGet: { $ELEMENT = $THIS->GetSDname(); }]
[elementSet: { Shadowed_param->SDname=$ELEMENT; }]
*/
/* MSH_derivedclass: G4THitsCollection<ExN02TrackerHit>("","") */
public:
inline G4String GetName()
{ return collectionName; }
inline G4String GetSDname()
{ return SDname; }
public:
// 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 size_t GetSize() const { return 0; };
};
//MSH_END
#endif
@@ -0,0 +1,81 @@
%{
#include <G4VHitsCollection.hh>
%}
marshaling class MarshaledG4VHitsCollection (G4VHitsCollection* param) {
G4String collectionName;
//FIELDMARSHAL:
{
G4String $ELEMENT;
$ELEMENT = $THIS->GetName();
MarshaledG4String var(&$ELEMENT);
EXTEND_BUFFER(var.getBufferSize());
$SIZE = var.getBufferSize();
memcpy($$, var.getBuffer(), var.getBufferSize());
}
//FIELDUNMARSHAL:
{
MarshaledG4String var($$, 'u');
G4String $ELEMENT;
var.unmarshalTo(&$ELEMENT);
Shadowed_param->collectionName=$ELEMENT;
}
//FIELDSIZE:
{
// no need to declare size since $SIZE is already assigned in the MARSHAL field
}
G4String SDname;
//FIELDMARSHAL:
{
G4String $ELEMENT;
$ELEMENT = $THIS->GetSDname();
MarshaledG4String var(&$ELEMENT);
EXTEND_BUFFER(var.getBufferSize());
$SIZE = var.getBufferSize();
memcpy($$, var.getBuffer(), var.getBufferSize());
}
//FIELDUNMARSHAL:
{
MarshaledG4String var($$, 'u');
G4String $ELEMENT;
var.unmarshalTo(&$ELEMENT);
Shadowed_param->SDname=$ELEMENT;
}
//FIELDSIZE:
{
// no need to declare size since $SIZE is already assigned in the MARSHAL field
}
int __dummy100; // marshaling code for MSH_derivedclass
//FIELDMARSHAL:
{
G4THitsCollection<ExN02TrackerHit> *aObj100 = (G4THitsCollection<ExN02TrackerHit>*)$THIS;
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj100);
EXTEND_BUFFER(marChild.getBufferSize());
memcpy($$,marChild.getBuffer(), marChild.getBufferSize());
$SIZE = marChild.getBufferSize();
$TYPE_CHOICE = 0;
}
//FIELD UNMARSHAL:
{
MarshaledG4THitsCollection<ExN02TrackerHit> marObj($$);
marObj.unmarshalTo((G4THitsCollection<ExN02TrackerHit>*)$THIS);
}
//FIELD SIZE :
{
//code for size, just dummy code because the size will be set correctly at the end of marshaling code
}
unmarshaling constructor {
$THIS = new G4THitsCollection<ExN02TrackerHit>("","");
}
}
@@ -0,0 +1,162 @@
// This file was generated automatically by marshalgen.
#ifndef MarshaledG4HCofThisEvent_H
#define MarshaledG4HCofThisEvent_H
#include <G4HCofThisEvent.hh>
//MSH_include_begin
#include "G4SDManager.hh"
#include "G4THitsCollection.hh"
#include "ExN02TrackerHit.hh"
#include "MarshaledExN02TrackerHit.h"
#include "MarshaledG4THitsCollection.h"
#include "MarshaledG4VHitsCollection.h"
//MSH_include_end
#include <stdio.h>
#include <string.h>
#include "MarshaledObj.h"
class MarshaledG4HCofThisEvent;
class ShadowedMarshaledG4HCofThisEvent : public G4HCofThisEvent{
friend class MarshaledG4HCofThisEvent;
};
class MarshaledG4HCofThisEvent : public MarshaledObj {
public:
G4HCofThisEvent* param;
ShadowedMarshaledG4HCofThisEvent* Shadowed_param;
public:
// Function implementations
MarshaledG4HCofThisEvent(G4HCofThisEvent* objptr) : MarshaledObj() {
msh_isUnmarshalDone = false;
this->param = objptr;
this->Shadowed_param = (ShadowedMarshaledG4HCofThisEvent*)this->param;
if (objptr == NULL)
return;
marshal1();
}
MarshaledG4HCofThisEvent(void *buf, char isUnmarshaling = 'u')
: MarshaledObj(buf, isUnmarshaling) {
msh_isUnmarshalDone = false;
}
~MarshaledG4HCofThisEvent() {
//if(msh_isUnmarshalDone && this->param != NULL) {
//delete this->param;
//}
}
G4HCofThisEvent* unmarshal() {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return NULL;
} else {
{
param = new G4HCofThisEvent();
}
this->Shadowed_param = (ShadowedMarshaledG4HCofThisEvent*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
return this->param;
}
}
void unmarshalTo(G4HCofThisEvent* obj) {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return;
} else {
this->param = obj;
this->Shadowed_param = (ShadowedMarshaledG4HCofThisEvent*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
}
}
void marshal1() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
int copy_off = 0;
int elementNum;
elementNum = param->GetNumberOfCollections();
memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
copy_off += sizeof(int);
for(int index=0;index<elementNum;index++){
G4VHitsCollection* anElement;
anElement = param->GetHC(index);
MarshaledG4VHitsCollection marEle(anElement);
EXTEND_BUFFER(marEle.getBufferSize());
memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
copy_off += marEle.getBufferSize();
}
msh_currentSize = copy_off;
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal1() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
int copy_off = 0;
int elementNum;
memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
copy_off += sizeof(int);
for(int index=0;index<elementNum;index++){
MarshaledG4VHitsCollection marEle(msh_cursor+copy_off);
G4VHitsCollection* anElement = (G4VHitsCollection*)marEle.unmarshal();
copy_off += marEle.getBufferSize();
param->AddHitsCollection(index, anElement);
}
}
msh_cursor += msh_currentSize;
}
};
#endif
@@ -0,0 +1,137 @@
// This file was generated automatically by marshalgen.
#ifndef MarshaledG4String_H
#define MarshaledG4String_H
#include <G4String.hh>
#include <stdio.h>
#include <string.h>
#include "MarshaledObj.h"
class MarshaledG4String;
class ShadowedMarshaledG4String : public G4String{
friend class MarshaledG4String;
};
class MarshaledG4String : public MarshaledObj {
public:
G4String* param;
ShadowedMarshaledG4String* Shadowed_param;
public:
// Function implementations
MarshaledG4String(G4String* objptr) : MarshaledObj() {
msh_isUnmarshalDone = false;
this->param = objptr;
this->Shadowed_param = (ShadowedMarshaledG4String*)this->param;
if (objptr == NULL)
return;
marshal1();
}
MarshaledG4String(void *buf, char isUnmarshaling = 'u')
: MarshaledObj(buf, isUnmarshaling) {
msh_isUnmarshalDone = false;
}
~MarshaledG4String() {
//if(msh_isUnmarshalDone && this->param != NULL) {
//delete this->param;
//}
}
G4String* unmarshal() {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return NULL;
} else {
{
param = new G4String();
}
this->Shadowed_param = (ShadowedMarshaledG4String*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
return this->param;
}
}
void unmarshalTo(G4String* obj) {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return;
} else {
this->param = obj;
this->Shadowed_param = (ShadowedMarshaledG4String*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
}
}
void marshal1() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
int size = param->size()+1;
while(size%8) size++;
msh_currentSize = size;
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
memcpy(msh_cursor, param->c_str(), param->size());
*(msh_cursor+param->size()) = '\0';
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal1() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
G4String* s = new G4String(msh_cursor);
memcpy(param, s, sizeof(G4String));
}
msh_cursor += msh_currentSize;
}
};
#endif
@@ -0,0 +1,279 @@
// This file was generated automatically by marshalgen.
#ifndef MarshaledG4HitsCollection_H
#define MarshaledG4HitsCollection_H
#include <G4THitsCollection.hh>
#include <stdio.h>
#include <string.h>
#include "MarshaledObj.h"
class MarshaledG4HitsCollection;
class ShadowedMarshaledG4HitsCollection : public G4HitsCollection{
friend class MarshaledG4HitsCollection;
};
template <class T> class MarshaledG4THitsCollection;
template <class T> class ShadowedMarshaledG4THitsCollection : public G4THitsCollection<T>{
friend class MarshaledG4THitsCollection<T>;
};
class MarshaledG4HitsCollection : public MarshaledObj {
public:
G4HitsCollection* param;
ShadowedMarshaledG4HitsCollection* Shadowed_param;
public:
// Function implementations
MarshaledG4HitsCollection(G4HitsCollection* objptr) : MarshaledObj() {
msh_isUnmarshalDone = false;
this->param = objptr;
this->Shadowed_param = (ShadowedMarshaledG4HitsCollection*)this->param;
if (objptr == NULL)
return;
marshal1();
}
MarshaledG4HitsCollection(void *buf, char isUnmarshaling = 'u')
: MarshaledObj(buf, isUnmarshaling) {
msh_isUnmarshalDone = false;
}
~MarshaledG4HitsCollection() {
//if(msh_isUnmarshalDone && this->param != NULL) {
//delete this->param;
//}
}
G4HitsCollection* unmarshal() {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return NULL;
} else {
{
param = new G4HitsCollection();
}
this->Shadowed_param = (ShadowedMarshaledG4HitsCollection*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
return this->param;
}
}
void unmarshalTo(G4HitsCollection* obj) {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return;
} else {
this->param = obj;
this->Shadowed_param = (ShadowedMarshaledG4HitsCollection*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
}
}
void marshal1() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
int copy_off = 0;
int elementNum;
elementNum = ((G4THitsCollection<ExN02TrackerHit>*)param)->entries();
memcpy( msh_cursor+copy_off, &elementNum,sizeof(int));
copy_off += sizeof(int);
for(int index=0;index<elementNum;index++){
ExN02TrackerHit* anElement;
anElement = (*((G4THitsCollection<ExN02TrackerHit>*)param))[index];
MarshaledExN02TrackerHit marEle(anElement);
EXTEND_BUFFER(marEle.getBufferSize());
memcpy(msh_cursor+copy_off, marEle.getBuffer(), marEle.getBufferSize());
copy_off += marEle.getBufferSize();
}
msh_currentSize = copy_off;
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal1() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
int copy_off = 0;
int elementNum;
memcpy(&elementNum, msh_cursor+copy_off, sizeof(int));
copy_off += sizeof(int);
for(int index=0;index<elementNum;index++){
MarshaledExN02TrackerHit marEle(msh_cursor+copy_off);
ExN02TrackerHit* anElement = (ExN02TrackerHit* )marEle.unmarshal();
copy_off += marEle.getBufferSize();
((G4THitsCollection<ExN02TrackerHit>*)param)->insert((ExN02TrackerHit*)anElement);
}
}
msh_cursor += msh_currentSize;
}
};
template <class T> class MarshaledG4THitsCollection : public MarshaledObj {
public:
G4THitsCollection<T>* param;
ShadowedMarshaledG4THitsCollection<T>* Shadowed_param;
public:
// Function implementations
MarshaledG4THitsCollection(G4THitsCollection<T>* objptr) : MarshaledObj() {
msh_isUnmarshalDone = false;
this->param = objptr;
this->Shadowed_param = (ShadowedMarshaledG4THitsCollection<T>*)this->param;
if (objptr == NULL)
return;
marshal1();
}
MarshaledG4THitsCollection(void *buf, char isUnmarshaling = 'u')
: MarshaledObj(buf, isUnmarshaling) {
msh_isUnmarshalDone = false;
}
~MarshaledG4THitsCollection() {
//if(msh_isUnmarshalDone && this->param != NULL) {
//delete this->param;
//}
}
G4THitsCollection<T>* unmarshal() {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return NULL;
} else {
{
param = new G4THitsCollection<T>();
}
this->Shadowed_param = (ShadowedMarshaledG4THitsCollection<T>*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
return this->param;
}
}
void unmarshalTo(G4THitsCollection<T>* obj) {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return;
} else {
this->param = obj;
this->Shadowed_param = (ShadowedMarshaledG4THitsCollection<T>*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
}
}
void marshal1() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
//code for size, just dummy code because the size will be set correctly at the end of marshaling code
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
MarshaledG4HitsCollection marParent(param);
EXTEND_BUFFER(marParent.getBufferSize());
memcpy(msh_cursor,marParent.getBuffer(), marParent.getBufferSize());
msh_currentSize = marParent.getBufferSize();
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal1() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
MarshaledG4HitsCollection marObj(msh_cursor);
marObj.unmarshalTo(param);
}
msh_cursor += msh_currentSize;
}
};
#endif
@@ -0,0 +1,262 @@
// This file was generated automatically by marshalgen.
#ifndef MarshaledG4VHitsCollection_H
#define MarshaledG4VHitsCollection_H
#include <G4VHitsCollection.hh>
#include <stdio.h>
#include <string.h>
#include "MarshaledObj.h"
class MarshaledG4VHitsCollection;
class ShadowedMarshaledG4VHitsCollection : public G4VHitsCollection{
friend class MarshaledG4VHitsCollection;
};
class MarshaledG4VHitsCollection : public MarshaledObj {
public:
G4VHitsCollection* param;
ShadowedMarshaledG4VHitsCollection* Shadowed_param;
public:
// Function implementations
MarshaledG4VHitsCollection(G4VHitsCollection* objptr) : MarshaledObj() {
msh_isUnmarshalDone = false;
this->param = objptr;
this->Shadowed_param = (ShadowedMarshaledG4VHitsCollection*)this->param;
if (objptr == NULL)
return;
marshal1();
marshal2();
marshal3();
}
MarshaledG4VHitsCollection(void *buf, char isUnmarshaling = 'u')
: MarshaledObj(buf, isUnmarshaling) {
msh_isUnmarshalDone = false;
}
~MarshaledG4VHitsCollection() {
//if(msh_isUnmarshalDone && this->param != NULL) {
//delete this->param;
//}
}
G4VHitsCollection* unmarshal() {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return NULL;
} else {
{
param = new G4THitsCollection<ExN02TrackerHit>("","");
}
this->Shadowed_param = (ShadowedMarshaledG4VHitsCollection*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
unmarshal2();
unmarshal3();
return this->param;
}
}
void unmarshalTo(G4VHitsCollection* obj) {
//We don't want to unmarshal the buffer is empty.
if(msh_size <= MSH_HEADER_SIZE) {
//This is buggy, we can't always assume that
//obj == NULL <==> List is empty.
return;
} else {
this->param = obj;
this->Shadowed_param = (ShadowedMarshaledG4VHitsCollection*)this->param;
this->msh_isUnmarshalDone = true;
unmarshal1();
unmarshal2();
unmarshal3();
}
}
void marshal1() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
// no need to declare size since msh_currentSize is already assigned in the MARSHAL field
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
G4String anElement;
anElement = param->GetName();
MarshaledG4String var(&anElement);
EXTEND_BUFFER(var.getBufferSize());
msh_currentSize = var.getBufferSize();
memcpy(msh_cursor, var.getBuffer(), var.getBufferSize());
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal1() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
MarshaledG4String var(msh_cursor, 'u');
G4String anElement;
var.unmarshalTo(&anElement);
Shadowed_param->collectionName=anElement;
}
msh_cursor += msh_currentSize;
}
void marshal2() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
// no need to declare size since msh_currentSize is already assigned in the MARSHAL field
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
G4String anElement;
anElement = param->GetSDname();
MarshaledG4String var(&anElement);
EXTEND_BUFFER(var.getBufferSize());
msh_currentSize = var.getBufferSize();
memcpy(msh_cursor, var.getBuffer(), var.getBufferSize());
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal2() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
MarshaledG4String var(msh_cursor, 'u');
G4String anElement;
var.unmarshalTo(&anElement);
Shadowed_param->SDname=anElement;
}
msh_cursor += msh_currentSize;
}
void marshal3() {
//declare field_size to be the size of this field
int msh_currentSize = 0;
if (isUnmarshaling())
throw "Tried to marshal in obj marked isUnmarshaling == true";
//Copy the sizespec into msh_currentSize here:
{
//code for size, just dummy code because the size will be set correctly at the end of marshaling code
}
//Increase the size of buffer if needed
EXTEND_BUFFER(msh_currentSize + sizeof(int) + sizeof(int)); // 4 bytes for the total size of field, 4 bytes for the number of elements in the array (in the case of array marshaling)
//Mark the beginning position for this field, will write the total size of this field here later
msh_field_begin = msh_cursor;
//Advance cursor of distance = sizeof(int)
msh_cursor += sizeof(int);
//Now just copy "get" functions here
{
G4THitsCollection<ExN02TrackerHit> *aObj100 = (G4THitsCollection<ExN02TrackerHit>*)param;
MarshaledG4THitsCollection<ExN02TrackerHit> marChild(aObj100);
EXTEND_BUFFER(marChild.getBufferSize());
memcpy(msh_cursor,marChild.getBuffer(), marChild.getBufferSize());
msh_currentSize = marChild.getBufferSize();
msh_typechoice = 0;
}
//Now advance the cursor
msh_cursor += msh_currentSize;
//Now set the size of this field
int tmp; //use memcpy instead of *(int*)... =... to prevent bus error
tmp = (msh_cursor-msh_field_begin) - sizeof(int);
memcpy(msh_field_begin, &tmp, sizeof(int));
//Now set msh_size
msh_size = msh_cursor - msh_buffer;
MSH_SET_TOTALSIZE(msh_size); MSH_SET_TYPECHOICE(msh_typechoice);
}
void unmarshal3() {
//declare currentSize to be the size of this field
int msh_currentSize = 0;
//copy the size of the current field into currentSize
memcpy(&msh_currentSize, msh_cursor, sizeof(int));
msh_cursor += sizeof(int);
//Now copy the setspec here
{
MarshaledG4THitsCollection<ExN02TrackerHit> marObj(msh_cursor);
marObj.unmarshalTo((G4THitsCollection<ExN02TrackerHit>*)param);
}
msh_cursor += msh_currentSize;
}
};
#endif
+8 -1
View File
@@ -1,4 +1,4 @@
$Id: History,v 1.7 2004/11/26 16:49:52 gcosmo Exp $
$Id: History,v 1.9 2005/05/03 10:05:49 allison Exp $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,13 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
3rd May 2005 John Allison (examples-V07-00-03)
- Replaced vis manager with G4VisExecutive.
Nov 22nd, 2004 G.Cooperman - ParN02-V07-00-00
---------------------------
- Added annotated files.
Nov 22nd, 2004 G.Cooperman and V.H.Nguyen - ParN02-V06-02-00
------------------------------------------
- New version of marshaling/unmarshaling code, generated from
+4 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: ParN02.cc,v 1.2 2002/03/09 06:21:18 cooperma Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// $Id: ParN02.cc,v 1.3 2005/05/03 10:21:16 allison Exp $
// GEANT4 tag $Name: geant4-07-01 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -42,7 +42,7 @@
#include "G4UItcsh.hh"
#ifdef G4VIS_USE
#include "ExN02VisManager.hh"
#include "G4VisExecutive.hh"
#endif
#include "ParTopC.icc"
@@ -64,7 +64,7 @@ int main(int argc,char** argv) {
#ifdef G4VIS_USE
// Visualization, if you choose to have it!
G4VisManager* visManager = new ExN02VisManager;
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: ParTopC.icc,v 1.1 2002/03/09 06:25:03 cooperma Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
// --------------------------------------------------------------------
// 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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//
// 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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//
// 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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
// This class manages the verbose outputs in G4SteppingManager.
// It inherits from G4SteppingVerbose.
@@ -22,7 +22,7 @@
//
//
// $Id: ExN02TrackerHit.hh,v 1.3 2003/12/03 14:15:03 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -22,7 +22,7 @@
//
//
// $Id: ExN02TrackerSD.hh,v 1.1 2002/03/05 15:21:58 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -21,7 +21,7 @@
// ********************************************************************
//
// $Id: ParRunManager.hh,v 1.2 2002/06/06 17:05:02 cooperma Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
// --------------------------------------------------------------------
// 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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
// 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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....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-00-cand-01 $
// GEANT4 tag $Name: geant4-07-01 $
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -1,145 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * Neither the authors of this software system, nor their employing *
// * institutes,nor the agencies providing financial support for this *
// * work make any representation or warranty, express or implied, *
// * regarding this software system or assume any liability for its *
// * use. *
// * *
// * 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: ExN02VisManager.cc,v 1.3 2003/11/13 15:11:38 johna Exp $
// GEANT4 tag $Name: geant4-07-00-cand-01 $
//
//
// John Allison 24th January 1998.
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#ifdef G4VIS_USE
#include "ExN02VisManager.hh"
// Supported drivers...
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4HepRep.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_OPENGLX
#include "G4OpenGLImmediateX.hh"
#include "G4OpenGLStoredX.hh"
#endif
#ifdef G4VIS_USE_OPENGLWIN32
#include "G4OpenGLImmediateWin32.hh"
#include "G4OpenGLStoredWin32.hh"
#endif
#ifdef G4VIS_USE_OPENGLXM
#include "G4OpenGLImmediateXm.hh"
#include "G4OpenGLStoredXm.hh"
#endif
#ifdef G4VIS_USE_OIX
#include "G4OpenInventorX.hh"
#endif
#ifdef G4VIS_USE_OIWIN32
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
#include "G4VRML2.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExN02VisManager::ExN02VisManager () {}
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
void ExN02VisManager::RegisterGraphicsSystems () {
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4HepRep);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_OPENGLX
RegisterGraphicsSystem (new G4OpenGLImmediateX);
RegisterGraphicsSystem (new G4OpenGLStoredX);
#endif
#ifdef G4VIS_USE_OPENGLWIN32
RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
RegisterGraphicsSystem (new G4OpenGLStoredWin32);
#endif
#ifdef G4VIS_USE_OPENGLXM
RegisterGraphicsSystem (new G4OpenGLImmediateXm);
RegisterGraphicsSystem (new G4OpenGLStoredXm);
#endif
#ifdef G4VIS_USE_OIX
RegisterGraphicsSystem (new G4OpenInventorX);
#endif
#ifdef G4VIS_USE_OIWIN32
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
RegisterGraphicsSystem (new G4VRML2);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......