kelseymh / G4CMP

A low energy condensed matter physics package for Geant4
GNU General Public License v3.0
28 stars 18 forks source link

Multiple-path support for G4LATTICEDATA variable #18

Closed jwi3 closed 10 months ago

jwi3 commented 10 months ago

As currently stands G4LatticeReader will only read a single path off of G4LATTICEDATA when searching for crystal map files. To avoid contaminating the central G4LATTICEDATA directory with custom crystal map files, G4LatticeReader::OpenFile was modified to first split fDataDir into separate paths (in user-entered order) and search each for the desired lattice file, rather than search an unmodified fDataDir. For users with only a single path defined on G4LATTICEDATA, this change will not affect the search for crystal map files.

Additionally, the main CMakeLists.txt file was modified slightly to avoid a failure condition with git describe; this change is documented in the commit comments.

jwi3 commented 10 months ago

I believe I got the changes right, but let me know if I missed anything