Import Geant4 11.1.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2022-07-01 10:44:02 +02:00
parent b3bf75a2a1
commit c07cea1fe0
2172 changed files with 183300 additions and 123938 deletions
+10 -7
View File
@@ -57,8 +57,8 @@ class G4Event
using ProfilerConfig = G4ProfilerConfig<G4ProfileType::Event>;
public:
G4Event();
G4Event(G4int evID);
G4Event() = default;
explicit G4Event(G4int evID);
~G4Event();
G4Event(const G4Event &) = delete;
@@ -138,18 +138,18 @@ class G4Event
{
if( i == 0 )
{ return thePrimaryVertex; }
else if( i > 0 && i < numberOfPrimaryVertex )
if( i > 0 && i < numberOfPrimaryVertex )
{
G4PrimaryVertex* primaryVertex = thePrimaryVertex;
for( G4int j=0; j<i; ++j )
{
if( !primaryVertex ) return nullptr;
if( primaryVertex == nullptr ) return nullptr;
primaryVertex = primaryVertex->GetNext();
}
return primaryVertex;
}
else
{ return nullptr; }
return nullptr;
}
// Returns i-th primary vertex of the event.
@@ -234,7 +234,10 @@ extern G4EVENT_DLL G4Allocator<G4Event>*& anEventAllocator();
inline void* G4Event::operator new(std::size_t)
{
if (!anEventAllocator()) anEventAllocator() = new G4Allocator<G4Event>;
if (anEventAllocator() == nullptr)
{
anEventAllocator() = new G4Allocator<G4Event>;
}
return (void*)anEventAllocator()->MallocSingle();
}