Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/AdePT/copcore/VariableSizeObj.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ class VariableSizeObj {
// Copy data content using memcpy, limited by the respective size
// of the the object. If this is smaller there is data truncation,
// if this is larger the extra datum are zero to zero.
if (this == &rhs) return *this;

if (rhs.fN == fN) {
memcpy(GetValues(), rhs.GetValues(), rhs.fN * sizeof(V));
Expand Down
2 changes: 1 addition & 1 deletion include/AdePT/integration/HostTrackDataMapper.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct HostTrackData {
G4ThreeVector vertexPosition;
G4ThreeVector vertexMomentumDirection;
G4double vertexKineticEnergy = 0.0;
char particleType;
unsigned char particleType;

HostTrackData() = default;

Expand Down
4 changes: 4 additions & 0 deletions src/AdePTGeant4Integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,10 @@ void AdePTGeant4Integration::ProcessGPUStep(GPUHit const &hit, bool const callUs
case 2:
fScoringObjects->fG4Step->SetTrack(fScoringObjects->fGammaTrack);
break;
default:
std::cerr << "Error: unknown particle type " << static_cast<int>(static_cast<unsigned char>(hit.fParticleType))
<< "\n";
std::abort();
}
FillG4Step(&hit, fScoringObjects->fG4Step, *fScoringObjects->fPreG4TouchableHistoryHandle,
*fScoringObjects->fPostG4TouchableHistoryHandle, preStepStatus, postStepStatus, callUserTrackingAction,
Expand Down