fix circular module dep: thread trackID counter via pointer instead of include
G4tracking cannot include G4EventManager.hh because G4event already depends on G4tracking, creating a circular dependency. Fix: pass a raw G4int* pointer to the event-level trackIDCounter from G4EventManager through G4TrackingManager::SetTrackIDCounter into G4SteppingManager, where ProcessSecondariesFromParticleChange uses it to pre-assign track IDs without any new include. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,7 @@ class G4SteppingManager
|
||||
void SetUserAction(G4UserSteppingAction* apAction);
|
||||
G4Track* GetTrack() const;
|
||||
void SetVerboseLevel(G4int vLevel);
|
||||
void SetTrackIDCounter(G4int* counter) { fTrackIDCounter = counter; }
|
||||
void SetVerbose(G4VSteppingVerbose*);
|
||||
G4Step* GetStep() const;
|
||||
void SetNavigator(G4Navigator* value);
|
||||
@@ -195,6 +196,8 @@ class G4SteppingManager
|
||||
|
||||
G4double sumEnergyChange = 0.0;
|
||||
|
||||
G4int* fTrackIDCounter = nullptr; // pointer into G4EventManager::trackIDCounter, set via SetTrackIDCounter
|
||||
|
||||
G4VParticleChange* fParticleChange = nullptr;
|
||||
G4Track* fTrack = nullptr;
|
||||
G4TrackVector* fSecondary = nullptr;
|
||||
|
||||
@@ -78,6 +78,7 @@ class G4TrackingManager
|
||||
void SetStoreTrajectory(G4int value);
|
||||
|
||||
G4SteppingManager* GetSteppingManager() const;
|
||||
void SetTrackIDCounter(G4int* counter) { fpSteppingManager->SetTrackIDCounter(counter); }
|
||||
|
||||
G4UserTrackingAction* GetUserTrackingAction() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user