Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -16,6 +16,9 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Nov 26, 2019, G.Cosmo (readout-V10-05-01)
|
||||
- Fixed cases of implicit type conversions from size_t to G4int.
|
||||
|
||||
Jan 31, 2019, I.Hrivnacova (readout-V10-05-00)
|
||||
- Merged GitHub PR #4: all Boolean operators now return G4bool.
|
||||
|
||||
|
||||
@@ -23,29 +23,30 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4DCtable
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef G4DCtable_H
|
||||
#define G4DCtable_H 1
|
||||
|
||||
class G4VDigitizerModule;
|
||||
#include "globals.hh"
|
||||
//#include "g4rw/tvordvec.h"
|
||||
#include <vector>
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class is used by G4DigiManager for book keeping the
|
||||
// This class is used by G4DigiManager for book keeping the
|
||||
// digitizer modules and digits collections. The order of
|
||||
// digi collections stored in G4DCofThisEvent is same as the
|
||||
// order of DClist.
|
||||
// The order may vary from run to run, if the user adds/changes
|
||||
// The order may vary from run to run, if the user adds/changes
|
||||
// some of his/her digitizer modules.
|
||||
// In case user wants to make G4Run object persistent, this
|
||||
// In case user wants to make G4Run object persistent, this
|
||||
// G4DCtable class object should be copied and stored with
|
||||
// G4Run object.
|
||||
|
||||
// Author: M.Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4DCtable_hh
|
||||
#define G4DCtable_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4VDigitizerModule;
|
||||
|
||||
class G4DCtable
|
||||
{
|
||||
public:
|
||||
@@ -63,7 +64,7 @@ class G4DCtable
|
||||
|
||||
public:
|
||||
inline G4int entries() const
|
||||
{ return DClist.size(); }
|
||||
{ return G4int(DClist.size()); }
|
||||
inline G4String GetDMname(G4int i) const
|
||||
{
|
||||
if(i<0||i>entries()) return "***Not Defined***";
|
||||
@@ -74,7 +75,6 @@ class G4DCtable
|
||||
if(i<0||i>entries()) return "***Not Defined***";
|
||||
return DClist[i];
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,11 +23,20 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4DigiManager
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// This is a singleton class which manages the digitizer modules.
|
||||
// The user cannot access to the constructor. The pointer of the
|
||||
// only existing object can be got via G4DigiManager::GetDMpointer()
|
||||
// static method. The first invokation in the program makes the
|
||||
// singleton object.
|
||||
|
||||
#ifndef G4DigiManager_h
|
||||
#define G4DigiManager_h 1
|
||||
// Author: M.Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4DigiManager_hh
|
||||
#define G4DigiManager_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
class G4Event;
|
||||
@@ -38,33 +47,24 @@ class G4DMmessenger;
|
||||
#include "G4DCtable.hh"
|
||||
class G4RunManager;
|
||||
class G4SDManager;
|
||||
//#include "g4rw/tpordvec.h"
|
||||
#include <vector>
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is a singleton class which manages the digitizer modules.
|
||||
// The user cannot access to the constructor. The pointer of the
|
||||
// only existing object can be got via G4DigiManager::GetDMpointer()
|
||||
// static method. The first invokation in the program makes the
|
||||
// singleton object.
|
||||
//
|
||||
|
||||
class G4DigiManager
|
||||
{
|
||||
public: // with description
|
||||
|
||||
static G4DigiManager* GetDMpointer();
|
||||
// Returns the pointer to the singleton object
|
||||
public:
|
||||
|
||||
static G4DigiManager* GetDMpointerIfExist();
|
||||
|
||||
protected:
|
||||
G4DigiManager();
|
||||
|
||||
public:
|
||||
~G4DigiManager();
|
||||
|
||||
G4DigiManager(const G4DigiManager&) = delete;
|
||||
G4DigiManager& operator=(const G4DigiManager&) = delete;
|
||||
|
||||
public: // with description
|
||||
|
||||
void AddNewModule(G4VDigitizerModule* DM);
|
||||
// Registers the user's digitizer mudule. This method must be invoked when
|
||||
// the user construct his/her digitizer module(s).
|
||||
@@ -97,25 +97,16 @@ class G4DigiManager
|
||||
// To set digi collection, the user must use SetDigiCollection of G4VDigitizerModule.
|
||||
|
||||
public:
|
||||
|
||||
void SetVerboseLevel(G4int vl);
|
||||
void List() const;
|
||||
|
||||
private:
|
||||
static G4ThreadLocal G4DigiManager * fDManager;
|
||||
G4int verboseLevel;
|
||||
std::vector<G4VDigitizerModule*> DMtable;
|
||||
G4DCtable* DCtable;
|
||||
G4DMmessenger* theMessenger;
|
||||
G4RunManager* runManager;
|
||||
G4SDManager* SDManager;
|
||||
|
||||
public:
|
||||
inline G4int GetVerboseLevel() const
|
||||
{ return verboseLevel; }
|
||||
inline G4int GetCollectionCapacity() const
|
||||
{ return DCtable->entries(); }
|
||||
inline G4int GetModuleCapacity() const
|
||||
{ return DMtable.size(); }
|
||||
{ return G4int(DMtable.size()); }
|
||||
inline G4DCtable* GetDCtable() const
|
||||
{ return DCtable; }
|
||||
inline void RestoreDCtable(G4DCtable* dc)
|
||||
@@ -123,14 +114,20 @@ class G4DigiManager
|
||||
if(DCtable) delete DCtable;
|
||||
DCtable = dc;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
G4DigiManager();
|
||||
|
||||
private:
|
||||
//Disable copy constructor and assignement operator
|
||||
G4DigiManager(const G4DigiManager&);
|
||||
G4DigiManager& operator=(const G4DigiManager&);
|
||||
|
||||
static G4ThreadLocal G4DigiManager * fDManager;
|
||||
G4int verboseLevel;
|
||||
std::vector<G4VDigitizerModule*> DMtable;
|
||||
G4DCtable* DCtable;
|
||||
G4DMmessenger* theMessenger;
|
||||
G4RunManager* runManager;
|
||||
G4SDManager* SDManager;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,66 +23,69 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4VDigitizerModule
|
||||
//
|
||||
// class description:
|
||||
//
|
||||
// This is the abstract base class of the digitizer module. The user's
|
||||
// digitizer module which generates digits must be derived from this
|
||||
// class.
|
||||
// In the derived class constructor, name(s) of digi collection(s) which
|
||||
// are made by the digitizer module must be set to "collectionName" string
|
||||
// vector.
|
||||
|
||||
#ifndef G4VDigitizerModule_H
|
||||
#define G4VDigitizerModule_H 1
|
||||
// Author: M.Asai
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VDigitizerModule_hh
|
||||
#define G4VDigitizerModule_hh 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include <vector>
|
||||
|
||||
class G4DigiManager;
|
||||
class G4VDigiCollection;
|
||||
#include "globals.hh"
|
||||
//#include "g4rw/tvordvec.h"
|
||||
#include <vector>
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This is the abstract base class of the digitizer module. The user's
|
||||
// digitizer module which generates digits must be derived from this
|
||||
// class.
|
||||
// In the derived class constructor, name(s) of digi collection(s) which
|
||||
// are made by the digitizer module must be set to "collectionName" string
|
||||
// vector.
|
||||
|
||||
class G4VDigitizerModule
|
||||
{
|
||||
public: // with description
|
||||
G4VDigitizerModule(G4String modName);
|
||||
// Constructor. The user's concrete class must use this constructor
|
||||
|
||||
G4VDigitizerModule(const G4String& modName);
|
||||
// Constructor. The user's concrete class must use this constructor
|
||||
// by the constructor initializer of the derived class. The name of
|
||||
// the detector module must be unique.
|
||||
public:
|
||||
virtual ~G4VDigitizerModule();
|
||||
G4bool operator==(const G4VDigitizerModule &right) const;
|
||||
G4bool operator!=(const G4VDigitizerModule &right) const;
|
||||
|
||||
public: // with description
|
||||
virtual ~G4VDigitizerModule();
|
||||
G4bool operator==(const G4VDigitizerModule& right) const;
|
||||
G4bool operator!=(const G4VDigitizerModule& right) const;
|
||||
|
||||
virtual void Digitize() = 0;
|
||||
// The pure virtual method that the derived class must implement.
|
||||
// In the concrete implementation of this method, necessary digi
|
||||
// collection object must be constructed and set to G4DCofThisEvent
|
||||
// by StoreDigiCollection protected method.
|
||||
|
||||
protected:
|
||||
void StoreDigiCollection(G4VDigiCollection* aDC);
|
||||
void StoreDigiCollection(G4int DCID,G4VDigiCollection* aDC);
|
||||
|
||||
protected:
|
||||
G4DigiManager* DigiManager;
|
||||
G4String moduleName;
|
||||
std::vector<G4String> collectionName;
|
||||
G4int verboseLevel;
|
||||
|
||||
public:
|
||||
|
||||
inline G4int GetNumberOfCollections() const
|
||||
{ return collectionName.size(); }
|
||||
{ return G4int(collectionName.size()); }
|
||||
inline G4String GetCollectionName(G4int i) const
|
||||
{ return collectionName[i]; }
|
||||
inline G4String GetName() const
|
||||
{ return moduleName; }
|
||||
inline void SetVerboseLevel(G4int val)
|
||||
{ verboseLevel = val; }
|
||||
|
||||
protected:
|
||||
|
||||
void StoreDigiCollection(G4VDigiCollection* aDC);
|
||||
void StoreDigiCollection(G4int DCID,G4VDigiCollection* aDC);
|
||||
|
||||
protected:
|
||||
|
||||
G4DigiManager* DigiManager;
|
||||
G4String moduleName;
|
||||
std::vector<G4String> collectionName;
|
||||
G4int verboseLevel;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,15 +23,17 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// G4VDigitizerModule implementation
|
||||
//
|
||||
//
|
||||
// Author: M.Asai
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4VDigitizerModule.hh"
|
||||
#include "G4VDigiCollection.hh"
|
||||
#include "G4DigiManager.hh"
|
||||
|
||||
G4VDigitizerModule::G4VDigitizerModule(G4String modName)
|
||||
:verboseLevel(0)
|
||||
G4VDigitizerModule::G4VDigitizerModule(const G4String& modName)
|
||||
: verboseLevel(0)
|
||||
{
|
||||
moduleName = modName;
|
||||
DigiManager = G4DigiManager::GetDMpointer();
|
||||
@@ -40,11 +42,15 @@ G4VDigitizerModule::G4VDigitizerModule(G4String modName)
|
||||
G4VDigitizerModule::~G4VDigitizerModule()
|
||||
{;}
|
||||
|
||||
G4bool G4VDigitizerModule::operator==(const G4VDigitizerModule &right) const
|
||||
{ return (moduleName==right.moduleName); }
|
||||
G4bool G4VDigitizerModule::operator==(const G4VDigitizerModule& right) const
|
||||
{
|
||||
return (moduleName==right.moduleName);
|
||||
}
|
||||
|
||||
G4bool G4VDigitizerModule::operator!=(const G4VDigitizerModule &right) const
|
||||
{ return (moduleName!=right.moduleName); }
|
||||
G4bool G4VDigitizerModule::operator!=(const G4VDigitizerModule& right) const
|
||||
{
|
||||
return (moduleName!=right.moduleName);
|
||||
}
|
||||
|
||||
void G4VDigitizerModule::StoreDigiCollection(G4VDigiCollection* aDC)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user