Import Geant4 11.3.0 source tree
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
G4int G4HCtable::Registor(G4String SDname, G4String HCname)
|
||||
G4int G4HCtable::Registor(const G4String& SDname, const G4String& HCname)
|
||||
{
|
||||
for (std::size_t i = 0; i < HClist.size(); ++i) {
|
||||
if (HClist[i] == HCname && SDlist[i] == SDname) return -1;
|
||||
@@ -40,7 +40,7 @@ G4int G4HCtable::Registor(G4String SDname, G4String HCname)
|
||||
return (G4int)HClist.size();
|
||||
}
|
||||
|
||||
G4int G4HCtable::GetCollectionID(G4String HCname) const
|
||||
G4int G4HCtable::GetCollectionID(const G4String& HCname) const
|
||||
{
|
||||
G4int i = -1;
|
||||
if (HCname.find('/') == std::string::npos) // HCname only
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
|
||||
G4MultiFunctionalDetector::G4MultiFunctionalDetector(G4String name) : G4VSensitiveDetector(name)
|
||||
G4MultiFunctionalDetector::G4MultiFunctionalDetector(const G4String& name)
|
||||
: G4VSensitiveDetector(name)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ void G4SDManager::AddNewDetector(G4VSensitiveDetector* aSD)
|
||||
}
|
||||
}
|
||||
|
||||
void G4SDManager::AddNewCollection(G4String SDname, G4String DCname)
|
||||
void G4SDManager::AddNewCollection(const G4String& SDname, const G4String& DCname)
|
||||
{
|
||||
G4int i = HCtable->Registor(SDname, DCname);
|
||||
if (verboseLevel > 0) {
|
||||
@@ -110,21 +110,21 @@ G4HCofThisEvent* G4SDManager::PrepareNewEvent()
|
||||
|
||||
void G4SDManager::TerminateCurrentEvent(G4HCofThisEvent* HCE) { treeTop->Terminate(HCE); }
|
||||
|
||||
void G4SDManager::Activate(G4String dName, G4bool activeFlag)
|
||||
void G4SDManager::Activate(const G4String& dName, G4bool activeFlag)
|
||||
{
|
||||
G4String pathName = dName;
|
||||
if (pathName[0] != '/') pathName.insert(0, "/");
|
||||
treeTop->Activate(pathName, activeFlag);
|
||||
}
|
||||
|
||||
G4VSensitiveDetector* G4SDManager::FindSensitiveDetector(G4String dName, G4bool warning)
|
||||
G4VSensitiveDetector* G4SDManager::FindSensitiveDetector(const G4String& dName, G4bool warning)
|
||||
{
|
||||
G4String pathName = dName;
|
||||
if (pathName[0] != '/') pathName.insert(0, "/");
|
||||
return treeTop->FindSensitiveDetector(pathName, warning);
|
||||
}
|
||||
|
||||
G4int G4SDManager::GetCollectionID(G4String colName)
|
||||
G4int G4SDManager::GetCollectionID(const G4String& colName)
|
||||
{
|
||||
G4int id = HCtable->GetCollectionID(colName);
|
||||
if (id == -1) {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "G4VSolid.hh"
|
||||
|
||||
G4VPrimitiveScorer::G4VPrimitiveScorer(G4String name, G4int depth)
|
||||
G4VPrimitiveScorer::G4VPrimitiveScorer(const G4String& name, G4int depth)
|
||||
: primitiveName(name), indexDepth(depth)
|
||||
{}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ G4VReadOutGeometry::G4VReadOutGeometry(const G4VReadOutGeometry& right)
|
||||
// VALUE, same for navigator and same for the World+Geom hierachy
|
||||
}
|
||||
|
||||
G4VReadOutGeometry::G4VReadOutGeometry(G4String n)
|
||||
G4VReadOutGeometry::G4VReadOutGeometry(const G4String& n)
|
||||
: ROworld(nullptr),
|
||||
fincludeList(nullptr),
|
||||
fexcludeList(nullptr),
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4VSDFilter::G4VSDFilter(G4String name) : filterName(name)
|
||||
G4VSDFilter::G4VSDFilter(const G4String& name) : filterName(name)
|
||||
{
|
||||
G4SDManager::GetSDMpointer()->RegisterSDFilter(this);
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
G4VSensitiveDetector::G4VSensitiveDetector(G4String name)
|
||||
G4VSensitiveDetector::G4VSensitiveDetector(const G4String& name)
|
||||
{
|
||||
size_t sLast = name.rfind('/');
|
||||
std::size_t sLast = name.rfind('/');
|
||||
if (sLast == std::string::npos) { // detector name only
|
||||
SensitiveDetectorName = name;
|
||||
thePathName = "/";
|
||||
|
||||
Reference in New Issue
Block a user