Import Geant4 3.1.0 source tree
This commit is contained in:
+10
-1
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.3 1999/11/09 00:33:45 asaim Exp $
|
||||
$Id: History,v 1.4 2001/02/08 06:18:28 asaim Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,15 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Feb 8, 2001, M.Asai (readout-V03-00-01)
|
||||
- Migration to STL vector classes
|
||||
affected files :
|
||||
./readout/include/G4DCtable.hh
|
||||
./readout/include/G4DigiManager.hh
|
||||
./readout/include/G4VDigitizerModule.hh
|
||||
./readout/src/G4DCtable.cc
|
||||
./readout/src/G4DigiManager.cc
|
||||
|
||||
Nov 4, 99, M.Asai (tag readout-V00-01-00)
|
||||
- entries() method is added to G4TDigiCollection
|
||||
- Commecnts are enriched for the software reference manual.
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DCtable.hh,v 1.2.2.1.2.1 1999/12/07 20:52:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DCtable.hh,v 1.5 2001/02/08 06:07:20 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4DCtable_H
|
||||
#define G4DCtable_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
//#include "g4rw/tvordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
// class description:
|
||||
//
|
||||
@@ -38,12 +39,12 @@ class G4DCtable
|
||||
G4int GetCollectionID(G4String DCname);
|
||||
|
||||
private:
|
||||
G4RWTValOrderedVector<G4String> DMlist;
|
||||
G4RWTValOrderedVector<G4String> DClist;
|
||||
G4std::vector<G4String> DMlist;
|
||||
G4std::vector<G4String> DClist;
|
||||
|
||||
public:
|
||||
inline G4int entries() const
|
||||
{ return DClist.entries(); }
|
||||
{ return DClist.size(); }
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DMmessenger.hh,v 1.2.4.1 1999/12/07 20:52:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DMmessenger.hh,v 1.3 1999/12/15 14:53:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4DMmessenger_h
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DigiManager.hh,v 1.2.2.1.2.1 1999/12/07 20:52:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DigiManager.hh,v 1.5 2001/02/08 06:07:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4DigiManager_h
|
||||
@@ -21,7 +21,8 @@ class G4DMmessenger;
|
||||
#include "G4DCtable.hh"
|
||||
class G4RunManager;
|
||||
class G4SDManager;
|
||||
#include "g4rw/tpordvec.h"
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
// class description:
|
||||
//
|
||||
@@ -85,7 +86,7 @@ class G4DigiManager
|
||||
private:
|
||||
static G4DigiManager * fDManager;
|
||||
G4int verboseLevel;
|
||||
G4RWTPtrOrderedVector<G4VDigitizerModule> DMtable;
|
||||
G4std::vector<G4VDigitizerModule*> DMtable;
|
||||
G4DCtable* DCtable;
|
||||
G4DMmessenger* theMessenger;
|
||||
G4RunManager* runManager;
|
||||
@@ -97,7 +98,7 @@ class G4DigiManager
|
||||
inline G4int GetCollectionCapacity() const
|
||||
{ return DCtable->entries(); }
|
||||
inline G4int GetModuleCapacity() const
|
||||
{ return DMtable.entries(); }
|
||||
{ return DMtable.size(); }
|
||||
inline G4DCtable* GetDCtable() const
|
||||
{ return DCtable; }
|
||||
inline void RestoreDCtable(G4DCtable* dc)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VDigitizerModule.hh,v 1.2.2.1.2.1 1999/12/07 20:52:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4VDigitizerModule.hh,v 1.5 2001/02/08 06:07:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#ifndef G4VDigitizerModule_H
|
||||
@@ -15,7 +15,8 @@
|
||||
class G4DigiManager;
|
||||
class G4VDigiCollection;
|
||||
#include "globals.hh"
|
||||
#include "g4rw/tvordvec.h"
|
||||
//#include "g4rw/tvordvec.h"
|
||||
#include "g4std/vector"
|
||||
|
||||
// class description:
|
||||
//
|
||||
@@ -52,12 +53,12 @@ class G4VDigitizerModule
|
||||
protected:
|
||||
G4DigiManager* DigiManager;
|
||||
G4String moduleName;
|
||||
G4RWTValOrderedVector<G4String> collectionName;
|
||||
G4std::vector<G4String> collectionName;
|
||||
G4int verboseLevel;
|
||||
|
||||
public:
|
||||
inline G4int GetNumberOfCollections() const
|
||||
{ return collectionName.entries(); }
|
||||
{ return collectionName.size(); }
|
||||
inline G4String GetCollectionName(G4int i) const
|
||||
{ return collectionName[i]; }
|
||||
inline G4String GetName() const
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DCtable.cc,v 1.1.8.1.2.1 1999/12/07 20:52:57 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DCtable.cc,v 1.4 2001/02/08 06:07:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4DCtable.hh"
|
||||
@@ -17,11 +17,11 @@ G4DCtable::~G4DCtable() {;}
|
||||
|
||||
G4int G4DCtable::Registor(G4String DMname,G4String DCname)
|
||||
{
|
||||
for(int i=0;i<DClist.entries();i++)
|
||||
for(int i=0;i<DClist.size();i++)
|
||||
{ if(DClist[i]==DCname && DMlist[i]==DMname) return -1; }
|
||||
DClist.insert(DCname);
|
||||
DMlist.insert(DMname);
|
||||
return DClist.entries();
|
||||
DClist.push_back(DCname);
|
||||
DMlist.push_back(DMname);
|
||||
return DClist.size();
|
||||
}
|
||||
|
||||
G4int G4DCtable::GetCollectionID(G4String DCname)
|
||||
@@ -29,7 +29,7 @@ G4int G4DCtable::GetCollectionID(G4String DCname)
|
||||
G4int i = -1;
|
||||
if(DCname.index("/")==G4std::string::npos) // DCname only
|
||||
{
|
||||
for(G4int j=0;j<DClist.entries();j++)
|
||||
for(G4int j=0;j<DClist.size();j++)
|
||||
{
|
||||
if(DClist[j]==DCname)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ G4int G4DCtable::GetCollectionID(G4String DCname)
|
||||
}
|
||||
else
|
||||
{
|
||||
for(G4int j=0;j<DClist.entries();j++)
|
||||
for(G4int j=0;j<DClist.size();j++)
|
||||
{
|
||||
G4String tgt = DMlist[j];
|
||||
tgt += "/";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DMmessenger.cc,v 1.1.10.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DMmessenger.cc,v 1.2 1999/12/15 14:53:51 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
// ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4DigiManager.cc,v 1.1.8.1.2.1.2.1 1999/12/08 17:35:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4DigiManager.cc,v 1.4 2001/02/08 06:07:21 asaim Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4DigiManager.hh"
|
||||
@@ -44,7 +44,10 @@ G4DigiManager::G4DigiManager():verboseLevel(0)
|
||||
|
||||
G4DigiManager::~G4DigiManager()
|
||||
{
|
||||
DMtable.clearAndDestroy();
|
||||
//DMtable.clearAndDestroy();
|
||||
for(G4int i=0;i<DMtable.size();i++)
|
||||
{ delete DMtable[i]; }
|
||||
DMtable.clear();
|
||||
delete DCtable;
|
||||
delete theMessenger;
|
||||
}
|
||||
@@ -52,17 +55,20 @@ G4DigiManager::~G4DigiManager()
|
||||
void G4DigiManager::AddNewModule(G4VDigitizerModule* DM)
|
||||
{
|
||||
G4String DMname = DM->GetName();
|
||||
if(DMtable.index(DM) != G4std::string::npos)
|
||||
{
|
||||
G4cout << "<" << DMname << "> has already been registored." << G4endl;
|
||||
return;
|
||||
for(int j=0;j<DMtable.size();j++)
|
||||
{
|
||||
if(DMtable[j]==DM)
|
||||
{
|
||||
G4cout << "<" << DMname << "> has already been registored." << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if( verboseLevel > 0 )
|
||||
if( verboseLevel > 0 )
|
||||
{
|
||||
G4cout << "New DigitizerModule <" << DMname
|
||||
<< "> is registored." << G4endl;
|
||||
}
|
||||
DMtable.insert(DM);
|
||||
DMtable.push_back(DM);
|
||||
|
||||
G4int numberOfCollections = DM->GetNumberOfCollections();
|
||||
for(int i=0;i<numberOfCollections;i++)
|
||||
@@ -95,7 +101,7 @@ void G4DigiManager::Digitize(G4String mName)
|
||||
|
||||
G4VDigitizerModule* G4DigiManager::FindDigitizerModule(G4String mName)
|
||||
{
|
||||
for(G4int i=0;i<DMtable.entries();i++)
|
||||
for(G4int i=0;i<DMtable.size();i++)
|
||||
{
|
||||
if(DMtable[i]->GetName() == mName) return DMtable[i];
|
||||
}
|
||||
@@ -177,13 +183,13 @@ void G4DigiManager::SetDigiCollection(G4int DCID,G4VDigiCollection* aDC)
|
||||
void G4DigiManager::SetVerboseLevel(G4int val)
|
||||
{
|
||||
verboseLevel = val;
|
||||
for(G4int i=0;i<DMtable.entries();i++)
|
||||
for(G4int i=0;i<DMtable.size();i++)
|
||||
{ DMtable[i]->SetVerboseLevel(val); }
|
||||
}
|
||||
|
||||
void G4DigiManager::List() const
|
||||
{
|
||||
for(G4int i=0;i<DMtable.entries();i++)
|
||||
for(G4int i=0;i<DMtable.size();i++)
|
||||
{ G4cout << " " << i << " : " << DMtable[i]->GetName() << G4endl; }
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VDigitizerModule.cc,v 1.1.10.1 1999/12/07 20:52:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
// $Id: G4VDigitizerModule.cc,v 1.2 1999/12/15 14:53:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-03-01 $
|
||||
//
|
||||
|
||||
#include "G4VDigitizerModule.hh"
|
||||
|
||||
Reference in New Issue
Block a user