Merlin logoThe Merlin++ accelerator simulation program library


If you write a new class, or sub-class, this can be added to the Merlin++ library. Such contributions are welcome. Developers are urged to adhere to the style rules as set out below.

The distinction between 'user' and 'developer' is not clear cut. But it is stil useful

Developers guide

1 Developers guide

1 Code Style

Merlin++ has a large existing codebase, so not all code meets the current guidelines. New code should, and old code is being gradually be improved.

1.1 General

1.2 Memory

1.3 Formatting

2 Reversions control

2.1 Historic revisons

git remote add Merlin-DESY https://github.com/Sam-Tygier/Merlin-DESY.git
git fetch Merlin-DESY
echo "ba5f0d0a5eec186a2475c11c11833ea2241d8595 a80fe00a7205b87972f34771f3782fbe31d6d94a" >> .git/info/grafts

2.2 Making changes

If you want to make put some changes you have made to your Merlin++ program into the repository so that other users can benefit from your additions of bug fixes, the procedure is as follows
  1. You will need to get a github account (if you're an expert you probably have one already, if not then it's useful for lots of stuff)
  2. You need to get this made a member of the Merlin++ organization. Contact the team who will be happy to help.
  3. On the github Merlin website, fork the Merlin project. This establishes a version of the code under https://github.com/Your user name /Merlin
  4. Be absolutely certain that your code is correct and obeys the rules
  5. Add the relevant routines to git's list of files to be staged. You can do this explicitly file by file, or wholesale for the entire directory, typically by by git add . If doing it wholesale make sure to do it in the source subdirectory, or all the intermediate binary files will get added to the list and mess up the repository. This need only be done once.
  6. git status is always helpful
  7. git commit -m "useful message" will commit your changed files to be uploaded. The useful message should briefly explain what you've done and why.
  8. You may need to remind git of where the files were downloaded from with git remote add origin https://github.com/ your username /Merlin
  9. Then git push origin master will make the changes in your github repository
  10. Go to the github website, log in, go to the Merlin repository, click on 'pull requests' and then 'new pull request'. This will start the process of moving the changes in your fork into the mainstream. This requires approval by at least one other developer, who will now be alerted by emails. So it will not be instant.

3 Testing

4 Documentation