Import Geant4 4.0.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.4 2001/02/08 06:11:34 asaim Exp $
|
||||
$Id: History,v 1.5 2001/07/13 15:00:02 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,13 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Jul 13, 2001, G.Cosmo (digits+hits-V03-02-00)
|
||||
- Cleanup of pedantic warnings in Linux-g++ ANSI setup.
|
||||
- Corrected "int" to "G4int".
|
||||
- Corrected "NULL" to "0".
|
||||
- Synchronised with HEAD revision after inclusion of disclaimer
|
||||
liability.
|
||||
|
||||
Feb 8, 2001, M.Asai (digits+hits-V03-00-01)
|
||||
- STL vector classes migration
|
||||
affected files :
|
||||
@@ -37,7 +44,6 @@ Feb 8, 2001, M.Asai (digits+hits-V03-00-01)
|
||||
./digits+hits/hits/include/G4THitsCollection.hh
|
||||
./digits+hits/hits/src/G4HCofThisEvent.cc
|
||||
|
||||
|
||||
Nov 4, 99, M.Asai (tag digits+hits-V00-01-00)
|
||||
- Comments are enriched for software reference manual.
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CollectionNameVector.hh,v 1.1.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4CollectionNameVector.hh,v 1.2 2001/07/11 09:58:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4CollectionNameVector_H
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCtable.hh,v 1.5.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4HCtable.hh,v 1.6 2001/07/11 09:58:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCtable_H
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDManager.hh,v 1.3.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SDManager.hh,v 1.4 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDManager_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDStructure.hh,v 1.5.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SDStructure.hh,v 1.7 2001/07/13 15:00:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDStructure_h
|
||||
@@ -32,8 +32,6 @@
|
||||
#include "globals.hh"
|
||||
// G4VSensitiveDetector
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
// G4RWTPtrOrderedVector
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
class G4HCofThisEvent;
|
||||
@@ -50,7 +48,7 @@ class G4SDStructure
|
||||
G4SDStructure(G4String aPath);
|
||||
~G4SDStructure();
|
||||
|
||||
int operator==(const G4SDStructure &right) const;
|
||||
G4int operator==(const G4SDStructure &right) const;
|
||||
|
||||
void AddNewDetector(G4VSensitiveDetector*aSD, G4String treeStructure);
|
||||
void Activate(G4String aName, G4bool sensitiveFlag);
|
||||
@@ -75,9 +73,9 @@ class G4SDStructure
|
||||
inline void SetVerboseLevel(G4int vl)
|
||||
{
|
||||
verboseLevel = vl;
|
||||
for(int i=0; i<structure.size(); i++)
|
||||
for(size_t i=0; i<structure.size(); i++)
|
||||
{ structure[i]->SetVerboseLevel(vl); }
|
||||
for(int j=0; j<detector.size(); j++)
|
||||
for(size_t j=0; j<detector.size(); j++)
|
||||
{ detector[j]->SetVerboseLevel(vl); }
|
||||
};
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDmessenger.hh,v 1.3.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SDmessenger.hh,v 1.4 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4SDmessenger_h
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.hh,v 1.5.2.2 2001/06/28 20:18:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SensitiveVolumeList.hh,v 1.6 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
// GEANT 4 class header file --- Copyright CERN 1996
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.icc,v 1.4.2.2 2001/06/28 20:18:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SensitiveVolumeList.icc,v 1.5 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// -----------------------------------------------------------
|
||||
// Inline functions of GEANT 4 class header file.
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.hh,v 1.2.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VReadOutGeometry.hh,v 1.3 2001/07/11 09:58:43 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.hh,v 1.5.2.1 2001/06/28 19:07:48 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VSensitiveDetector.hh,v 1.7 2001/07/13 15:00:06 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VSensitiveDetector_h
|
||||
@@ -33,7 +33,6 @@
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4VReadOutGeometry.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
//#include "g4rw/tvordvec.h"
|
||||
#include "G4CollectionNameVector.hh"
|
||||
|
||||
// class description:
|
||||
@@ -60,8 +59,8 @@ class G4VSensitiveDetector
|
||||
|
||||
const G4VSensitiveDetector & operator=(const G4VSensitiveDetector &right);
|
||||
|
||||
int operator==(const G4VSensitiveDetector &right) const;
|
||||
int operator!=(const G4VSensitiveDetector &right) const;
|
||||
G4int operator==(const G4VSensitiveDetector &right) const;
|
||||
G4int operator!=(const G4VSensitiveDetector &right) const;
|
||||
|
||||
public: // with description
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
@@ -113,7 +112,7 @@ class G4VSensitiveDetector
|
||||
inline G4bool Hit(G4Step*aStep)
|
||||
{
|
||||
G4bool ack = true;
|
||||
G4TouchableHistory* ROhis = NULL;
|
||||
G4TouchableHistory* ROhis = 0;
|
||||
if(!isActive())
|
||||
{ ack = false; }
|
||||
else if(ROgeometry)
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCtable.cc,v 1.4.2.1 2001/06/28 19:07:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4HCtable.cc,v 1.6 2001/07/13 15:00:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4HCtable.hh"
|
||||
@@ -33,7 +33,7 @@ G4HCtable::~G4HCtable() {;}
|
||||
|
||||
G4int G4HCtable::Registor(G4String SDname,G4String HCname)
|
||||
{
|
||||
for(int i=0;i<HClist.size();i++)
|
||||
for(size_t i=0;i<HClist.size();i++)
|
||||
{ if(HClist[i]==HCname && SDlist[i]==SDname) return -1; }
|
||||
HClist.push_back(HCname);
|
||||
SDlist.push_back(SDname);
|
||||
@@ -45,7 +45,7 @@ G4int G4HCtable::GetCollectionID(G4String HCname)
|
||||
G4int i = -1;
|
||||
if(HCname.index("/")==G4std::string::npos) // HCname only
|
||||
{
|
||||
for(G4int j=0;j<HClist.size();j++)
|
||||
for(size_t j=0;j<HClist.size();j++)
|
||||
{
|
||||
if(HClist[j]==HCname)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ G4int G4HCtable::GetCollectionID(G4String HCname)
|
||||
}
|
||||
else
|
||||
{
|
||||
for(G4int j=0;j<HClist.size();j++)
|
||||
for(size_t j=0;j<HClist.size();j++)
|
||||
{
|
||||
G4String tgt = SDlist[j];
|
||||
tgt += "/";
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDManager.cc,v 1.2.2.1 2001/06/28 19:07:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SDManager.cc,v 1.4 2001/07/13 15:00:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
@@ -67,7 +67,7 @@ void G4SDManager::AddNewDetector(G4VSensitiveDetector*aSD)
|
||||
if( pathName(0) != '/' ) pathName.prepend("/");
|
||||
if( pathName(pathName.length()-1) != '/' ) pathName += "/";
|
||||
treeTop->AddNewDetector(aSD,pathName);
|
||||
for(int i=0;i<numberOfCollections;i++)
|
||||
for(G4int i=0;i<numberOfCollections;i++)
|
||||
{
|
||||
G4String SDname = aSD->GetName();
|
||||
G4String DCname = aSD->GetCollectionName(i);
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDStructure.cc,v 1.4.2.1 2001/06/28 19:07:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SDStructure.cc,v 1.6 2001/07/13 15:00:08 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
// G4SDStructure
|
||||
@@ -33,11 +33,11 @@ G4SDStructure::G4SDStructure(G4String aPath):verboseLevel(0)
|
||||
{
|
||||
pathName = aPath;
|
||||
dirName = aPath;
|
||||
int i = dirName.length();
|
||||
G4int i = dirName.length();
|
||||
if( i > 1 )
|
||||
{
|
||||
dirName.remove(i-1);
|
||||
int isl = dirName.last('/');
|
||||
G4int isl = dirName.last('/');
|
||||
dirName.remove(0,isl+1);
|
||||
dirName += "/";
|
||||
}
|
||||
@@ -47,7 +47,7 @@ G4SDStructure::~G4SDStructure()
|
||||
{
|
||||
}
|
||||
|
||||
int G4SDStructure::operator==(const G4SDStructure &right) const
|
||||
G4int G4SDStructure::operator==(const G4SDStructure &right) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ void G4SDStructure::AddNewDetector(G4VSensitiveDetector*aSD,
|
||||
// First, check if the subdirectoy exists.
|
||||
G4String subD = ExtractDirName( remainingPath );
|
||||
G4SDStructure* tgtSDS = FindSubDirectory(subD);
|
||||
if( tgtSDS == NULL )
|
||||
if( tgtSDS == 0 )
|
||||
{ // Subdirectory not found. Create a new directory.
|
||||
subD.prepend(pathName);
|
||||
tgtSDS = new G4SDStructure(subD);
|
||||
@@ -73,7 +73,7 @@ void G4SDStructure::AddNewDetector(G4VSensitiveDetector*aSD,
|
||||
else
|
||||
{ // The sensitive detector should be kept in this directory.
|
||||
G4VSensitiveDetector* tgtSD = GetSD( aSD->GetName() );
|
||||
if( tgtSD != NULL )
|
||||
if( tgtSD != 0 )
|
||||
{
|
||||
G4cout << aSD->GetName() << " had already stored in "
|
||||
<< pathName << G4endl;
|
||||
@@ -87,28 +87,28 @@ void G4SDStructure::AddNewDetector(G4VSensitiveDetector*aSD,
|
||||
|
||||
G4SDStructure* G4SDStructure::FindSubDirectory(G4String subD)
|
||||
{
|
||||
for( int i=0; i<structure.size(); i++ )
|
||||
for( size_t i=0; i<structure.size(); i++ )
|
||||
{
|
||||
if( subD == structure[i]->dirName ) return structure[i];
|
||||
}
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4VSensitiveDetector* G4SDStructure::GetSD(G4String aSDName)
|
||||
{
|
||||
for( int i=0; i<detector.size(); i++ )
|
||||
for( size_t i=0; i<detector.size(); i++ )
|
||||
{
|
||||
G4VSensitiveDetector* tgtSD = detector[i];
|
||||
if( aSDName == tgtSD->GetName() ) return tgtSD;
|
||||
}
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4String G4SDStructure::ExtractDirName(G4String aName)
|
||||
{
|
||||
G4String subD = aName;
|
||||
int i = aName.first('/');
|
||||
if( i != G4std::string::npos ) subD.remove(i+1);
|
||||
G4int i = aName.first('/');
|
||||
if( i != G4int(G4std::string::npos) ) subD.remove(i+1);
|
||||
return subD;
|
||||
}
|
||||
|
||||
@@ -116,11 +116,11 @@ void G4SDStructure::Activate(G4String aName, G4bool sensitiveFlag)
|
||||
{
|
||||
G4String aPath = aName;
|
||||
aPath.remove(0,pathName.length());
|
||||
if( aPath.first('/') != G4std::string::npos )
|
||||
if( aPath.first('/') != G4int(G4std::string::npos) )
|
||||
{ // Command is ordered for a subdirectory.
|
||||
G4String subD = ExtractDirName(aPath);
|
||||
G4SDStructure* tgtSDS = FindSubDirectory(subD);
|
||||
if( tgtSDS == NULL )
|
||||
if( tgtSDS == 0 )
|
||||
{ // The subdirectory is not found
|
||||
G4cout << subD << " is not found in " << pathName << G4endl;
|
||||
}
|
||||
@@ -131,11 +131,11 @@ void G4SDStructure::Activate(G4String aName, G4bool sensitiveFlag)
|
||||
}
|
||||
else if( aPath.isNull() )
|
||||
{ // Command is ordered for all detectors in this directory.
|
||||
for( int i=0; i<detector.size(); i++)
|
||||
for( size_t i=0; i<detector.size(); i++)
|
||||
{
|
||||
detector[i]->Activate(sensitiveFlag);
|
||||
}
|
||||
for( int j=0;j<structure.size(); j++)
|
||||
for( size_t j=0;j<structure.size(); j++)
|
||||
{
|
||||
structure[j]->Activate(G4String("/"),sensitiveFlag);
|
||||
}
|
||||
@@ -143,7 +143,7 @@ void G4SDStructure::Activate(G4String aName, G4bool sensitiveFlag)
|
||||
else
|
||||
{ // Command is ordered to a particular detector.
|
||||
G4VSensitiveDetector* tgtSD = GetSD(aPath);
|
||||
if( tgtSD == NULL )
|
||||
if( tgtSD == 0 )
|
||||
{ // The detector is not found.
|
||||
G4cout << aPath << " is not found in " << pathName << G4endl;
|
||||
}
|
||||
@@ -158,14 +158,14 @@ G4VSensitiveDetector* G4SDStructure::FindSensitiveDetector(G4String aName)
|
||||
{
|
||||
G4String aPath = aName;
|
||||
aPath.remove(0,pathName.length());
|
||||
if( aPath.first('/') != G4std::string::npos )
|
||||
if( aPath.first('/') != G4int(G4std::string::npos) )
|
||||
{ // SD exists in sub-directory
|
||||
G4String subD = ExtractDirName(aPath);
|
||||
G4SDStructure* tgtSDS = FindSubDirectory(subD);
|
||||
if( tgtSDS == NULL )
|
||||
if( tgtSDS == 0 )
|
||||
{ // The subdirectory is not found
|
||||
G4cout << subD << " is not found in " << pathName << G4endl;
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -175,7 +175,7 @@ G4VSensitiveDetector* G4SDStructure::FindSensitiveDetector(G4String aName)
|
||||
else
|
||||
{ // SD must exist in this directory
|
||||
G4VSensitiveDetector* tgtSD = GetSD(aPath);
|
||||
if( tgtSD == NULL )
|
||||
if( tgtSD == 0 )
|
||||
{ // The detector is not found.
|
||||
G4cout << aPath << " is not found in " << pathName << G4endl;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ G4VSensitiveDetector* G4SDStructure::FindSensitiveDetector(G4String aName)
|
||||
|
||||
void G4SDStructure::Initialize(G4HCofThisEvent*HCE)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
// Broadcast to subdirectories.
|
||||
for( i=0; i<structure.size(); i++ )
|
||||
{
|
||||
@@ -200,7 +200,7 @@ void G4SDStructure::Initialize(G4HCofThisEvent*HCE)
|
||||
|
||||
void G4SDStructure::Terminate(G4HCofThisEvent*HCE)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
// Broadcast to subdirectories.
|
||||
for( i=0; i<structure.size(); i++ )
|
||||
{
|
||||
@@ -216,7 +216,7 @@ void G4SDStructure::Terminate(G4HCofThisEvent*HCE)
|
||||
void G4SDStructure::ListTree()
|
||||
{
|
||||
G4cout << pathName << G4endl;
|
||||
for(int i=0; i<detector.size(); i++)
|
||||
for(size_t i=0; i<detector.size(); i++)
|
||||
{
|
||||
G4VSensitiveDetector* sd = detector[i];
|
||||
G4cout << pathName << sd->GetName();
|
||||
@@ -226,7 +226,7 @@ void G4SDStructure::ListTree()
|
||||
{ G4cout << " XXX Inactive "; }
|
||||
G4cout << G4endl;
|
||||
}
|
||||
for(int j=0; j<structure.size(); j++)
|
||||
for(size_t j=0; j<structure.size(); j++)
|
||||
{ structure[j]->ListTree(); }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SDmessenger.cc,v 1.2.2.1 2001/06/28 19:07:49 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SDmessenger.cc,v 1.3 2001/07/11 09:58:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SensitiveVolumeList.cc,v 1.3.2.2 2001/06/28 20:18:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4SensitiveVolumeList.cc,v 1.5 2001/07/13 15:00:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
// GEANT 4 class implementation file
|
||||
@@ -78,7 +78,7 @@
|
||||
G4bool G4SensitiveVolumeList::CheckPV(const G4VPhysicalVolume * pvp) const
|
||||
{
|
||||
if (thePhysicalVolumeList.size()==0) return false;
|
||||
for(int i=0;i<thePhysicalVolumeList.size();i++)
|
||||
for(size_t i=0;i<thePhysicalVolumeList.size();i++)
|
||||
{ if(thePhysicalVolumeList[i]==pvp) return true; }
|
||||
return false;
|
||||
}
|
||||
@@ -87,7 +87,7 @@
|
||||
G4bool G4SensitiveVolumeList::CheckLV(const G4LogicalVolume * lvp) const
|
||||
{
|
||||
if (theLogicalVolumeList.size()==0) return false;
|
||||
for(int i=0;i<theLogicalVolumeList.size();i++)
|
||||
for(size_t i=0;i<theLogicalVolumeList.size();i++)
|
||||
{ if(theLogicalVolumeList[i]==lvp) return true; }
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VReadOutGeometry.cc,v 1.3.2.1 2001/06/28 19:07:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VReadOutGeometry.cc,v 1.5 2001/07/13 15:00:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4VReadOutGeometry.hh"
|
||||
@@ -30,8 +30,8 @@
|
||||
|
||||
|
||||
G4VReadOutGeometry::G4VReadOutGeometry()
|
||||
:ROworld(NULL),touchableHistory(NULL),
|
||||
fincludeList(NULL),fexcludeList(NULL)
|
||||
:ROworld(0),fincludeList(0),
|
||||
fexcludeList(0),touchableHistory(0)
|
||||
{
|
||||
name = "unknown";
|
||||
ROnavigator = new G4Navigator();
|
||||
@@ -43,14 +43,14 @@ G4VReadOutGeometry::G4VReadOutGeometry(const G4VReadOutGeometry &right)
|
||||
fexcludeList = right.fexcludeList;
|
||||
name = right.name;
|
||||
ROworld = right.ROworld;
|
||||
touchableHistory = NULL;
|
||||
touchableHistory = 0;
|
||||
// COPY CONSTRUCTOR NOT STRAIGHT FORWARD: need to copy the touchabelHistory
|
||||
// VALUE, same foe navigator and same for the World+Geom hierachy ??
|
||||
}
|
||||
|
||||
G4VReadOutGeometry::G4VReadOutGeometry(G4String n)
|
||||
:name(n),ROworld(NULL),touchableHistory(NULL),
|
||||
fincludeList(NULL),fexcludeList(NULL)
|
||||
:ROworld(0),fincludeList(0),
|
||||
fexcludeList(0),name(n),touchableHistory(0)
|
||||
{
|
||||
ROnavigator = new G4Navigator();
|
||||
}
|
||||
@@ -70,7 +70,7 @@ const G4VReadOutGeometry & G4VReadOutGeometry::operator=(const G4VReadOutGeometr
|
||||
fexcludeList = right.fexcludeList;
|
||||
name = right.name;
|
||||
ROworld = right.ROworld;
|
||||
touchableHistory = NULL;
|
||||
touchableHistory = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ void G4VReadOutGeometry::BuildROGeometry()
|
||||
|
||||
G4bool G4VReadOutGeometry::CheckROVolume(G4Step*currentStep,G4TouchableHistory*& ROhist)
|
||||
{
|
||||
ROhist = NULL;
|
||||
ROhist = 0;
|
||||
G4bool incFlg = true;
|
||||
G4VPhysicalVolume* PV = currentStep->GetPreStepPoint()->GetPhysicalVolume();
|
||||
if((fexcludeList)&&(fexcludeList->CheckPV(PV)))
|
||||
@@ -142,12 +142,12 @@ G4bool G4VReadOutGeometry::FindROTouchable(G4Step*currentStep)
|
||||
// at the safety value only.
|
||||
|
||||
// checks if volume is sensitive:
|
||||
G4VPhysicalVolume* currentVolume;
|
||||
G4VPhysicalVolume* currentVolume = touchableHistory->GetVolume();
|
||||
// checks first if a physical volume exists here:
|
||||
if ( currentVolume = touchableHistory->GetVolume() )
|
||||
if ( currentVolume )
|
||||
{
|
||||
return currentVolume->GetLogicalVolume()->
|
||||
GetSensitiveDetector() != NULL;
|
||||
GetSensitiveDetector() != 0;
|
||||
}
|
||||
// no sensitive volume found: returns false
|
||||
return false;
|
||||
|
||||
@@ -21,15 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSensitiveDetector.cc,v 1.3.2.1 2001/06/28 19:07:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VSensitiveDetector.cc,v 1.5 2001/07/13 15:00:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
// G4VSensitiveDetector
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4VSensitiveDetector::G4VSensitiveDetector(G4String name)
|
||||
:verboseLevel(0),active(true),ROgeometry(NULL)
|
||||
:verboseLevel(0),active(true),ROgeometry(0)
|
||||
{
|
||||
size_t sLast = name.last('/');
|
||||
if(sLast==G4std::string::npos)
|
||||
@@ -61,12 +61,12 @@ const G4VSensitiveDetector & G4VSensitiveDetector::operator=(const G4VSensitiveD
|
||||
return *this;
|
||||
}
|
||||
|
||||
int G4VSensitiveDetector::operator==(const G4VSensitiveDetector &right) const
|
||||
G4int G4VSensitiveDetector::operator==(const G4VSensitiveDetector &right) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int G4VSensitiveDetector::operator!=(const G4VSensitiveDetector &right) const
|
||||
G4int G4VSensitiveDetector::operator!=(const G4VSensitiveDetector &right) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DCofThisEvent.hh,v 1.5.2.1 2001/06/28 19:07:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4DCofThisEvent.hh,v 1.7 2001/07/13 15:00:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4DCofThisEvent_h
|
||||
@@ -70,7 +70,7 @@ class G4DCofThisEvent
|
||||
inline G4int GetNumberOfCollections() const
|
||||
{
|
||||
G4int n = 0;
|
||||
for(int i=0;i<DC->size();i++)
|
||||
for(size_t i=0;i<DC->size();i++)
|
||||
{
|
||||
if((*DC)[i]) n++;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TDigiCollection.hh,v 1.8.2.1 2001/06/28 19:07:50 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4TDigiCollection.hh,v 1.10 2001/07/13 15:00:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4TDigiCollection_h
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "G4VDigiCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "globals.hh"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
// class description:
|
||||
@@ -50,7 +49,7 @@ class G4DigiCollection : public G4VDigiCollection
|
||||
G4DigiCollection();
|
||||
G4DigiCollection(G4String detName,G4String colNam);
|
||||
virtual ~G4DigiCollection();
|
||||
int operator==(const G4DigiCollection &right) const;
|
||||
G4int operator==(const G4DigiCollection &right) const;
|
||||
|
||||
protected:
|
||||
void* theCollection;
|
||||
@@ -67,7 +66,7 @@ template <class T> class G4TDigiCollection : public G4DigiCollection
|
||||
// Constructor.
|
||||
public:
|
||||
virtual ~G4TDigiCollection();
|
||||
int operator==(const G4TDigiCollection &right) const;
|
||||
G4int operator==(const G4TDigiCollection &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void* aDC);
|
||||
@@ -84,7 +83,7 @@ template <class T> class G4TDigiCollection : public G4DigiCollection
|
||||
inline G4std::vector<T*>* GetVector() const
|
||||
{ return (G4std::vector<T*>*)theCollection; }
|
||||
// Returns a collection vector.
|
||||
inline int insert(T* aHit)
|
||||
inline G4int insert(T* aHit)
|
||||
{
|
||||
G4std::vector<T*>*theDigiCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
@@ -93,7 +92,7 @@ template <class T> class G4TDigiCollection : public G4DigiCollection
|
||||
}
|
||||
// Insert a digi object. Total number of digi objects stored in this
|
||||
// collection is returned.
|
||||
inline int entries() const
|
||||
inline G4int entries() const
|
||||
{
|
||||
G4std::vector<T*>*theDigiCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
@@ -134,21 +133,21 @@ template <class T> G4TDigiCollection<T>::~G4TDigiCollection()
|
||||
G4std::vector<T*> * theDigiCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
//theDigiCollection->clearAndDestroy();
|
||||
for(int i=0;i<theDigiCollection->size();i++)
|
||||
for(size_t i=0;i<theDigiCollection->size();i++)
|
||||
{ delete (*theDigiCollection)[i]; }
|
||||
theDigiCollection->clear();
|
||||
delete theDigiCollection;
|
||||
}
|
||||
|
||||
template <class T> int G4TDigiCollection<T>::operator==(const G4TDigiCollection<T> &right) const
|
||||
template <class T> G4int G4TDigiCollection<T>::operator==(const G4TDigiCollection<T> &right) const
|
||||
{ return (collectionName==right.collectionName); }
|
||||
|
||||
template <class T> void G4TDigiCollection<T>::DrawAllDigi()
|
||||
{
|
||||
G4std::vector<T*> * theDigiCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
int n = theDigiCollection->size();
|
||||
for(int i=0;i<n;i++)
|
||||
size_t n = theDigiCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theDigiCollection)[i]->Draw(); }
|
||||
}
|
||||
|
||||
@@ -156,8 +155,8 @@ template <class T> void G4TDigiCollection<T>::PrintAllDigi()
|
||||
{
|
||||
G4std::vector<T*> * theDigiCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
int n = theDigiCollection->size();
|
||||
for(int i=0;i<n;i++)
|
||||
size_t n = theDigiCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theDigiCollection)[i]->Print(); }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigi.hh,v 1.5.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VDigi.hh,v 1.7 2001/07/13 15:00:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigi_h
|
||||
#define G4VDigi_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is the base class of digi object. The user should derive this
|
||||
@@ -43,7 +45,7 @@ class G4VDigi
|
||||
G4VDigi();
|
||||
virtual ~G4VDigi();
|
||||
|
||||
int operator==(const G4VDigi &right) const;
|
||||
G4int operator==(const G4VDigi &right) const;
|
||||
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigiCollection.hh,v 1.5.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VDigiCollection.hh,v 1.7 2001/07/13 15:00:12 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigiCollection_h
|
||||
@@ -45,7 +45,7 @@ class G4VDigiCollection
|
||||
G4VDigiCollection();
|
||||
G4VDigiCollection(G4String DMnam,G4String colNam);
|
||||
virtual ~G4VDigiCollection();
|
||||
int operator==(const G4VDigiCollection &right) const;
|
||||
G4int operator==(const G4VDigiCollection &right) const;
|
||||
|
||||
virtual void DrawAllDigi();
|
||||
virtual void PrintAllDigi();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4DCofThisEvent.cc,v 1.4.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4DCofThisEvent.cc,v 1.6 2001/07/13 15:00:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4DCofThisEvent.hh"
|
||||
@@ -37,16 +37,16 @@ G4DCofThisEvent::G4DCofThisEvent()
|
||||
G4DCofThisEvent::G4DCofThisEvent(G4int cap)
|
||||
{
|
||||
DC = new G4std::vector<G4VDigiCollection*>;
|
||||
for(int i=0;i<cap;i++)
|
||||
for(G4int i=0;i<cap;i++)
|
||||
{
|
||||
DC->push_back((G4VDigiCollection*)NULL);
|
||||
DC->push_back((G4VDigiCollection*)0);
|
||||
}
|
||||
}
|
||||
|
||||
G4DCofThisEvent::~G4DCofThisEvent()
|
||||
{
|
||||
//DC->clearAndDestroy();
|
||||
for(G4int i=0;i<DC->size();i++)
|
||||
for(size_t i=0;i<DC->size();i++)
|
||||
{ delete (*DC)[i]; }
|
||||
DC->clear();
|
||||
delete DC;
|
||||
@@ -54,7 +54,7 @@ G4DCofThisEvent::~G4DCofThisEvent()
|
||||
|
||||
void G4DCofThisEvent::AddDigiCollection(G4int DCID,G4VDigiCollection * aDC)
|
||||
{
|
||||
if(DCID>=0 && DCID<DC->size())
|
||||
if(DCID>=0 && DCID<G4int(DC->size()))
|
||||
{ (*DC)[DCID] = aDC; }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4TDigiCollection.cc,v 1.2.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4TDigiCollection.cc,v 1.4 2001/07/13 15:00:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4TDigiCollection.hh"
|
||||
@@ -39,6 +39,6 @@ G4DigiCollection::G4DigiCollection(G4String detName,G4String colNam)
|
||||
G4DigiCollection::~G4DigiCollection()
|
||||
{;}
|
||||
|
||||
int G4DigiCollection::operator==(const G4DigiCollection &right) const
|
||||
G4int G4DigiCollection::operator==(const G4DigiCollection &right) const
|
||||
{ return (collectionName==right.collectionName); }
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigi.cc,v 1.4.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VDigi.cc,v 1.6 2001/07/13 15:00:14 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
// G4VDigi
|
||||
@@ -35,7 +35,7 @@ G4VDigi::G4VDigi()
|
||||
G4VDigi::~G4VDigi()
|
||||
{;}
|
||||
|
||||
int G4VDigi::operator==(const G4VDigi &right) const
|
||||
G4int G4VDigi::operator==(const G4VDigi &right) const
|
||||
{ return false; }
|
||||
|
||||
void G4VDigi::Draw()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VDigiCollection.cc,v 1.4.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VDigiCollection.cc,v 1.6 2001/07/13 15:00:15 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
// G4VDigiCollection
|
||||
@@ -44,7 +44,7 @@ G4VDigiCollection::G4VDigiCollection(G4String DMnam,G4String colNam)
|
||||
G4VDigiCollection::~G4VDigiCollection()
|
||||
{ ; }
|
||||
|
||||
int G4VDigiCollection::operator==(const G4VDigiCollection &right) const
|
||||
G4int G4VDigiCollection::operator==(const G4VDigiCollection &right) const
|
||||
{
|
||||
return ((collectionName==right.collectionName)
|
||||
&&(DMname==right.DMname));
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.hh,v 1.5.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4HCofThisEvent.hh,v 1.7 2001/07/13 15:00:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4HCofThisEvent_h
|
||||
@@ -31,7 +31,6 @@
|
||||
#include "globals.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
// class description:
|
||||
@@ -70,7 +69,7 @@ class G4HCofThisEvent
|
||||
inline G4int GetNumberOfCollections()
|
||||
{
|
||||
G4int n = 0;
|
||||
for(int i=0;i<HC->size();i++)
|
||||
for(size_t i=0;i<HC->size();i++)
|
||||
{
|
||||
if((*HC)[i]) n++;
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4THitsCollection.hh,v 1.7.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4THitsCollection.hh,v 1.9 2001/07/13 15:00:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4THitsCollection_h
|
||||
@@ -50,7 +50,7 @@ class G4HitsCollection : public G4VHitsCollection
|
||||
G4HitsCollection();
|
||||
G4HitsCollection(G4String detName,G4String colNam);
|
||||
virtual ~G4HitsCollection();
|
||||
int operator==(const G4HitsCollection &right) const;
|
||||
G4int operator==(const G4HitsCollection &right) const;
|
||||
|
||||
protected:
|
||||
void* theCollection;
|
||||
@@ -67,7 +67,7 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
// constructor.
|
||||
public:
|
||||
virtual ~G4THitsCollection();
|
||||
int operator==(const G4THitsCollection<T> &right) const;
|
||||
G4int operator==(const G4THitsCollection<T> &right) const;
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void* anHC);
|
||||
@@ -84,7 +84,7 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
inline G4std::vector<T*>* GetVector() const
|
||||
{ return (G4std::vector<T*>*)theCollection; }
|
||||
// Returns a collection vector.
|
||||
inline int insert(T* aHit)
|
||||
inline G4int insert(T* aHit)
|
||||
{
|
||||
G4std::vector<T*>*theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
@@ -93,7 +93,7 @@ template <class T> class G4THitsCollection : public G4HitsCollection
|
||||
}
|
||||
// Insert a hit object. Total number of hit objects stored in this
|
||||
// collection is returned.
|
||||
inline int entries() const
|
||||
inline G4int entries() const
|
||||
{
|
||||
G4std::vector<T*>*theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
@@ -135,21 +135,21 @@ template <class T> G4THitsCollection<T>::~G4THitsCollection()
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
//theHitsCollection->clearAndDestroy();
|
||||
for(int i=0;i<theHitsCollection->size();i++)
|
||||
for(size_t i=0;i<theHitsCollection->size();i++)
|
||||
{ delete (*theHitsCollection)[i]; }
|
||||
theHitsCollection->clear();
|
||||
delete theHitsCollection;
|
||||
}
|
||||
|
||||
template <class T> int G4THitsCollection<T>::operator==(const G4THitsCollection<T> &right) const
|
||||
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;
|
||||
int n = theHitsCollection->size();
|
||||
for(int i=0;i<n;i++)
|
||||
size_t n = theHitsCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theHitsCollection)[i]->Draw(); }
|
||||
}
|
||||
|
||||
@@ -157,8 +157,8 @@ template <class T> void G4THitsCollection<T>::PrintAllHits()
|
||||
{
|
||||
G4std::vector<T*> * theHitsCollection
|
||||
= (G4std::vector<T*>*)theCollection;
|
||||
int n = theHitsCollection->size();
|
||||
for(int i=0;i<n;i++)
|
||||
size_t n = theHitsCollection->size();
|
||||
for(size_t i=0;i<n;i++)
|
||||
{ (*theHitsCollection)[i]->Print(); }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,13 +21,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VHit.hh,v 1.4.2.1 2001/06/28 19:07:51 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VHit.hh,v 1.6 2001/07/13 15:00:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHit_h
|
||||
#define G4VHit_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is the base class of hit object. The user should derive this
|
||||
@@ -43,7 +45,7 @@ class G4VHit
|
||||
G4VHit();
|
||||
virtual ~G4VHit();
|
||||
|
||||
int operator==(const G4VHit &right) const;
|
||||
G4int operator==(const G4VHit &right) const;
|
||||
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VHitsCollection.hh,v 1.4.2.1 2001/06/28 19:07:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VHitsCollection.hh,v 1.6 2001/07/13 15:00:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#ifndef G4VHitsCollection_h
|
||||
@@ -45,7 +45,7 @@ class G4VHitsCollection
|
||||
G4VHitsCollection();
|
||||
G4VHitsCollection(G4String detName,G4String colNam);
|
||||
virtual ~G4VHitsCollection();
|
||||
int operator==(const G4VHitsCollection &right) const;
|
||||
G4int operator==(const G4VHitsCollection &right) const;
|
||||
|
||||
virtual void DrawAllHits();
|
||||
virtual void PrintAllHits();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HCofThisEvent.cc,v 1.4.2.1 2001/06/28 19:07:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4HCofThisEvent.cc,v 1.6 2001/07/13 15:00:20 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4HCofThisEvent.hh"
|
||||
@@ -37,16 +37,16 @@ G4HCofThisEvent::G4HCofThisEvent()
|
||||
G4HCofThisEvent::G4HCofThisEvent(G4int cap)
|
||||
{
|
||||
HC = new G4std::vector<G4VHitsCollection*>;
|
||||
for(int i=0;i<cap;i++)
|
||||
for(G4int i=0;i<cap;i++)
|
||||
{
|
||||
HC->push_back((G4VHitsCollection*)NULL);
|
||||
HC->push_back((G4VHitsCollection*)0);
|
||||
}
|
||||
}
|
||||
|
||||
G4HCofThisEvent::~G4HCofThisEvent()
|
||||
{
|
||||
//HC->clearAndDestroy();
|
||||
for(G4int i=0;i<HC->size();i++)
|
||||
for(size_t i=0;i<HC->size();i++)
|
||||
{ delete (*HC)[i]; }
|
||||
HC->clear();
|
||||
delete HC;
|
||||
@@ -54,7 +54,7 @@ G4HCofThisEvent::~G4HCofThisEvent()
|
||||
|
||||
void G4HCofThisEvent::AddHitsCollection(G4int HCID,G4VHitsCollection * aHC)
|
||||
{
|
||||
if(HCID>=0 && HCID<HC->size())
|
||||
if(HCID>=0 && HCID<G4int(HC->size()))
|
||||
{ (*HC)[HCID] = aHC; }
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4THitsCollection.cc,v 1.2.2.1 2001/06/28 19:07:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4THitsCollection.cc,v 1.3 2001/07/11 09:58:47 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
#include "G4THitsCollection.hh"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VHit.cc,v 1.2.2.1 2001/06/28 19:07:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VHit.cc,v 1.4 2001/07/13 15:00:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
// G4VHit
|
||||
@@ -35,7 +35,7 @@ G4VHit::G4VHit()
|
||||
G4VHit::~G4VHit()
|
||||
{;}
|
||||
|
||||
int G4VHit::operator==(const G4VHit &right) const
|
||||
G4int G4VHit::operator==(const G4VHit &right) const
|
||||
{ return false; }
|
||||
|
||||
void G4VHit::Draw()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VHitsCollection.cc,v 1.2.2.1 2001/06/28 19:07:52 gunter Exp $
|
||||
// GEANT4 tag $Name: $
|
||||
// $Id: G4VHitsCollection.cc,v 1.4 2001/07/13 15:00:21 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
//
|
||||
|
||||
// G4VHitsCollection
|
||||
@@ -44,7 +44,7 @@ G4VHitsCollection::G4VHitsCollection(G4String detName,G4String colNam)
|
||||
G4VHitsCollection::~G4VHitsCollection()
|
||||
{ ; }
|
||||
|
||||
int G4VHitsCollection::operator==(const G4VHitsCollection &right) const
|
||||
G4int G4VHitsCollection::operator==(const G4VHitsCollection &right) const
|
||||
{
|
||||
return ((collectionName==right.collectionName)
|
||||
&&(SDname==right.SDname));
|
||||
|
||||
Reference in New Issue
Block a user