Message: Re: trying to direct G4cout into a log file Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: trying to direct G4cout into a log file 

Forum: Documentation and Examples
Re: Question trying to direct G4cout into a log file (Michael Kuss)
Date: 20 Jul, 2016
From: Ivana Hrivnacova <Ivana Hrivnacova>

Hello,

Maybe you invoke your added session at a wrong place. I tried with adding th lines in basic example B1 main as follows and it worked ok event with Qt GUI session:

  else { 
    // interactive mode
    // ADDED
    // B1UIsession* b1Session = new B1UIsession();
    // UImanager->SetCoutDestination(b1Session);
    // END ADDED
    UImanager->ApplyCommand("/control/execute init_vis.mac");
    ui->SessionStart();
    delete ui;
    // ADDED
    delete b1Session;
  }

I am not sure whether you really need this function within an interactive session. If you want it just in a batch mode, it is much simpler to redirect the output on the command line:

 ./exampleB1 exampleB1.in > exampleB1.out

Best regards,

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

1 None: Re: trying to direct G4cout into a log file   (Michael Kuss - 21 Jul, 2016)
 Add Message Add Message
to: "Re: trying to direct G4cout into a log file"

 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 ]