Message: Re: Current working directory Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Current working directory 

Forum: (Graphical) User Interfaces
Re: Question Current working directory (Mojca Miklavec)
Re: None Re: Current working directory (John Allison)
Date: 22 Jun, 2015
From: Garnier Laurent <Garnier Laurent>

Hi

(I’m very late on this topic!)

2 things here :
- First of all the fact to be able to set the current working dir (think about a stand alone application). Could be done with « chdir », but a more elegant way is to implement a command.
- Secondly, the fact to be able to set a «  data path »  folder by default and get rid of all those G4LEDATA (but we should keep them in any case) 

Cheers, 
Laurent

> Le 9 mai 2015 à 12:47, John Allison <John.Allison@man.ac.uk> a écrit :
> 
> 
> *** Discussion title: (Graphical) User Interfaces
> 
> There may be a more elegant way, but this works for me:
> 
> #include <cstdlib>
> #include <unistd.h>
> int main(int argc,char** argv)
> {
> chdir("/Users/johna/Geant4_builds/dev/Debug-clang/examples/basic/B1");
> putenv("G4LEDATA=/Users/johna/Geant4_data/share/Geant4-10.1.0/data/G4EMLOW6.41");
> putenv("G4LEVELGAMMADATA=/Users/johna/Geant4_data/share/Geant4-10.1.0/data/PhotonEvaporation3.1");
> putenv("G4NEUTRONXSDATA=/Users/johna/Geant4_data/share/Geant4-10.1.0/data/G4NEUTRONXS1.4");
> putenv("G4SAIDXSDATA=/Users/johna/Geant4_data/share/Geant4-10.1.0/data/G4SAIDDATA1.1");
> ...
> 
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: 
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/userinterface/116/1.html 

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

1 Feedback: Re: Current working directory   (Mojca Miklavec - 23 Jun, 2015)
 Add Message Add Message
to: "Re: Current working directory"

 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 ]