Message: segmentation fault after changing geometry Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question segmentation fault after changing geometry 

Forum: Geometry
Date: 16 Aug, 2005
From: andi klein <andi klein>

I am using the N03 example as a skeleton for my own program. By using Detector messenger I change the position of a collimator. The firts initial settting are read in through the vis.mac command and executed just fine. After having beam on for a few events, I then try to change the position, which works fine. However, if I execute the beamOn command now, I get a segmentation fault.

I am running Geant4 7.1

Here the part where I am trying to change the settings in DetectorConstruct

void G4_ffDetectorConstruction::setIrisPos(G4int IrisPosV)

{ IrisX = IrisPosV; }

void G4_ffDetectorConstruction::setCollPos(G4int CollPosV)

{ CollX = CollPosV;

} #include "G4RunManager.hh"

void G4_ffDetectorConstruction::UpdateGeometry()

{ G4RunManager::GetRunManager()->DefineWorldVolume(ConstructChamber());



And here the detectormessenger:

  IrisCmd = new G4UIcmdWithAnInteger("/G4_ff/det/setIrisPos",this);
  IrisCmd->SetGuidance("Select position in X of iris.");
//  IrisCmd->SetParameterName("choice",false);
//  IrisCmd->SetDefaultValue(1);

  CollCmd = new G4UIcmdWithAnInteger("/G4_ff/det/setCollPos",this);
  CollCmd->SetGuidance("Select position in X of collimator.");
//  CollCmd->SetDefaultValue(1);
//  CollCmd->SetParameterName("choice",false);

    UpdateCmd = new G4UIcmdWithoutParameter("/G4_ff/det/update",this);
  UpdateCmd->SetGuidance("Update geometry.");
  UpdateCmd->SetGuidance("This command MUST be applied before \"beamOn\" ");
  UpdateCmd->SetGuidance("if you changed geometrical value(s).");

Can anyone help me, I might do just soemthing really stupid. andi

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: segmentation fault after changing geometry   (Vladimir IVANTCHENKO - 17 Aug, 2005)
(_ Question: Re: segmentation fault after changing geometry   (Steven Avery - 07 Sep, 2005)
(_ None: Re: segmentation fault after changing geometry   (David Oxley - 07 Apr, 2008)
 Add Message Add Message
to: "segmentation fault after changing geometry"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]