Lorenzo,
There is a macro file provided in example B2a called run2.mac. It contains all of the basic commands similar to the ones in your macro file above. I tried running it as follows:
‘’’
Jamess-MacBook-Pro:B2-build jamesbowen$ ./exampleB2a run2.mac
‘’’
It looks like there was a problem though. Here is what happened. I have omitted the extensive text that preceded the lines that signaled the beginning of the run, for brevity’s sake.
‘’’
G4VisManager: Using G4TrajectoryDrawByCharge as fallback trajectory model.
See commands in /vis/modeling/trajectories/ for other options.
Run 0 starts.
-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : Analysis_F001
issued by : G4GenericAnalysisManager::OpenFileImpl
Cannot open file “B2out”.
Please, use a file name with an extension or define the default file type
via G4AnalysisManager::SetDefaultFileType()
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment
-------- EEEE -------- G4Exception-END --------- EEEE -------
*** G4Exception: Aborting execution ***
CAUGHT SIGNAL: 6 ### address: 0x7fff6dc8332a, signal = SIGABRT, value = 6, description = abort program (formerly SIGIOT).
Backtrace:
[PID=19375, TID=-1][ 0/19]> 0 ??? 0x0000000000000000 0x0 + 0
[PID=19375, TID=-1][ 1/19]> 1 libsystem_c.dylib 0x00007fff6dc0a808 abort + 120
[PID=19375, TID=-1][ 2/19]> 2 libG4global.dylib 0x00000001065be50d Z11G4ExceptionPKcS0_19G4ExceptionSeverityS0.cold.1 + 29
[PID=19375, TID=-1][ 3/19]> 3 libG4global.dylib 0x0000000106591724 Z11G4ExceptionPKcS0_19G4ExceptionSeverityS0 + 3444
[PID=19375, TID=-1][ 4/19]> 4 libG4analysis.dylib 0x0000000105afa598 _ZN24G4GenericAnalysisManager12OpenFileImplERK8G4String + 472
[PID=19375, TID=-1][ 5/19]> 5 exampleB2a 0x00000001035b6fc7 _ZN2B29RunAction16BeginOfRunActionEPK5G4Run + 55
[PID=19375, TID=-1][ 6/19]> 6 libG4run.dylib 0x0000000103faeee4 _ZN12G4RunManager17RunInitializationEv + 1044
[PID=19375, TID=-1][ 7/19]> 7 libG4run.dylib 0x0000000103fae720 _ZN12G4RunManager6BeamOnEiPKci + 80
[PID=19375, TID=-1][ 8/19]> 8 libG4run.dylib 0x0000000103fd7c2d _ZN14G4RunMessenger11SetNewValueEP11G4UIcommand8G4String + 1133
[PID=19375, TID=-1][ 9/19]> 9 libG4intercoms.dylib 0x000000010651d04d _ZN11G4UIcommand4DoItE8G4String + 2669
[PID=19375, TID=-1][10/19]> 10 libG4intercoms.dylib 0x0000000106537d89 _ZN11G4UImanager12ApplyCommandEPKc + 2345
[PID=19375, TID=-1][11/19]> 11 libG4intercoms.dylib 0x00000001065151ed _ZN9G4UIbatch11ExecCommandERK8G4String + 29
[PID=19375, TID=-1][12/19]> 12 libG4intercoms.dylib 0x0000000106515548 _ZN9G4UIbatch12SessionStartEv + 264
[PID=19375, TID=-1][13/19]> 13 libG4intercoms.dylib 0x0000000106534a34 _ZN11G4UImanager16ExecuteMacroFileEPKc + 68
[PID=19375, TID=-1][14/19]> 14 libG4intercoms.dylib 0x000000010652f5a3 _ZN20G4UIcontrolMessenger11SetNewValueEP11G4UIcommand8G4String + 195
[PID=19375, TID=-1][15/19]> 15 libG4intercoms.dylib 0x000000010651d04d _ZN11G4UIcommand4DoItE8G4String + 2669
[PID=19375, TID=-1][16/19]> 16 libG4intercoms.dylib 0x0000000106537d89 _ZN11G4UImanager12ApplyCommandEPKc + 2345
[PID=19375, TID=-1][17/19]> 17 exampleB2a 0x00000001035b11d5 main + 741
[PID=19375, TID=-1][18/19]> 18 libdyld.dylib 0x00007fff6db3bcc9 start + 1
Abort trap: 6
Jamess-MacBook-Pro:B2-build jamesbowen$
‘’’
Do you have any idea what might be happening here? It looks like it might have something to do with the macro B2out, but I am not sure.